CVE-2021-32842: SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library
CVE-2021-32842 is a medium-severity flaw (CVSS 4.0) affecting sharpziplib. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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.
Why this priority
- Public exploit reference
A fixed release or distro patch exists.
Risk facts
| CVSS score | 4.0 (Medium) |
| Attack vector | Local |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | None |
| EPSS exploit chance | 0.9% (top 41%) |
| CISA exploited list | No |
| Weakness | CWE-22 |
| Published | 2022-01-26 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2021-32842?
sharpziplib: upgrade to 1.3.3. Exact commands for each OS are on this page.
Is CVE-2021-32842 being exploited?
CVE-2021-32842 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2021-32842 affect?
CVE-2021-32842 affects sharpziplib. Severity is medium (CVSS 4.0). 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`
How urgent is CVE-2021-32842?
Priority 34/100. Public exploit reference
Related CVEs
- CVE-2021-32841 MEDIUM 4.0 UPGRADE SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library
- CVE-2021-32840 HIGH 7.3 UPGRADE SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library