CVE-2026-39245

Source
https://cve.org/CVERecord?id=CVE-2026-39245
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-39245.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-39245
Downstream
Published
2026-07-09T00:00:00Z
Modified
2026-07-15T05:46:56.170708841Z
Severity
  • 6.2 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N CVSS Calculator
Summary
[none]
Details

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/appconfig".indexOf("/tmp/app") returns 0, incorrectly passing the check even though /tmp/appconfig 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.

Database specific
{
    "cna_assigner": "mitre",
    "unresolved_ranges": [
        {
            "source": "DESCRIPTION",
            "extracted_events": [
                {
                    "fixed": "4.2.2"
                }
            ]
        }
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/39xxx/CVE-2026-39245.json"
}
References

Affected packages

Git / github.com/kevva/decompress

Affected ranges

Type
GIT
Repo
https://github.com/kevva/decompress
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Database specific
{
    "source": "CPE_RANGE",
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "last_affected": "4.2.1"
        }
    ],
    "cpe": "cpe:2.3:a:decompress_project:decompress:*:*:*:*:*:node.js:*:*"
}

Affected versions

v3.*
v3.0.0
v4.*
v4.0.0
v4.1.0
v4.2.0
v4.2.1

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-39245.json"