Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
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.
Primary rating from Vendor (https://github.com/XhmikosR/decompress).
CVSS VectorVendor: https://github.com/XhmikosR/decompress
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Lifecycle Timeline
2Blast Radius
ecosystem impact- 26,966 npm packages depend on decompress (1,207 direct, 25,846 indirect)
Ecosystem-wide dependent count for version 4.2.1.
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
AnalysisAI
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. …
Unlock full vulnerability intelligence
- Risk assessment & exploitation conditions
- Attack chain visualization
- Remediation with exact patch versions
- Threat intelligence from 22 sources
- Personal watchlist & email alerts
Free forever · No credit card required
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata
Vulnerability AssessmentAI
| Exploitation | 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. … Additional conditions and limiting factors are described in the full assessment. |
| Risk Assessment | 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. … Full risk analysis with EPSS, KEV, and SSVC signal comparison available after sign-in. |
| Exploit Scenario | 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. … |
| Remediation | 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). … Detailed patch versions, workarounds, and compensating controls in full report. |
Recommended ActionAI
24 hours: Identify all applications and dependencies using @xhmikosr/decompress or upstream 'decompress' package; no public exploit identified at time of analysis but vulnerability is critical and must be prioritized immediately. …
Sign in for detailed remediation steps and compensating controls.
Threat intelligence, references, and detailed analysis are available after sign-in.
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-44465
GHSA-mp2f-45pm-3cg9