Skip to main content
VulnerabilityPublished Updated

CVE-2026-39245: decompress · Path Traversal

Affects decompressSource CVE Database V5

0

Mentioned vulnerabilities

Not known to be exploited · CVSS 6.2 Medium : upgrade to 4.2.2 when convenient.

Data as of 26 Oct 2026, 13:47 UTC

CVSS 3.1 base score
6.2Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.3% chance of exploitation in 30 days – higher than 31% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 4.2.2
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 9 Jul 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade decompress to 4.2.2.

Affected software

ProductAffectedFixed in
npmdecompresspkg:npm/decompressOther threatsAffected
  • <4.2.2
Fixed in
  • 4.2.2

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Users should upgrade decompress to version 4.2.2 or later once available. Until then, avoid processing untrusted archives with affected versions. The vulnerability bypasses a previous fix, so relying on older patches is insufficient.

Description

decompress before 4.2.2 contains an improper path containment check that enables directory traversal and arbitrary file write. The safeMakeDir function (index.js line 29) and the extraction path validation (index.js line 106) use String.indexOf() to verify the resolved path is within the output directory: realDestinationDir.indexOf(realOutputPath) !== 0. This check is flawed because it does not enforce a path separator boundary. For example, "/tmp/app_config".indexOf("/tmp/app") returns 0, incorrectly passing the check even though /tmp/app_config is outside /tmp/app. Combined with the unvalidated symlink creation in the same package, an attacker can write arbitrary files to directories adjacent to the extraction target. This is a bypass of the fix for CVE-2020-12265. The correct check requires appending a path separator: realParentPath.indexOf(realOutputPath + path.sep) !== 0.

References

Community reviews

Loading reviews…