Advisory Database
  • Advisories
  • Dependency Scanning
  1. nuget
  2. ›
  3. SharpZipLib
  4. ›
  5. CVE-2021-32842

CVE-2021-32842: Path traversal in SharpZipLib

February 1, 2022

SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library. A check was added if the destination file is under a destination directory. However, it is not enforced that _baseDirectory ends with slash. If the _baseDirectory is not slash terminated like /home/user/dir it is possible to create a file with a name thats begins as the destination directory one level up from the directory, i.e. /home/user/dir.sh. Because of the file name and destination directory constraints, the arbitrary file creation impact is limited and depends on the use case. fixed this vulnerability.

References

  • github.com/advisories/GHSA-mm6g-mmq6-53ff
  • github.com/icsharpcode/SharpZipLib/releases/tag/v1.3.3
  • nvd.nist.gov/vuln/detail/CVE-2021-32842
  • securitylab.github.com/advisories/GHSL-2021-125-sharpziplib/

Code Behaviors & Features

Detect and mitigate CVE-2021-32842 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.0.0 before 1.3.3

Fixed versions

  • 1.3.3

Solution

Upgrade to version 1.3.3 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Learn more about CVSS

Source file

nuget/SharpZipLib/CVE-2021-32842.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:21 +0000.