{"schemaVersion":3,"id":"CVE-2021-32840","aliases":["UBUNTU-CVE-2021-32840","GHSA-m22m-h4rf-pwq3"],"status":"published","duplicateOf":null,"title":null,"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.01906,"percentile":0.79462,"severity":"low","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":-0.06700000000000005,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.01973},"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":0.79462}],"last30":[{"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":0.79462}]},"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 ('Path Traversal')","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}],"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},{"text":"≥ 0.86.0, < 0.86.0*","noFixRecorded":false,"fixedIn":null}],"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}],"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}],"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}],"risk":{"score":70,"level":"high","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T05:24:49.403Z","stale":false,"partial":false}}