Vulnerability Details : CVE-2021-32841
SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library. Starting version 1.3.0 and prior to version 1.3.3, a check was added if the destination file is under destination directory. However, it is not enforced that `destDir` ends with slash. If the `destDir` is not slash terminated like `/home/user/dir` it is possible to create a file with a name thats begins with the destination 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 contains a patch for this vulnerability.
Vulnerability category: Directory traversal
Products affected by CVE-2021-32841
- cpe:2.3:a:sharpziplib_project:sharpziplib:*:*:*:*:*:*:*:*
Exploit prediction scoring system (EPSS) score for CVE-2021-32841
0.14%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 50 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2021-32841
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
5.0
|
MEDIUM | AV:N/AC:L/Au:N/C:N/I:P/A:N |
10.0
|
2.9
|
NIST | |
5.3
|
MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
3.9
|
1.4
|
NIST | |
4.0
|
MEDIUM | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
2.5
|
1.4
|
GitHub, Inc. |
CWE ids for CVE-2021-32841
-
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.Assigned by:
- nvd@nist.gov (Primary)
- security-advisories@github.com (Secondary)
References for CVE-2021-32841
-
https://github.com/icsharpcode/SharpZipLib/releases/tag/v1.3.3
Release v1.3.3 · icsharpcode/SharpZipLib · GitHubRelease Notes;Third Party Advisory
-
https://github.com/icsharpcode/SharpZipLib/commit/5c3b293de5d65b108e7f2cd0ea8f81c1b8273f78
fix: specialized tar extract traversal · icsharpcode/SharpZipLib@5c3b293 · GitHubPatch;Third Party Advisory
-
https://securitylab.github.com/advisories/GHSL-2021-125-sharpziplib/
GHSL-2021-125: Path traversal in SharpZipLib - CVE-2021-32840, CVE-2021-32841, CVE-2021-32842 | GitHub Security LabExploit;Third Party Advisory
Jump to