<Vulnerability name="CVE-2026-39246">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Important</ThreatSeverity>
    <PublicDate>2026-07-09T00:00:00</PublicDate>
    <Bugzilla id="2498840" url="https://bugzilla.redhat.com/show_bug.cgi?id=2498840" xml:lang="en:us">
decompress: decompress: arbitrary symlink creation during archive extraction leads to information disclosure
    </Bugzilla>
    <CVSS3 status="draft">
        <CVSS3BaseScore>7.5</CVSS3BaseScore>
        <CVSS3ScoringVector>CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N</CVSS3ScoringVector>
    </CVSS3>
    <CWE>CWE-61</CWE>
    <Details xml:lang="en:us" source="Mitre">
decompress before 4.2.2 allows arbitrary symlink creation during archive extraction. When processing symlink entries (type === 'symlink'), the x.linkname field from the archive is passed directly to fs.symlink() without validation (index.js line 121). The preventWritingThroughSymlink check on line 98 only applies to file entries, not symlink creation. An attacker can craft an archive with symlink entries pointing to sensitive files outside the extraction directory (e.g., /etc/passwd), enabling information disclosure when the application reads the extracted contents.
    </Details>
    <Details xml:lang="en:us" source="Red Hat">
A flaw was found in the decompress package for Node.js. The package creates symlinks from archive entries during extraction without validating the link target against the output directory, because the existing containment check only applies to regular file entries. An attacker who can supply a crafted archive for extraction can create a symlink pointing outside the output directory (for example to /etc/passwd), leading to disclosure of arbitrary files readable by the extracting process when the application later reads the extracted content.
    </Details>
    <Statement xml:lang="en:us">
The decompress npm package (all releases through 4.2.1, the last upstream release) is vulnerable to arbitrary symlink creation during archive extraction. When processing a symlink-type entry, decompress passes the entry's link target (x.linkname) directly to fs.symlink() without validating it against the extraction output directory; the existing preventWritingThroughSymlink containment check added for CVE-2020-12265 only applies to regular file entries, not symlink entries. An attacker who can supply a crafted archive for extraction (for example a malicious package tarball or user-uploaded archive) can create a symlink inside the output directory that points to an arbitrary path such as /etc/passwd. If the extracting application subsequently reads or serves the extracted files, the attacker can achieve disclosure of any file readable by the extracting process, and in combination with a later write to the same symlinked path, potentially write through the link as well. The upstream decompress package is unmaintained and no fix has been released; the maintained fork @xhmikosr/decompress resolves this in 10.2.1 and 11.1.3 by validating link targets against the output directory before creating them.
    </Statement>
    <Mitigation xml:lang="en:us">
Do not use decompress to extract archives from untrusted sources. Where extraction of externally-supplied or otherwise untrusted archives is required, migrate to the maintained fork @xhmikosr/decompress (&gt;= 10.2.1 or &gt;= 11.1.3), which validates symlink and hardlink targets against the output directory before creating them. As an interim mitigation, run extraction as a non-privileged, sandboxed process and reject any archive containing symlink or hardlink entries before extraction.
    </Mitigation>
    <PackageState cpe="cpe:/a:redhat:acm:2">
        <ProductName>Red Hat Advanced Cluster Management for Kubernetes 2</ProductName>
        <FixState>Will not fix</FixState>
        <PackageName>rhacm2/volsync-operator-bundle</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:acm:2">
        <ProductName>Red Hat Advanced Cluster Management for Kubernetes 2</ProductName>
        <FixState>Will not fix</FixState>
        <PackageName>rhacm2/volsync-rhel9</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:build_keycloak:">
        <ProductName>Red Hat Build of Keycloak</ProductName>
        <FixState>Affected</FixState>
        <PackageName>decompress</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <FixState>Affected</FixState>
        <PackageName>dotnet8.0</PackageName>
    </PackageState>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2026-39246
https://nvd.nist.gov/vuln/detail/CVE-2026-39246
https://github.com/kevva/decompress
https://github.com/kevva/decompress/issues/114
https://www.npmjs.com/package/decompress
    </References>
</Vulnerability>