VDB

CVE-2021-32842

CVE-2021-32842 PUBLISHED CVSS 4 MEDIUM

Path Traversal in SharpZipLib

Reported by github_m · Published January 26, 2022

SharpZipLib is fixed in 1.3.3 (NuGet)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
SharpZipLibNuGet1.3.3
sharpziplibsharpziplib_project1.3.3
sharpziplibicsharpcode1.3.3

Risk scores

CVSS 3.1
4
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Affected products

VendorProductVersions
icsharpcodesharpziplib1.3.3, 1.0.0
NuGetSharpZipLib1.0.0
icsharpcodesharpziplib1.3.3, 1.0.0

Timeline

  • Jan 26, 2022 CVE Published
  • Jan 27, 2022 EPSS Score (30 in total, the first dated here)
  • Jan 27, 2022 PoC Published
  • Jan 20, 2026 CVE Updated
  • Mar 17, 2026 Security Advisory
  • Aug 1, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2021-32842
vulnetix vdb fixes CVE-2021-32842

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-32842/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›