Skip to main content

decompress (npm) EUVDEUVD-2026-44465

| CVE-2026-53486 CRITICAL
Path Traversal (CWE-22)
2026-07-06 https://github.com/XhmikosR/decompress GHSA-mp2f-45pm-3cg9
9.1
CVSS 3.1 · Vendor: https://github.com/XhmikosR/decompress
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply malicious archive to target
  2. Delivery
    Service downloads untrusted archive
  3. Exploit
    Extraction writes crafted link/setuid entries
  4. Execution
    Hardlink exposes readable file, symlink escapes via prefix bypass
  5. Persist
    Plant setuid binary when run as root
  6. Impact
    Read secrets or escalate privileges

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target application extracts an attacker-controlled or attacker-influenced archive using vulnerable @xhmikosr/decompress (<10.2.1 or <11.1.3) or any upstream decompress (<=4.2.1); this applies to the default handlers for tar, tar.gz, tar.bz2, and zip, plus any format enabled via the plugins option. The concrete crafted-entry prerequisites are: a hardlink entry (to read arbitrary process-readable files), a symlink entry pointing outside the output directory (to redirect a later write), an output directory that has a name-prefixed sibling such as /srv/out with /srv/out-old present (to abuse the indexOf prefix-check bypass), and - for the SUID/SGID escalation path specifically - extraction performed as root. Limiting factors that reduce real-world risk: the flaw is only reachable if the consuming app unpacks untrusted archives (not a default remote-service listener), the privileged-file impact is neutralized when extraction runs as a non-root user, and the sibling-directory escape needs a directory whose name shares the output path's prefix.

Impact

The CVSS 3.1 base score is 9.1 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N), reflecting high confidentiality and integrity impact with no privileges or user interaction in the CVSS model. In practice the 'network, no user interaction' rating is optimistic for a library: exploitation depends on the consuming application actually extracting an attacker-influenced archive, so realized attack complexity varies by how the dependency is used - a limiting factor the raw score does not capture. No EPSS score, KEV listing, or SSVC decision data was provided, so exploitation probability cannot be quantified from the input; there is no public exploit identified at time of analysis. However, the vendor documents a directly analogous upstream flaw (CVE-2020-12265 / GHSA-qgfr-5hqp-vrw9) with the same escape mechanism, which materially raises real-world plausibility. The setuid/setgid angle sharply escalates impact specifically when extraction runs as root (CI, containers, install scripts), turning a path-traversal write into potential privilege escalation. Net assessment: a genuine high priority for any service that unpacks untrusted archives, moderated by the fact that safe-usage patterns (trusted archives only, non-root extraction) neutralize much of the risk.

Exploit ScenarioDerived

An attacker hosts or supplies a malicious archive that a target service downloads and extracts using a vulnerable decompress version. The archive contains a hardlink entry pointing at /etc/shadow (exposing its contents in the output) plus a symlink and a setuid binary entry; when the service extracts as root in a CI runner or container, the attacker reads sensitive files, writes into a sibling directory via the prefix-check bypass, and plants a SUID executable for privilege escalation. No public POC is identified for this specific CVE, but the mechanism mirrors the previously exploited upstream CVE-2020-12265.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 06, 2026

Arbitrary file read and write via archive extraction in the Node.js @xhmikosr/decompress library (and the unmaintained upstream decompress package) lets a crafted tar, tar.gz, tar.bz2, or zip archive escape the intended output directory. The flaw combines unchecked hardlink/symlink targets, a broken string-prefix containment check that allows escape into sibling directories, and mode application that preserves setuid/setgid/sticky bits - enabling attackers to read sensitive files, overwrite files outside the target, and plant privileged binaries when extraction runs as root. No public exploit identified at time of analysis, but the closely related upstream CVE-2020-12265 demonstrates the exploitability of this class.

RemediationAI

Vendor-released patch: upgrade @xhmikosr/decompress to 10.2.1 or 11.1.3 (or later), which resolve link targets and enforce containment with path.relative and strip setuid/setgid/sticky bits (release notes: https://github.com/XhmikosR/decompress/releases/tag/v10.2.1 and https://github.com/XhmikosR/decompress/releases/tag/v11.1.3; fix commits aca5aac, 281cefa, 60b5299). Projects still depending on the unmaintained upstream decompress package (all versions through 4.2.1 are vulnerable and no upstream fix exists) must migrate to @xhmikosr/decompress 11.1.3 or later rather than pinning a patch. Where immediate upgrade is not possible, extract only archives from trusted sources; run extraction as a non-root, low-privilege user so a crafted entry cannot create a privileged setuid/setgid file (trade-off: none significant, but requires adjusting service/user context); and post-process the output to reject any symlink or hardlink whose resolved target falls outside the target directory and any file carrying unexpected mode bits (trade-off: added validation logic and slight extraction overhead). See the advisory at https://github.com/XhmikosR/decompress/security/advisories/GHSA-mp2f-45pm-3cg9.

Affected VersionsENISA

decompress < 10.2.1
decompress 11.0.0, < 11.1.3

Affected Packages

npm @xhmikosr/decompress fix: 10.2.1, 11.1.3
npm decompress fix: 10.2.1, 11.1.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The affected component is a JavaScript archive-decompression library commonly used as a direct or transitive npm dependency to unpack tarballs and zip files, dispatching to format plugins (tar, gzip, bzip2, zip). The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) in the entry-writing stage: (1) hardlink and symlink entries are materialized without validating where their targets point, so a hardlink can reference any file the process can read and a symlink can redirect a subsequent write outside the tree; (2) the containment guard used realPath.indexOf(outputPath) !== 0, a naive string-prefix test that wrongly accepts /srv/out-old as inside /srv/out, permitting escape into name-prefixed sibling directories; and (3) file modes were applied as mode & ~umask, which fails to strip setuid/setgid/sticky bits, allowing an archive to create SUID/SGID files. CPE data confirms the affected packages are pkg:npm/@xhmikosr_decompress and pkg:npm/decompress.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/XhmikosR/decompress) PRIMARY 9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 9.1 CRITICAL

Malicious archive reaches the parser over the network with no auth in the CVSS model (AV:N/PR:N/UI:N); hardlink read gives C:H and out-of-tree/setuid write gives I:H, with no direct availability loss.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE 7.4 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Red Hat 8.1 HIGH

Primary rating from Vendor (https://github.com/XhmikosR/decompress).

CVSS VectorVendor: https://github.com/XhmikosR/decompress

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

DescriptionCVE.org

Impact

When extracting an archive to a directory, a crafted archive can read or write files outside that directory. The flaw is in the code that writes the parsed entries, so it affects every format decompress handles: tar, tar.gz, tar.bz2, and zip by default, plus any others added through the plugins option.

A link (hardlink) or symlink entry is created without checking where its target points. A hardlink can be aimed at any file the running process can read; that file then appears inside the output directory and its contents are exposed. A symlink can point outside the output directory and redirect a later write.

The path containment check used a string prefix comparison (realPath.indexOf(outputPath) !== 0). Output /srv/out does not contain /srv/out-old, but the prefix comparison treats it as inside, so an entry can escape into a sibling directory whose name starts with the output directory name.

File modes were applied as mode & ~umask, which does not remove the setuid, setgid, or sticky bits. A crafted entry can create a setuid or setgid file. This matters when extraction runs as root, for example in CI, containers, or install scripts.

Any code that extracts archives from an untrusted or attacker-influenced source is affected. Archives are commonly downloaded before extraction, so this is reachable over the network in many setups.

Patches

Fixed in @xhmikosr/decompress 10.2.1 and 11.1.3. Link targets are now resolved and checked against the output directory, containment uses path.relative, and setuid, setgid, and sticky bits are removed.

The upstream decompress package is unmaintained, and all versions through its last release (4.2.1) have the same flaws. There is no upstream fix. Migrate to @xhmikosr/decompress 11.1.3 or later.

Workarounds

Extract only archives you trust. Run extraction as a non-root user so the mode issue cannot create a privileged file. After extracting, reject any symlink or hardlink that points outside the target and any file with unexpected mode bits.

Resources

  • Related prior issue in the upstream project this package forks: CVE-2020-12265 / GHSA-qgfr-5hqp-vrw9
  • Fix commits and releases:
  • https://github.com/XhmikosR/decompress/releases/tag/v10.2.1
  • https://github.com/XhmikosR/decompress/releases/tag/v11.1.3
  • https://github.com/XhmikosR/decompress/commit/aca5aac
  • https://github.com/XhmikosR/decompress/commit/281cefa
  • https://github.com/XhmikosR/decompress/commit/60b5299

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 26,670 npm packages depend on decompress (1,218 direct, 25,542 indirect)

Ecosystem-wide dependent count for version 4.2.1.

Executive ViewAI

Why It Matters

The @xhmikosr/decompress library contains a critical archive extraction vulnerability enabling attackers to read sensitive files and write arbitrary files outside the intended directory, including planting privileged binaries when extraction runs with root privileges. Organizations using this library in production-particularly those processing untrusted archive uploads-face immediate risk of unauthorized data access and system compromise.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.6%
Top 56% exploitable
Prevalence
High
widely-used npm archive-extraction library, common transitive dependency in Node builds
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity + public POC available
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

67
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +46
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 12 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy