Skip to main content

Over 150 LLM Providers · Over 5,300 Models The most extensible AI-powered pentesting platform. Open source. Star on GitHub

CVE-2021-39208

4.3 · MEDIUM
Published Sep 16, 2021 sharpcompress_project CWE-22 EPSS 1.19% (66th pctl)

Overview

CVE-2021-39208 is a medium-severity vulnerability affecting sharpcompress_project sharpcompress. It was published on September 16, 2021 and has a CVSS 3.1 base score of 4.3 (MEDIUM).

This vulnerability has a CVSS 3.1 base score of 4.3, rated MEDIUM. It can be exploited remotely over the network. Some level of privileges is required for exploitation.

Technical Description

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.

Remediation

Check the references section for vendor advisories and patches from sharpcompress_project. Update sharpcompress to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Affected Products

Vendor Product Versions Status
sharpcompress_project sharpcompress >= 0, < 0.29.0 Affected

Frequently Asked Questions

What is CVE-2021-39208?

CVE-2021-39208 is a medium-severity vulnerability affecting sharpcompress_project sharpcompress. It was published on September 16, 2021 and has a CVSS 3.1 base score of 4.3 (MEDIUM).

How severe is CVE-2021-39208?

This vulnerability has a CVSS 3.1 base score of 4.3, rated MEDIUM. It can be exploited remotely over the network. Some level of privileges is required for exploitation.

How do I fix or remediate CVE-2021-39208?

Check the references section for vendor advisories and patches from sharpcompress_project. Update sharpcompress to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2021-39208?

CyberStrike's AI-powered security agents can automatically detect CVE-2021-39208 across your infrastructure using autonomous pentesting, DAST scanning, and HackBrowser. The platform continuously monitors for known vulnerabilities and provides actionable remediation guidance prioritized by real-world exploitability.