CVE-2021-39208

Published on: 09/16/2021 12:00:00 AM UTC

Last Modified on: 09/28/2021 12:40:00 PM UTC

CVE-2021-39208 - advisory for GHSA-jp7f-grcv-6mjf

Source: Mitre Source: Nist Print: PDF PDF
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

Certain versions of Sharpcompress from Sharpcompress Project contain the following vulnerability:

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.

  • CVE-2021-39208 has been assigned by URL Logo [email protected] to track the vulnerability - currently rated as MEDIUM severity.
  • Affected Vendor/Software: URL Logo adamhathcock - sharpcompress version < 0.29.0

CVSS3 Score: 4.3 - MEDIUM

Attack
Vector
Attack
Complexity
Privileges
Required
User
Interaction
NETWORK LOW LOW NONE
Scope Confidentiality
Impact
Integrity
Impact
Availability
Impact
UNCHANGED NONE LOW NONE

CVSS2 Score: 4 - MEDIUM

Access
Vector
Access
Complexity
Authentication
NETWORK LOW SINGLE
Confidentiality
Impact
Integrity
Impact
Availability
Impact
NONE PARTIAL NONE

CVE References

Description Tags Link
Ensure destination directory exists. by adamhathcock · Pull Request #614 · adamhathcock/sharpcompress · GitHub github.com
text/html
URL Logo MISC github.com/adamhathcock/sharpcompress/pull/614
WriteEntryToDirectory used for an archive extraction is vulnerable to partial path traversal. · Advisory · adamhathcock/sharpcompress · GitHub github.com
text/html
URL Logo CONFIRM github.com/adamhathcock/sharpcompress/security/advisories/GHSA-jp7f-grcv-6mjf
Release 0.29.0 - minor behavior change and fixes · adamhathcock/sharpcompress · GitHub github.com
text/html
URL Logo MISC github.com/adamhathcock/sharpcompress/releases/tag/0.29.0

Known Affected Configurations (CPE V2.3)

Type Vendor Product Version Update Edition Language
ApplicationSharpcompress ProjectSharpcompressAllAllAllAll
  • cpe:2.3:a:sharpcompress_project:sharpcompress:*:*:*:*:*:*:*:*:

Social Mentions

Source Title Posted (UTC)
Twitter Icon @threatmeter CVE-2021-39208 SharpCompress is a fully managed C# library to deal with many compression types and formats. Version… twitter.com/i/web/status/1… 2021-09-17 07:09:46
© CVE.report 2021 Twitter Nitter Twitter Viewer |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

CVE.report and Source URL Uptime Status status.cve.report