CVE-2021-32842
published medium CVSS 3.1 · 4.0Path Traversal in SharpZipLib
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| icsharpcode | — | sharpziplib1.3.3 to < 1.3.3 · 1.0.0 to < 1.0.0* | Affected | Not stated | GitHub_M |
Description
SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library. Starting version 1.0.0 and prior to version 1.3.3, 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. Version 1.3.3 fixed this vulnerability.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 4.0 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| icsharpcode | sharpziplib | 1.3.3 to < 1.3.3 (affected · custom)1.0.0 to < 1.0.0* (affected · custom) | GitHub_M · cna |
Weaknesses
1- CWE-22 CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
References
2Provider assertions
3GitHub_M · cna
Path Traversal in SharpZipLib
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 6762324e76143446b87de7b2bad1f9db50b8404cae8c3624440b1a03470ddfaa
- Ingested
- 23 Sep 2026, 07:54:30 UTC
- Source record
- Official CVE record