{"id":"CVE-2021-32842","aliases":["CVE-2021-32842","GHSA-mm6g-mmq6-53ff"],"related":[],"kind":"vulnerability","state":"published","title":"Path Traversal in SharpZipLib","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"SharpZipLib (o #ziplib) es una biblioteca Zip, GZip, Tar y BZip2. A partir de la versión 1.0.0 y versiones anteriores a 1.3.3, fue añadida una comprobación de si el archivo de destino está bajo un directorio de destino. Sin embargo, no es exigido que \"_baseDirectory\" termine en barra. Si el directorio base no termina en barra como \"/home/usuario/dir\" es posible crear un archivo con un nombre que comienza como el directorio de destino un nivel más arriba del directorio, por ejemplo \"/home/usuario/dir.sh\". Debido a las restricciones del nombre del archivo y del directorio de destino, el impacto de la creación arbitraria de archivos es limitado y depende del caso de uso. La versión 1.3.3 ha corregido esta vulnerabilidad","source":"nvd"}],"published":"2022-01-26T21:10:10.000Z","modified":"2026-06-17T03:53:44.513Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":4,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:P/A:N","score":5,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"type":"custom","introduced":"1.3.3","fixed":"1.3.3","status":"affected"},{"type":"custom","introduced":"1.0.0","fixed":"1.0.0*","status":"affected"}],"vendor":"icsharpcode","product":"sharpziplib","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"1.0.0","status":"affected","fixed":"1.3.3"}],"ecosystem":"NuGet","package":"SharpZipLib","purl":"pkg:nuget/SharpZipLib","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.0.0","fixed":"1.3.3"}],"vendor":"sharpziplib_project","product":"sharpziplib","cpe":"cpe:2.3:a:sharpziplib_project:sharpziplib:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://securitylab.github.com/advisories/GHSL-2021-125-sharpziplib/","tags":["exploit","third-party-advisory","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/icsharpcode/SharpZipLib/releases/tag/v1.3.3","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32842","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/icsharpcode/SharpZipLib","tags":["package"],"sources":["ghsa"]},{"url":"https://securitylab.github.com/advisories/GHSL-2021-125-sharpziplib","tags":["advisory"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-04-22T15:51:39.713Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-32842","url":"https://www.cve.org/CVERecord?id=CVE-2021-32842","licence":"CVE Terms of Use","modified":"2025-04-22T18:32:19.882Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mm6g-mmq6-53ff","url":"https://github.com/advisories/GHSA-mm6g-mmq6-53ff","licence":"CC-BY-4.0","modified":"2024-02-19T05:31:55.120Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-32842","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32842","licence":"Public domain","modified":"2026-06-17T03:53:44.513Z"}],"updatedAt":"2026-11-25T22:58:06.675Z","epss":{"score":0.00924,"percentile":0.61448,"date":"2026-12-01T12:00:22.000Z"}}