CVE-2021-32842
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.
EPSS 0.30% · 53.5th percentile
Risk Scores
Affected Products
| Vendor | Product | Versions |
|---|---|---|
| Ubuntu:14.04:LTS | mono | 0, 2.10.8.1-5ubuntu2, 3.2.3+dfsg-7ubuntu1 |
| Ubuntu:22.04:LTS | mono | 0, 6.8.0.105+dfsg-3.2 |
| Ubuntu:25.10 | mono | 0, 6.12.0.199+dfsg-6, * |
| Ubuntu:24.04:LTS | mono | *, 0, 6.8.0.105+dfsg-3.6ubuntu1 |
| Ubuntu:20.04:LTS | mono | 6.8.0.105+dfsg-2, 6.8.0.105+dfsg-1, 5.18.0.240+dfsg-3 |
| Ubuntu:16.04:LTS | mono | 0, 3.2.8+dfsg-4ubuntu4, 4.2.1.102+dfsg2-5ubuntu1 |
| Ubuntu:18.04:LTS | mono | 4.6.2.7+dfsg-1ubuntu1, 0 |
Exploit Intelligence
Timeline
- Jan 26, 2022 CVE Published
- Jan 27, 2022 EPSS Score
- Jan 27, 2022 PoC Published
- Mar 21, 2022 EPSS Score
- May 13, 2022 EPSS Score
- Jul 5, 2022 EPSS Score
- Aug 27, 2022 EPSS Score
- Oct 19, 2022 EPSS Score
- Dec 11, 2022 EPSS Score
- Feb 2, 2023 EPSS Score
- Mar 7, 2023 EPSS Score
- Mar 27, 2023 EPSS Score
References
- https://ubuntu.com/security/CVE-2021-32842 third-party-advisory
- https://securitylab.github.com/advisories/GHSL-2021-125-sharpziplib/ third-party-advisory
- https://github.com/icsharpcode/SharpZipLib/releases/tag/v1.3.3 third-party-advisory
- https://www.cve.org/CVERecord?id=CVE-2021-32842 third-party-advisory