Arbitrary file overwrite via unchecked symlink resolution
Published Apr 21, 2026 · Updated Apr 21, 2026
Path traversal in node-modules compressing before 1.10.5 and 2.0.0 through 2.1.0 allows attackers to overwrite files via TAR extraction. The lib/utils.js isPathWithinParent() check compares path.resolve() strings without inspecting existing path segments, so fs.writeFile() follows a planted symbolic link outside the destination. Exploitation requires an existing symlink in the extraction tree, such as one restored by cloning an attacker-controlled repository, and an application that extracts attacker-controlled TAR data; writes carry the extracting process’s filesystem privileges.
Summary
What happened
Path traversal in node-modules compressing before 1.10.5 and 2.0.0 through 2.1.0 allows attackers to overwrite files via TAR extraction. The lib/utils.js isPathWithinParent() check compares path.resolve() strings without inspecting existing path segments, so fs.writeFile() follows a planted symbolic link outside the destination. Exploitation requires an existing symlink in the extraction tree, such as one restored by cloning an attacker-controlled repository, and an application that extracts attacker-controlled TAR data; writes carry the extracting process’s filesystem privileges.
The record
- CVE
- CVE-2026-40931
- Published
- Apr 21, 2026
- Updated
- Apr 21, 2026
- Vendor
- node-modules
- Product
- compressing
- Classifications
- CWE-59, T1565.001
- Attack vector
- local
- Privileges
- unauthenticated
Timeline
How it unfolded
- Apr 21, 2026CVE publishedPublication date reported by the CVE source.
- Apr 21, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=< 1.10.5
- Affected versionversion=>=2.0.0, < 2.1.1
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- compressing_poc_test Git repositoryfunctional · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo