CVE-20XX-?
agent?

CVE-2021-39208

4.3 MEDIUM 1% exploit odds Fix listed

What it is

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.

At a glance

Exploitability
Can be exploited over the network with a low-privilege account. Limited direct impact.
Exploit odds
1.2% chance of exploitation in the next 30 days (EPSS).
Fix
A patch, advisory or fixed version is referenced. Upgrade or apply it.

Timeline

  1. PublishedDisclosed publicly on CVE.org and NVD
  2. Last updatedMost recent change to the record

Why it ranks here

Details

Published
Last modified
Exploit probability
1.2% · EPSS, next 30 days
Weakness
CWE-22 · Path traversal
Record status
Modified

Affected

Attack profile CVSS 3.1 · 4.3

Attack vector
Network
Complexity
Low
Privileges needed
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None
Raw vector

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

Is it in your code?

Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.

Read https://cve-list.com/agent/cve/CVE-2021-39208.md and follow it. Check whether this project is affected by CVE-2021-39208. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.

· More options · Status badge

Meme: I wake up, CVE-2021-39208
Download Square Reddit

Fix and advisories

References

NVD record · CVE.org record