{"schemaVersion":4,"id":"CVE-2021-32840","aliases":["UBUNTU-CVE-2021-32840","GHSA-m22m-h4rf-pwq3"],"status":"published","duplicateOf":null,"title":"Path Traversal in SharpZipLib","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.","dates":{"published":"2022-01-26T21:05:10.000Z","modified":"2025-04-22T18:32:29.435Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":9.8,"severity":"critical","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":7.3,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Nuget","score":7.3,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L","exploitability":6.4,"impact":7.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":7.5,"severity":"high","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.01969,"percentile":0.81117,"severity":"low","asOf":"2026-12-04T00:00:00.000Z","change":{"pp":0.06299999999999986,"baselineDate":"2026-11-04T00:00:00.000Z","baselineScore":0.01906},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.01973,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.01973,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.01973,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.01973,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.01973,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.01973,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01973,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01973,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01973,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01973,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01973,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01973,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01973,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01973,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-22T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-23T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-24T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-25T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-26T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-27T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-28T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-29T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-30T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-10-31T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-01T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-02T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-03T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-04T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.01969,"percentile":0.81117}],"last30":[{"date":"2026-11-04T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.01906,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.01969,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.01969,"percentile":0.81117}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"GITHUB_ADVISORIES_GHSL-2021-125-SHARPZIPLIB","name":"Ghsl 2021 125 Sharpziplib","source":"github","url":"https://securitylab.github.com/advisories/GHSL-2021-125-sharpziplib/","maturity":"poc","reliabilityScore":0.3,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory","description":"The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/22.html"}],"affected":[{"vendor":"ubuntu","product":"mono","name":"mono","label":"mono","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/mono","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null,"bounds":{"kind":"all"}}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"icsharpcode","product":"sharpziplib","name":"sharpziplib","label":"sharpziplib","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 1.3.3, < 1.3.3","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"1.3.3","startInclusive":true,"end":"1.3.3","endInclusive":false}},{"text":"≥ 0.86.0, < 0.86.0*","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"0.86.0","startInclusive":true,"end":"0.86.0*","endInclusive":false}}],"versionsText":"≥ 1.3.3, < 1.3.3 | ≥ 0.86.0, < 0.86.0*","eol":null,"hubHref":"/vendor/icsharpcode/sharpziplib"},{"vendor":"NuGet","product":"SharpZipLib","name":"SharpZipLib","label":"SharpZipLib","ecosystem":"NuGet","cpePart":null,"purl":"pkg:nuget/SharpZipLib","purlType":"nuget","versions":[{"text":"< 1.3.3","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"1.3.3","endInclusive":false}}],"versionsText":"< 1.3.3","eol":null,"hubHref":null},{"vendor":"sharpziplib_project","product":"sharpziplib","name":"sharpziplib","label":"sharpziplib","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 1.3.3","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"1.3.3","endInclusive":false}}],"versionsText":"< 1.3.3","eol":null,"hubHref":"/vendor/sharpziplib_project/sharpziplib"}],"affectedCount":4,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://securitylab.github.com/advisories/GHSL-2021-125-sharpziplib/","label":"securitylab.github.com/advisories/GHSL-2021-125-sharpziplib/","hostname":"securitylab.github.com","tags":["X Refsource CONFIRM","REPORT","Exploit","Third Party Advisory"]},{"url":"https://github.com/icsharpcode/SharpZipLib/releases/tag/v1.3.3","label":"github.com/icsharpcode/SharpZipLib/releases/tag/v1.3.3","hostname":"github.com","tags":["X Refsource MISC","REPORT","WEB","Third Party Advisory"]},{"url":"https://github.com/icsharpcode/SharpZipLib/commit/a0e96de70b5264f4c919b09253b1522bc7a221cc","label":"github.com/icsharpcode/SharpZipLib/commit/a0e96de70b5264f4c919b09253b1522bc7a221cc","hostname":"github.com","tags":["X Refsource MISC","REPORT","WEB","Patch","Third Party Advisory"]},{"url":"https://ubuntu.com/security/CVE-2021-32840","label":"ubuntu.com/security/CVE-2021-32840","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-32840","label":"www.cve.org/CVERecord?id=CVE-2021-32840","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32840","label":"nvd.nist.gov/vuln/detail/CVE-2021-32840","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/icsharpcode/SharpZipLib","label":"github.com/icsharpcode/SharpZipLib","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://securitylab.github.com/advisories/GHSL-2021-125-sharpziplib","label":"securitylab.github.com/advisories/GHSL-2021-125-sharpziplib","hostname":"securitylab.github.com","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2022-01-26T21:05:10.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-04-22T18:32:29.435Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"priority":{"label":"prioritise","tag":"public-exploit","reason":"Public exploit (GitHub, Date unknown)","nextStep":"Check applicability: affected before 0.86.0*, 1.3.3 (CNA); fix release not confirmed","rank":[0,0,0,1,2,73],"checkedSources":["cisa","enisa","circl","shadowserver","cisa-adp"],"evidence":[{"type":"epss","source":"FIRST","date":"2026-12-04T00:00:00.000Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"value":0.01969,"stale":false,"promoted":null},{"type":"cvss","source":"cve.org","date":"2025-04-22T18:32:29.435Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L","version":"3.1","headline":true},{"type":"cvss","source":"osv_ubuntu","date":"2025-04-22T18:32:29.435Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},{"type":"cvss","source":"osv_nuget","date":"2025-04-22T18:32:29.435Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L","version":"3.1"},{"type":"cvss","source":"nvd","date":"2025-04-22T18:32:29.435Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},{"type":"cvss","source":"nvd","date":"2025-04-22T18:32:29.435Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","version":"2.0"},{"type":"adp","source":"cisa-adp","date":"2025-04-22T15:51:52.407Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"exploitation":"poc"},{"type":"exploit","source":"github","date":null,"status":"valid","statusDate":null,"statusSource":null,"disputes":[],"maturity":"poc","verified":false}],"epss":{"value":0.01969,"date":"2026-12-04T00:00:00.000Z","stale":false,"promoted":null},"sources":[{"id":"cisa","lastSuccessfulSync":"2026-12-05T06:02:28.822Z","state":"fresh"},{"id":"enisa","lastSuccessfulSync":"2026-12-05T06:02:29.295Z","state":"fresh"},{"id":"circl","lastSuccessfulSync":"2026-12-05T06:02:29.506Z","state":"fresh"},{"id":"shadowserver","lastSuccessfulSync":null,"state":"unavailable"},{"id":"cisa-adp","lastSuccessfulSync":"2026-12-05T06:00:56.363Z","state":"fresh"},{"id":"epss","lastSuccessfulSync":"2026-12-05T06:02:27.202Z","state":"fresh"},{"id":"osv","lastSuccessfulSync":"2026-12-05T06:02:26.240Z","state":"fresh"}],"feedEvent":null},"meta":{"dataAsOf":"2026-12-05T06:40:25.119Z","stale":false,"partial":false}}