CVE-2026-39243
Medium · 5.5CVSS
5.5
EPSS
0.3%
Published
Jul 9, 2026
CISA due date
—
Cloudanix analysis
A flaw in a common file-extraction tool lets a specially made archive read or change other files on the same computer when the archive is unpacked.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Library
- Class
- Path Traversal
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
During tar/zip extraction the library passes attacker-controlled absolute linkname values directly to fs.link(), creating hardlinks inside the destination directory that share inodes with arbitrary files on the same filesystem, allowing both read disclosure and content corruption of those files.
Why it matters to the business
Attackers who supply a malicious archive can read or silently alter sensitive files on the same filesystem as the extraction directory, leading to data leakage or corruption without requiring elevated privileges.
How an attack unfolds
An attacker crafts a tar archive containing a hardlink entry whose linkname is an absolute path to a target file on the victim filesystem. When decompress extracts the archive it calls fs.link() with that linkname, creating a hardlink inside the extraction tree. The attacker then reads or overwrites the linked file through the newly created hardlink.
How to fix it
Upgrade decompress to version 4.2.2 or later; if immediate upgrade is not possible, validate or sanitize linkname entries before extraction and restrict extraction to a dedicated filesystem or chroot environment.
How to confirm the fix worked
Confirm the installed version is 4.2.2 or newer; test extraction of an archive containing an absolute hardlink and verify that no hardlink is created outside the extraction directory.
Typical attack path
- attacker prepares malicious archive with crafted hardlink entry
- victim application extracts the archive using vulnerable decompress
- library creates hardlink pointing to arbitrary target file
- attacker reads or modifies the target file via the hardlink
How to detect it
Review application logs for extraction of archives containing link entries with absolute paths; inspect file-system audit logs for unexpected hardlink creation events around extraction timestamps.
What your security team should do
- Immediately upgrade decompress to 4.2.2 or later across all affected applications
- Add archive extraction to the list of untrusted-input processing that requires sandboxing or dedicated low-privilege accounts
- Monitor dependency updates for future path-traversal or link-related fixes
The record
decompress before 4.2.2 allows arbitrary hardlink creation during archive extraction, enabling file read disclosure and file corruption. When processing hardlink entries (type === 'link'), the x.linkname field from the archive is passed directly to fs.link() without validation (index.js line 113). An attacker can craft an archive with a hardlink entry whose linkname is an absolute path to any file on the same filesystem. This creates a hardlink inside the extraction directory that shares the same inode as the target file, enabling both reading and overwriting the original file's content. Hardlinks are limited to files on the same filesystem and cannot target directories.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-64672 Terragrunt is a flexible orchestration tool that allows Infrastructure as Code written in… CWE-59
- CVE-2026-121224 Security issue in Desktop in Google Chrome on on Mac prior to 157.0.8103.38 allowed a… CWE-59
- CVE-2026-88968 Claude Code is an agentic coding tool. CWE-59
- CVE-2026-63395 isomorphic-git is a pure JavaScript implementation of Git for Node.js and browsers. CWE-59
- CVE-2026-119673 MongoDB Database Tools mongofiles does not resolve existing parent-directory symlinks… CWE-59
- CVE-2026-103916 Docker Sandboxes sbx cp does not safely confine host-side paths to a shared workspace. CWE-59
- CVE-2026-121546 ruTorrent before 5.3.20 contains a path traversal vulnerability in the datadir plugin… CWE-59
- CVE-2026-121550 nnn through 5.3 contains an insecure file handling vulnerability that allows local… CWE-59