CVE-2025-65025 esm.sh CDN service has arbitrary file write via tarslip
Attackers can write arbitrary files to the server via malicious NPM packages, potentially leading to code execution or data modification.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-65025?
CVE-2025-65025 is a high-severity path traversal vulnerability in esm-dev esm.sh, published on 19 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
esm.sh is a nobuild content delivery network(CDN) for modern web development. Prior to version 136, the esm.sh CDN service is vulnerable to path traversal during NPM package tarball extraction. An attacker can craft a malicious NPM package containing specially crafted file paths (e.g., package/../../tmp/evil.js). When esm.sh downloads and extracts this package, files may be written to arbitrary locations on the server, escaping the intended extraction directory. This issue has been patched in version 136.
Weakness: CWE-22
Which versions are affected by CVE-2025-65025?
3 open source packages ship an affected version, including github.com/esm-dev/esm.sh. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/esm-dev/esm.sh Go | All versions | 0.0.0-20251117232647-9d77b88c3207 |
github.com/esm-dev/esm.sh Go | All versions | 0.0.0-20251117232647-9d77b88c3207 |
github.com/esm-dev/esm.sh Go | All versions | 0.0.0-20251117232647-9d77b88c3207 |
Products include Esm Esm.sh.
How do I fix CVE-2025-65025?
Upgrade github.com/esm-dev/esm.sh to 0.0.0-20251117232647-9d77b88c3207 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2025-65025 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-65025 exists.
Other vulnerabilities in esm-dev esm.sh
- CVE-2025-50180 esm.sh is vulnerable to full-response SSRF
- CVE-2026-27730 esm.sh has SSRF localhost/private-network bypass in `/http(s)` module route
- CVE-2026-23644 esm.sh has path traversal in `extractPackageTarball` that enables file writes from malicious packages
- CVE-2025-65026 esm.sh CDN service has JS Template Literal Injection in CSS-to-JavaScript
Sources
Also known as GHSA-h3mw-4f23-gwpw, GO-2025-4138.