CVE-2025-65025 esm.sh CDN service has arbitrary file write via tarslip

High 8.2 Published Updated

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.

PackageAffectedFixed in
github.com/esm-dev/esm.sh GoAll versions0.0.0-20251117232647-9d77b88c3207
github.com/esm-dev/esm.sh GoAll versions0.0.0-20251117232647-9d77b88c3207
github.com/esm-dev/esm.sh GoAll versions0.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.

Sources

Also known as GHSA-h3mw-4f23-gwpw, GO-2025-4138.

Is CVE-2025-65025 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free