{"id":"CVE-2021-32841","aliases":["EUVD-2022-0770","GHSA-2x7h-96h5-rq84","UBUNTU-CVE-2021-32841"],"status":"published","title":"Path Traversal in SharpZipLib","description":"SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library. Starting version 1.3.0 and prior to version 1.3.3, a check was added if the destination file is under destination directory. However, it is not enforced that `destDir` ends with slash. If the `destDir` is not slash terminated like `/home/user/dir` it is possible to create a file with a name thats begins with the destination 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 contains a patch for this vulnerability.","severity":{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.01079,"percentile":0.65347,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-22"],"published":"2022-01-26T21:10:15Z","modified":"2026-10-20T10:53:46Z","fixes":[{"ecosystem":"NuGet","package":"SharpZipLib","fixed_in":["1.3.3"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"NuGet","package":"SharpZipLib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.3.0"},{"fixed":"1.3.3"}]}]},{"source":"osv","ecosystem":"NuGet","package":"SharpZipLib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.3.0"},{"fixed":"1.3.3"}]}],"versions":["1.3.0","1.3.1","1.3.2"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"mono","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["6.8.0.105+dfsg-3.2"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"mono","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["6.8.0.105+dfsg-3.4","6.8.0.105+dfsg-3.5ubuntu1","6.8.0.105+dfsg-3.6ubuntu1","6.8.0.105+dfsg-3.6ubuntu2"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"mono","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["6.12.0.199+dfsg-3","6.12.0.199+dfsg-6"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"mono","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["6.14.1+ds2-2","6.14.1+ds2-3"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"mono","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["6.12.0.199+dfsg-6","6.14.1+ds2-1","6.14.1+ds2-2"]}],"products":[{"vendor":"icsharpcode","product":"sharpziplib"},{"vendor":"sharpziplib_project","product":"sharpziplib"}],"references":[{"url":"https://securitylab.github.com/advisories/GHSL-2021-125-sharpziplib/","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Third Party Advisory","evidence","report"]},{"url":"https://github.com/icsharpcode/SharpZipLib/releases/tag/v1.3.3","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","advisory","web","report"]},{"url":"https://github.com/icsharpcode/SharpZipLib/commit/5c3b293de5d65b108e7f2cd0ea8f81c1b8273f78","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32841","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-2x7h-96h5-rq84"},{"url":"https://github.com/icsharpcode/SharpZipLib","tags":["package"]},{"url":"https://securitylab.github.com/advisories/GHSL-2021-125-sharpziplib","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2021-32841","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-32841","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-32841","title":"Path Traversal in SharpZipLib","description":"SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library. Starting version 1.3.0 and prior to version 1.3.3, a check was added if the destination file is under destination directory. However, it is not enforced that `destDir` ends with slash. If the `destDir` is not slash terminated like `/home/user/dir` it is possible to create a file with a name thats begins with the destination 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 contains a patch for this vulnerability.","status":"published","published":"2022-01-26T21:10:15Z","modified":"2025-04-22T18:28:07.967Z","cvss":[{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:33:07.349244Z"}],"euvd":[{"id":"EUVD-2022-0770","description":"SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library. Starting version 1.3.0 and prior to version 1.3.3, a check was added if the destination file is under destination directory. However, it is not enforced that `destDir` ends with slash. If the `destDir` is not slash terminated like `/home/user/dir` it is possible to create a file with a name thats begins with the destination 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 contains a patch for this vulnerability.","status":"published","published":"2022-01-26T21:10:15Z","modified":"2025-04-22T18:28:07Z","cvss":[{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T20:52:15.026784Z"}],"ghsa":[{"id":"GHSA-2x7h-96h5-rq84","title":"Path Traversal in SharpZipLib","description":"SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library. Starting version 1.3.0 and prior to version 1.3.3, a check was added if the destination file is under destination directory. However, it is not enforced that `destDir` ends with slash. If the `destDir` is not slash terminated like `/home/user/dir` it is possible to create a file with a name thats begins with the destination 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 contains a patch for this vulnerability.","status":"published","published":"2022-02-01T16:22:57Z","modified":"2023-02-03T05:05:10Z","cvss":[{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"medium"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:36:42.703723Z"}],"nvd":[{"id":"CVE-2021-32841","description":"SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library. Starting version 1.3.0 and prior to version 1.3.3, a check was added if the destination file is under destination directory. However, it is not enforced that `destDir` ends with slash. If the `destDir` is not slash terminated like `/home/user/dir` it is possible to create a file with a name thats begins with the destination 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 contains a patch for this vulnerability.","status":"published","published":"2022-01-26T22:15:07.837Z","modified":"2026-06-17T03:53:44.38Z","cvss":[{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"medium","assessor":"secondary"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:07:04.178977Z"}],"osv":[{"id":"CVE-2021-32841","description":"SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library. Starting version 1.3.0 and prior to version 1.3.3, a check was added if the destination file is under destination directory. However, it is not enforced that `destDir` ends with slash. If the `destDir` is not slash terminated like `/home/user/dir` it is possible to create a file with a name thats begins with the destination 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 contains a patch for this vulnerability.","status":"published","published":"2022-01-26T22:15:07.837Z","modified":"2026-10-20T10:53:46.304071934Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:19.793849Z"},{"id":"GHSA-2x7h-96h5-rq84","title":"Path Traversal in SharpZipLib","description":"SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library. Starting version 1.3.0 and prior to version 1.3.3, a check was added if the destination file is under destination directory. However, it is not enforced that `destDir` ends with slash. If the `destDir` is not slash terminated like `/home/user/dir` it is possible to create a file with a name thats begins with the destination 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 contains a patch for this vulnerability.","status":"published","published":"2022-02-01T16:22:57Z","modified":"2024-02-19T05:26:00.916459Z","cvss":[{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"medium"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T15:46:35.050232Z"},{"id":"UBUNTU-CVE-2021-32841","description":"SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library. Starting version 1.3.0 and prior to version 1.3.3, a check was added if the destination file is under destination directory. However, it is not enforced that `destDir` ends with slash. If the `destDir` is not slash terminated like `/home/user/dir` it is possible to create a file with a name thats begins with the destination 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 contains a patch for this vulnerability.","status":"published","published":"2022-01-26T22:15:00Z","modified":"2026-10-17T12:55:46.773064364Z","cvss":[{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"medium"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:54:27.332852Z"}]}}
