CVE Tools

CVE-2021-39208

WriteEntryToDirectory used for an archive extraction is vulnerable to partial path traversal.

No known exploitation. EPSS puts it in the 68th percentile. Fixed versions are out.

Published Updated Sources: CVE.org, NVD, GitHub

What to do

Find your product and version, then upgrade to the build on the right.

  • Adamhathcock SharpcompressAffected: < 0.29.0Upgrade to: not statedStated by: CVE record
  • NuGet SharpCompressAffected: < 0.29Upgrade to: 0.29Stated by: GitHub advisory
  • Sharpcompress Project SharpcompressAffected: < 0.29.0Upgrade to: 0.29.0Stated by: NVD

Versions as the sources state them. Full version matrix after sign-in

What it is

From the CVE record

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.

In plain language

No plain-language summary for this CVE yet.

Exploitation

Where each signal puts this CVE on the scale from published to confirmed exploited.

EPSS68th
CISA KEV

Not in the catalog. CISA has not confirmed exploitation.

Public exploits

No public exploit or proof of concept found in the sources we track.

EPSS

1.2% chance of exploitation activity in the next 30 days, which ranks it in the 68th percentile of scored CVEs.

Exploit Prediction Scoring System, FIRST.org. A probability, not a confirmation.

Lifecycle

5 events over 1162 days, from the signal feeds we watch.

  1. Patch availablerecord updated
  2. Publishedweakness classified, att&ck mapped

Affected products

And 1 more affected product. See all after sign-in

Technical detail

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

Scored 4.3 by NVD.

How it is reached

  • Attack Vector NetworkExploitable remotely over the network without any special conditions
  • Attack Complexity LowNo special conditions — the attack can be reliably reproduced
  • Privileges Required LowRequires basic user-level privileges
  • User Interaction NoneNo user interaction needed — fully automated exploitation

Scope

  • Scope UnchangedImpact is limited to the vulnerable component itself

Impact if exploited

  • Confidentiality NoneNo confidentiality impact
  • Integrity LowData modification is possible but limited in scope or consequence
  • Availability NoneNo availability impact

Weaknesses

ATT&CK techniques

Mapped from the weaknesses above (CWE to ATT&CK), not observed in attacks.

Sources

Watch the software you run.

My Stack ranks new CVEs for your products by real-world exploitation, so the next serious one reaches you without reading every advisory.

We'll flag the next CVE, public exploit or patch for Sharpcompress, not every advisory.