CVE-2026-39245

MEDIUM CVSS 3.1: 6.2 EPSS 0.38%
Updated Jul 13, 2026
Decompress_Project
Parameter Value
CVSS 6.2 (MEDIUM)
Affected Versions before 4.2.1
Type CWE-22 (Path Traversal)
Vendor Decompress_Project
Public PoC No

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.

Attack Parameters

Attack Vector
Local
Requires local access
Attack Complexity
Low
Easy to exploit
Privileges Required
None
No privileges needed
User Interaction
None
No user interaction needed

Impact Assessment

Confidentiality
None
No data leak
Integrity
High
Complete data modification
Availability
None
No disruption

CVSS Vector v3.1

Weakness Type (CWE)

Vulnerable Products 1

Configuration From (including) Up to (excluding)
Decompress_Project Decompress
cpe:2.3:a:decompress_project:decompress:*:*:*:*:*:node.js:*:*
— <= 4.2.1