Arbitrary file write via unchecked tar paths
Published Nov 19, 2025 · Updated Nov 20, 2025
Path traversal in esm.sh before 136 allows remote attackers to write files outside the package cache through a crafted NPM tarball. extractPackageTarball strips the archive root, joins the remaining member name to pkgDir without containment validation, and opens the normalized path for truncating writes. The request needs no authentication but must supply an X-Npmrc header that points to an attacker-controlled registry; overwritten cached modules can deliver attacker code to downstream importers.
Summary
What happened
Path traversal in esm.sh before 136 allows remote attackers to write files outside the package cache through a crafted NPM tarball. extractPackageTarball strips the archive root, joins the remaining member name to pkgDir without containment validation, and opens the normalized path for truncating writes. The request needs no authentication but must supply an X-Npmrc header that points to an attacker-controlled registry; overwritten cached modules can deliver attacker code to downstream importers.
The record
- CVE
- CVE-2025-65025
- Published
- Nov 19, 2025
- Updated
- Nov 20, 2025
- Vendor
- esm-dev
- Product
- esm.sh
- Classifications
- CWE-22, T1195.002
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Nov 19, 2025CVE publishedPublication date reported by the CVE source.
- Nov 20, 2025Record 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=< 136
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
- Upstream tar-slip proof of conceptproof of concept · 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