CVE-2026-39245
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.
Weakness
- CWE-22: Improper Limitation of a Pathname to a Restricted Directory
CISA SSVC decision points
| Exploitation | poc |
|---|---|
| Automatable | no |
| Technical impact | partial |
| Scored | 2026-07-10 |
Timeline
- 2026-07-09Published by the CNA00:00 UTC
- 2026-07-10CISA SSVC decision recorded1 day after publication
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| decompress_project decompress | through 4.2.1no fix listed | not listed |
References
- https://github.com/kevva/decompress/issues/115
- https://github.com/kevva/decompress
- https://nvd.nist.gov/vuln/detail/CVE-2020-12265
- https://www.npmjs.com/package/decompress
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-39245'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-39245'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-39245'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-39245'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).