Path Traversal in SharpZipLib
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| icsharpcode | sharpziplib | 1.3.3 to before 1.3.3; 1.3.0 and later | 1.3.3 | Patch available | CNA |
| — | SharpZipLib (NuGet) | 1.3.0 to before 1.3.3 | 1.3.3 | Patch available | GHSA-2x7h-96h5-rq84 |
- sharpziplib Vendoricsharpcode Affected 1.3.3 to before 1.3.3; 1.3.0 and later Fixed in 1.3.3 Patch available CNA
- SharpZipLib (NuGet) Vendor— Affected 1.3.0 to before 1.3.3 Fixed in 1.3.3 Patch available GHSA-2x7h-96h5-rq84
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:sharpziplib_project:sharpziplib:*:*:*:*:*:*:*:* | 1.3.0 to before 1.3.3 | Vulnerable | icsharpcode |
- cpe:2.3:a:sharpziplib_project:sharpziplib:*:*:*:*:*:*:*:* Versions 1.3.0 to before 1.3.3 Vulnerable ·icsharpcode
Remediation
- Fix · CNA sharpziplib (icsharpcode) Fixed in 1.3.3
- Fix · GHSA-2x7h-96h5-rq84 SharpZipLib (NuGet) Fixed in 1.3.3 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2021-32841
- 2026-10-03 Alias added: GHSA-2x7h-96h5-rq84
References
Advisory 3
More icsharpcode Sharpziplib vulnerabilities
- TI-2021-12505 Path Traversal in SharpZipLib CVSS 3.1CRITICAL 9.8
- TI-2021-12507 Path Traversal in SharpZipLib CVSS 3.1MEDIUM 5.3
- TI-2018-16140 Path traversal in SharpZipLib CVSS 3.1MEDIUM 5.5
Sources
- CVE-2021-32841 · CVE Program
- CVE-2021-32841 · NVD
- FIRST EPSS
- GHSA-2x7h-96h5-rq84 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences