{"id":"CVE-2021-32842","published":"2022-01-26T21:10:10Z","modified":"2025-04-22T18:32:19Z","title":"Path Traversal in SharpZipLib","vendor":"icsharpcode","product":"sharpziplib","tier":"tail","description":{"text":"SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library. Starting version 1.0.0 and prior to version 1.3.3, a check was added if the destination file is under a destination directory. However, it is not enforced that `_baseDirectory` ends with slash. If the _baseDirectory is not slash terminated like `/home/user/dir` it is possible to create a file with a name thats begins as the destination directory one level up from the 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 fixed this vulnerability.","provenance":"source","from":"CVE.org"},"cvss":{"score":4,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00924,"percentile":0.58682,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://securitylab.github.com/advisories/GHSL-2021-125-sharpziplib/","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/icsharpcode/SharpZipLib/releases/tag/v1.3.3","tags":["x_refsource_MISC"]}],"priority":{"score":14.5,"factors":[{"name":"EPSS percentile","points":11.74},{"name":"CVSS severity","points":2.8}]},"vendorSlug":"icsharpcode","affectedVersions":[{"vendor":"icsharpcode","product":"sharpziplib","versions":[">= 1.3.3, < 1.3.3",">= 1.0.0, < 1.0.0*"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-22T15:51:39.713749Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"NuGet","package":"SharpZipLib","vulnerableRanges":[">=1.0.0, <1.3.3"],"patched":["1.3.3"],"from":["GHSA-mm6g-mmq6-53ff"],"provenance":"source"}],"summary":{"text":"In SharpZipLib (icsharpcode's Zip, GZip, Tar and BZip2 library, versions 1.0.0 before 1.3.3), the destination-path check does not enforce that the base directory ends with a slash, so a base directory such as /home/user/dir allows extraction to paths that begin with that name one level up, such as /home/user/dir.sh. An attacker who can supply an archive for the library to extract, with local access to the affected system, can create files outside the intended destination directory; the impact is limited and depends on the use case, and the attack requires no privileges or user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:38:49Z"},"euvd":{"id":"EUVD-2022-1102","exploited":false,"provenance":"source"}}