CVE-2021-32841: Path Traversal in SharpZipLib
Vulnerability summary
CVE-2021-32841 is a medium (CVSS 5.3) vulnerability in icsharpcode sharpziplib. EPSS estimates a 1.11% chance of exploitation in the next 30 days, higher than 67.1% of scored vulnerabilities. 1 public exploit is recorded.
Not severe (CVSS 4, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 26-01-2022PublishedVulnerability first disclosed.
- 22-04-2025Last modifiedVulnerability information updated.
Description
SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library. Starting version 1.3.0 and prior to version 1.3.3, 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. Version 1.3.3 contains a patch for this vulnerability.
CVSS metrics
5 scores · 4 sources · 2 versions- CVE.orgCNA4.0MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NDiffers
- OSV · UbuntuEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- OSV · NugetEcosystem advisory · calculated4.0MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NDiffers
EPSS trend
Probability
1.11%
Chance of exploitation in the next 30 days
Percentile
67%
Versus all other CVEs
30-day change
Increase +0.04 pp
From 1.08% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundGhsl 2021 125 Sharpziplib
Maturity: poc
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Icsharpcode1 product
- sharpziplib≥ 1.3.3, < 1.3.3 | ≥ 1.3.0, < 1.3.0*
NuGet1 product
- SharpZipLib≥ 1.3.0, < 1.3.3
Sharpziplib_project1 product
- sharpziplib≥ 1.3.0, < 1.3.3
Ubuntu1 product
- monoAll versions (No fix recorded)
4 vendors · 4 products
References
8 links- securitylab.github.com/advisories/GHSL-2021-125-sharpziplib/X Refsource CONFIRMREPORTExploitThird Party Advisory
- github.com/icsharpcode/SharpZipLib/releases/tag/v1.3.3X Refsource MISCREPORTWEBRelease NotesThird Party Advisory
- github.com/icsharpcode/SharpZipLib/commit/5c3b293de5d65b108e7f2cd0ea8f81c1b8273f78X Refsource MISCREPORTWEBPatchThird Party Advisory