# CVE-2021-32841: Path Traversal in SharpZipLib

- Severity: Medium 4.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.11%, higher than 66% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-01-26T21:10:15.000Z
- Modified: 2026-06-17T03:53:44.380Z
- Also known as: GHSA-2x7h-96h5-rq84
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- icsharpcode sharpziplib: from 1.3.3 before 1.3.3; from 1.3.0 before 1.3.0*
- SharpZipLib (NuGet): from 1.3.0 before 1.3.3
- sharpziplib_project sharpziplib: from 1.3.0 before 1.3.3

## Every score

- GitHub_M: CVSS:3.1 4.0 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- GitHub: CVSS:3.1 4.0 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:P/A:N`

## References

- <https://securitylab.github.com/advisories/GHSL-2021-125-sharpziplib/> (exploit, third-party-advisory)
- <https://github.com/icsharpcode/SharpZipLib/releases/tag/v1.3.3> (release-notes, third-party-advisory, web)
- <https://github.com/icsharpcode/SharpZipLib/commit/5c3b293de5d65b108e7f2cd0ea8f81c1b8273f78> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-32841> (advisory)
- <https://github.com/icsharpcode/SharpZipLib> (package)
- <https://securitylab.github.com/advisories/GHSL-2021-125-sharpziplib> (advisory)

## Sources

- CVE List: [CVE-2021-32841](https://www.cve.org/CVERecord?id=CVE-2021-32841), CVE Terms of Use, modified 2025-04-22
- GitHub Advisory Database: [GHSA-2x7h-96h5-rq84](https://github.com/advisories/GHSA-2x7h-96h5-rq84), CC-BY-4.0, modified 2024-02-19
- NVD: [CVE-2021-32841](https://nvd.nist.gov/vuln/detail/CVE-2021-32841), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-32841 · Whole record: https://cve.day/CVE-2021-32841.json · Rebuilt by cve.day 2026-11-25T22:58:06.675Z
