7.3high
Path Traversal in SharpZipLib
- Severity
- 7.3high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.97% (higher than 81% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-m22m-h4rf-pwq3
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| icsharpcode sharpziplib | from 1.3.3 before 1.3.3, from 0.86.0 before 0.86.0* | CVE List |
| SharpZipLib (NuGet) | before 1.3.3 | GitHub Advisory Database |
| sharpziplib_project sharpziplib | before 1.3.3 | NVD |
All scores
| GitHub_M | 7.3high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L |
| GitHub | 7.3high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 7.5high CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
SharpZipLib (o #ziplib) es una biblioteca Zip, GZip, Tar y BZip2. En versiones anteriores a 1.3.3, una entrada de archivo TAR "../evil.txt" puede ser extraída en el directorio padre de "destFolder". Esto conlleva a una escritura arbitraria de archivos que puede conllevar a una ejecución de código. La vulnerabilidad fue parcheada en la versión 1.3.3
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-32840 changed 2025-04-22 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-m22m-h4rf-pwq3 changed 2024-02-19 | CC-BY-4.0 |
| NVD | CVE-2021-32840 changed 2026-06-17 | Public domain |