Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to SharpCompress 0.30.0 due to CVE-2021-39208 #230

Closed
Mario-Hofstaetter opened this issue Nov 19, 2021 · 2 comments · Fixed by #233
Closed

Update to SharpCompress 0.30.0 due to CVE-2021-39208 #230

Mario-Hofstaetter opened this issue Nov 19, 2021 · 2 comments · Fixed by #233
Assignees
Labels
Milestone

Comments

@Mario-Hofstaetter
Copy link
Contributor

Mario-Hofstaetter commented Nov 19, 2021

We have been alerted by our Dependency-Track server that

<PackageReference Include="SharpCompress" Version="0.23.0" />

currently used by Ductus.FluentDocker is affected by CVE-2021-39208.

See also https://nvd.nist.gov/vuln/detail/CVE-2021-39208
This has been fixed in SharpCompress >= 0.29.0.

While this is low in Impact (CVSS Base Score 4.3) @mariotoffia please consider upgrading the dependency, because users of your library need to security audit this.

There was an automatic PR #213 for this, but the SharpCompress release notes did not even mention the CVE.

Thanks ❤️

@Mario-Hofstaetter Mario-Hofstaetter changed the title Update from SharpCompress 0.23.0 due to CVE-2021-39208 Update to SharpCompress 0.29.0 due to CVE-2021-39208 Nov 19, 2021
@Mario-Hofstaetter Mario-Hofstaetter changed the title Update to SharpCompress 0.29.0 due to CVE-2021-39208 Update to SharpCompress 0.30.0 due to CVE-2021-39208 Nov 22, 2021
@mariotoffia mariotoffia self-assigned this Nov 23, 2021
@mariotoffia mariotoffia added this to the 3.0.0-RELEASE milestone Nov 23, 2021
@mariotoffia
Copy link
Owner

Hi @Mario-Hofstaetter and thanks for this issue - It seems that it is when you use this on a "unknown" archive that could go outside your "sandbox". I use sharp-compress to create archives so it does not affect fluentdocker.

Having said that I do understand that I need to fix it so FluentDocker do not get blacklisted or if someone uses this as transient dependency for their own purpose.

I'll fix it - but it is not a straight off fix since it breaks the build on something...

Cheers,
Mario :)

@Mario-Hofstaetter
Copy link
Contributor Author

Mario-Hofstaetter commented Nov 23, 2021

Thanks for looking into it!

I did look into the code and saw sharpcompress is hardly used anyway, only inside of CompressionExtensions.UnTar ?
Which only seems to be used in

public static IContainerService Export(this IContainerService service, TemplateString fqPath, bool explode = false,
      bool throwOnError = false)

if explode is set to true .

That however sounds like extracting an archive, rather than creating one?

It did consider forking and just uncommenting that code until the dependency is updated but until now was too lazy to do so 😅

Maybe there is a .NET native way to extract a tar so the SharpCompress dependency could be dropped completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants