CVE-2021-32841
Path Traversal in SharpZipLib
Reported by github_m · Published January 26, 2022
SharpZipLib is fixed in 1.3.3 (NuGet)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| SharpZipLib | NuGet | 1.3.3 |
| sharpziplib | sharpziplib_project | 1.3.3 |
| sharpziplib | icsharpcode | 1.3.3 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| icsharpcode | sharpziplib | 1.3.3, 1.3.0 |
| NuGet | SharpZipLib | 1.3.0 |
| icsharpcode | sharpziplib | 1.3.3, 1.3.0 |
Timeline
- Jan 26, 2022 CVE Published
- Jan 27, 2022 EPSS Score (30 in total, the first dated here)
- Feb 1, 2022 CVE Updated
- Mar 17, 2026 Security Advisory
- Aug 1, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2021-32841
vulnetix vdb fixes CVE-2021-32841
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-32841/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_CONFIRM
- x_refsource_MISC
- x_refsource_MISC
- https://nvd.nist.gov/vuln/detail/CVE-2021-32841 advisory
- https://github.com/advisories/GHSA-2x7h-96h5-rq84 advisory