CVE-2026-39245
mediumpriority · track · 0EPSS 0.004 · 30 %ileEUUSEPSS · scored 2026-10-23
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (2)
Products and version ranges known to be affected.
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (12)
External citations — patches, advisories, analysis.
- https://github.com/kevva/decompresscnnvd
- https://github.com/kevva/decompress/issues/115cnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2020-12265cnnvd
- https://www.npmjs.com/package/decompresscnnvd
- https://github.com/kevva/decompressenisa_euvd
- https://github.com/kevva/decompress/issues/115enisa_euvd
- https://nvd.nist.gov/vuln/detail/CVE-2020-12265enisa_euvd
- https://www.npmjs.com/package/decompressenisa_euvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan