Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2021-39208

published medium CVSS 3.1 · 4.3

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

Published
16 Sep 2021, 14:35:11 UTC
Updated
04 Aug 2024, 01:58:18 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
adamhathcock — sharpcompress< 0.29.0 Affected Not stated GitHub_M

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.

en · GitHub_M · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
4.3 / 10
Severity
medium
Provider
GitHub_M · cna
Vector string
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
adamhathcock sharpcompress < 0.29.0 (affected) GitHub_M · cna

Weaknesses

1
  • CWE-22 CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (GitHub_M · cna)

References

3

Provider assertions

2

GitHub_M · cna

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

CVE · adp

CVE Program Container

Provenance

Schema
5.1
Searchable
yes
Content hash
1cd9a6163c4b1c27a4cedef761b10e3a08c27dade16e1c238e5d6406c21a72f1
Ingested
23 Sep 2026, 07:55:36 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected