# CVE-2021-32840: Path Traversal in SharpZipLib

- Severity: High 7.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L`
- 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.97%, higher than 81% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-01-26T21:05:10.000Z
- Modified: 2026-06-17T03:53:44.253Z
- Also known as: GHSA-m22m-h4rf-pwq3
- 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. Prior to version 1.3.3, a TAR file entry `../evil.txt` may be extracted in the parent directory of `destFolder`. This leads to arbitrary file write that may lead to code execution. The vulnerability was patched in version 1.3.3.

(As written by CVE List.)

## Affected

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

## Every score

- GitHub_M: CVSS:3.1 7.3 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L`
- GitHub: CVSS:3.1 7.3 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

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

## Sources

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

---

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