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

CVE-2021-32841: 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 destination directory. However, it is not enforced that destDir ends with slash. If the destDir is not slash terminated like /home/user/dir it is possible to create a file with a name thats begins with the destination 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. contains a patch for this vulnerability.

References

  • github.com/advisories/GHSA-2x7h-96h5-rq84
  • github.com/icsharpcode/SharpZipLib/commit/5c3b293de5d65b108e7f2cd0ea8f81c1b8273f78
  • github.com/icsharpcode/SharpZipLib/releases/tag/v1.3.3
  • nvd.nist.gov/vuln/detail/CVE-2021-32841
  • securitylab.github.com/advisories/GHSL-2021-125-sharpziplib/

Code Behaviors & Features

Detect and mitigate CVE-2021-32841 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.3.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-32841.yml

Spotted a mistake? Edit the file on GitLab.

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

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