CVE-2026-39245: n/a
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.
AI Analysis
Technical Summary
CVE-2026-39245 affects decompress versions prior to 4.2.2. The vulnerability arises from an improper path containment check in the safeMakeDir function and extraction path validation in index.js. The check uses realDestinationDir.indexOf(realOutputPath) !== 0, which is flawed because it does not enforce a path separator boundary, allowing directory traversal. For example, a path like "/tmp/app_config" incorrectly passes the check for "/tmp/app". Combined with unvalidated symlink creation, this allows arbitrary file writes outside the intended extraction directory. This vulnerability bypasses the fix implemented for CVE-2020-12265. No official remediation level or patch link is provided in the data.
Potential Impact
An attacker can exploit this vulnerability to perform directory traversal and write arbitrary files to directories adjacent to the extraction target. This can lead to unauthorized modification of files, potentially impacting system integrity. The CVSS vector indicates local attack vector with low complexity, no privileges required, no user interaction, unchanged scope, no confidentiality impact, high integrity impact, and no availability impact.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. 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.
CVE-2026-39245: n/a
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.
CVSS v3.1
Score 6.2medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-39245 affects decompress versions prior to 4.2.2. The vulnerability arises from an improper path containment check in the safeMakeDir function and extraction path validation in index.js. The check uses realDestinationDir.indexOf(realOutputPath) !== 0, which is flawed because it does not enforce a path separator boundary, allowing directory traversal. For example, a path like "/tmp/app_config" incorrectly passes the check for "/tmp/app". Combined with unvalidated symlink creation, this allows arbitrary file writes outside the intended extraction directory. This vulnerability bypasses the fix implemented for CVE-2020-12265. No official remediation level or patch link is provided in the data.
Potential Impact
An attacker can exploit this vulnerability to perform directory traversal and write arbitrary files to directories adjacent to the extraction target. This can lead to unauthorized modification of files, potentially impacting system integrity. The CVSS vector indicates local attack vector with low complexity, no privileges required, no user interaction, unchanged scope, no confidentiality impact, high integrity impact, and no availability impact.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. 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.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- mitre
- Date Reserved
- 2026-04-06T00:00:00.000Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a50171468715ace431ea18d
Added to database: 07/09/2026, 21:48:04 UTC
Last enriched: 07/17/2026, 09:48:44 UTC
Last updated: 08/23/2026, 22:52:10 UTC
Views: 98
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.