Cloudanix VulnDB

CVE-2025-65025

High · 8.2

esm.sh CDN service has arbitrary file write via tarslip

CVSS

8.2

EPSS

0.6%

Published

Nov 19, 2025

CISA due date

—

The record

The esm.sh CDN service is vulnerable to a Path Traversal (CWE-22) vulnerability 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. Uploading files containing `../` in the path is not allowed on official registries (npm, GitHub), but the `X-Npmrc` header allows specifying any arbitrary registry. By setting the registry to an attacker-controlled server via the `X-Npmrc` header, this vulnerability can be triggered.

Affected packages

Ecosystem Package Introduced Fixed
Go github.com/esm-dev/esm.sh 0 0.0.0-20251117232647-9d77b88c3207
SUSE:Linux Enterprise Module for Package Hub 15 SP6 govulncheck-vulndb 0 0.0.20251209T172047-150000.1.127.1
openSUSE:Leap 15.6 govulncheck-vulndb 0 0.0.20251209T172047-150000.1.127.1

Related vulnerabilities