A vulnerability has been found in the way developers have implemented the archive extraction of files. An arbitrary file write vulnerability, that can be achieved using a specially crafted zip archive (affects other archives as well, bzip2, tar,xz, war, cpio, 7z), that holds path traversal filenames. So when the filename gets concatenated to the target extraction directory, the final path ends up outside of the target folder. Of course if an executable or a configuration file is overwritten with a file containing malicious code, the problem can turn into an arbitrary code execution issue quite easily. This affects multiple libraries that lacks of a high level APIs that provide the archive extraction functionality.
Public via: https://snyk.io/vuln/SNYK-DOTNET-SHARPCOMPRESS-60246
Created sharpziplib tracking bugs for this issue: Affects: fedora-27 [bug 1585948] Affects: fedora-28 [bug 1585949]
I had a look at https://github.com/snyk/zip-slip-vulnerability It does not actually say that sharplibzip is vulnerable. There does not seem to be an upstream bug for sharplibzip yet.
(In reply to Timotheus Pokorra from comment #3) > I had a look at https://github.com/snyk/zip-slip-vulnerability > It does not actually say that sharplibzip is vulnerable. > > There does not seem to be an upstream bug for sharplibzip yet. hmm you're right, there seems to have been some confusion between this report and the one for sharpcompress. The Snyk advisory lists sharpziplib as "lacks high-level API" which is only partially correct. FastZip.cs and TarArchive.cs both include ExtractEntry methods which appear to be vulnerable. The wiki examples also don't defend against these attacks, afaics. This pull request against SharpCompress illustrates one strategy to fix: https://github.com/adamhathcock/sharpcompress/pull/374
there is now an official bug upstream: https://github.com/icsharpcode/SharpZipLib/issues/232 and a potential fix: https://github.com/piksel/SharpZipLib/commit/79503293a6991d7074236b9442c151562b94c648
This CVE Bugzilla entry is for community support informational purposes only as it does not affect a package in a commercially supported Red Hat product. Refer to the dependent bugs for status of those individual community products.