{"id":"CVE-2021-32842","aliases":["EUVD-2022-1102","GHSA-mm6g-mmq6-53ff","UBUNTU-CVE-2021-32842"],"status":"published","title":"Path Traversal in SharpZipLib","description":"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.","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-12","score":0.00895,"percentile":0.59977,"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:10Z","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.0.0"},{"fixed":"1.3.3"}]}]},{"source":"osv","ecosystem":"NuGet","package":"SharpZipLib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.0.0"},{"fixed":"1.3.3"}]}],"versions":["1.0.0","1.1.0","1.2.0","1.3.0","1.3.1","1.3.2"]},{"source":"osv","ecosystem":"Ubuntu:14.04:LTS","package":"mono","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.10.8.1-5ubuntu2","3.2.3+dfsg-5","3.2.3+dfsg-7ubuntu1","3.2.8+dfsg-4ubuntu1","3.2.8+dfsg-4ubuntu1.1"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"mono","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.2.8+dfsg-4ubuntu4","4.2.1.102+dfsg2-5ubuntu1","4.2.1.102+dfsg2-7ubuntu4"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"mono","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.6.2.7+dfsg-1ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"mono","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.18.0.240+dfsg-3","6.8.0.105+dfsg-1","6.8.0.105+dfsg-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://nvd.nist.gov/vuln/detail/CVE-2021-32842","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-mm6g-mmq6-53ff"},{"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-32842","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-32842","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-32842","title":"Path Traversal in SharpZipLib","description":"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.","status":"published","published":"2022-01-26T21:10:10Z","modified":"2025-04-22T18:32:19.882Z","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.014772Z"}],"euvd":[{"id":"EUVD-2022-1102","description":"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.","status":"published","published":"2022-01-26T21:10:10Z","modified":"2025-04-22T18:32:19Z","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-mm6g-mmq6-53ff","title":"Path Traversal in SharpZipLib","description":"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.","status":"published","published":"2022-02-01T16:23:00Z","modified":"2023-02-03T05:05:15Z","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-32842","description":"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.","status":"published","published":"2022-01-26T21:15:13.337Z","modified":"2026-06-17T03:53:44.513Z","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:03.821385Z"}],"osv":[{"id":"CVE-2021-32842","description":"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.","status":"published","published":"2022-01-26T21:15:13.337Z","modified":"2026-10-20T10:53:46.295618087Z","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-mm6g-mmq6-53ff","title":"Path Traversal in SharpZipLib","description":"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.","status":"published","published":"2022-02-01T16:23:00Z","modified":"2024-02-19T05:31:55.120019Z","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:52.170928Z"},{"id":"UBUNTU-CVE-2021-32842","description":"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.","status":"published","published":"2022-01-26T21:15:00Z","modified":"2026-10-17T12:57:14.713377931Z","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"}]}}
