SharpCompress is a fully managed C# library to deal with many compression types and formats. Versions prior to 0.29.0 are vulnerable to partial path traversal. SharpCompress recreates a hierarchy of directories under destinationDirectory if ExtractFullPath is set to true in options. In order to prevent extraction outside the destination directory the destinationFileName path is verified to begin with fullDestinationDirectoryPath. However, prior to version 0.29.0, it is not enforced that fullDestinationDirectoryPath ends with slash. If the destinationDirectory 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. This issue is fixed in SharpCompress version 0.29.0.
Published 2021-09-16 15:15:07
Updated 2021-09-28 12:40:08
Source GitHub, Inc.
View at NVD,   CVE.org
Vulnerability category: Directory traversal

Products affected by CVE-2021-39208

Exploit prediction scoring system (EPSS) score for CVE-2021-39208

0.08%
Probability of exploitation activity in the next 30 days EPSS Score History
~ 33 %
Percentile, the proportion of vulnerabilities that are scored at or less

CVSS scores for CVE-2021-39208

Base Score Base Severity CVSS Vector Exploitability Score Impact Score Score Source First Seen
4.0
MEDIUM AV:N/AC:L/Au:S/C:N/I:P/A:N
8.0
2.9
NIST
4.3
MEDIUM CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
2.8
1.4
GitHub, Inc.

CWE ids for CVE-2021-39208

  • 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: security-advisories@github.com (Primary)

References for CVE-2021-39208

Jump to
This web site uses cookies for managing your session, storing preferences, website analytics and additional purposes described in our privacy policy.
By using this web site you are agreeing to CVEdetails.com terms of use!