Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/esm-dev/esm.sh
  4. ›
  5. CVE-2025-65025

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

November 19, 2025

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.

References

  • github.com/advisories/GHSA-h3mw-4f23-gwpw
  • github.com/esm-dev/esm.sh
  • github.com/esm-dev/esm.sh/commit/9d77b88c320733ff6689d938d85d246a3af9af16
  • github.com/esm-dev/esm.sh/security/advisories/GHSA-h3mw-4f23-gwpw
  • nvd.nist.gov/vuln/detail/CVE-2025-65025

Code Behaviors & Features

Detect and mitigate CVE-2025-65025 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.0.0-20251117232647-9d77b88c3207

Fixed versions

  • 0.0.0-20251117232647-9d77b88c3207

Solution

Upgrade to version 0.0.0-20251117232647-9d77b88c3207 or above.

Impact 8.2 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

go/github.com/esm-dev/esm.sh/CVE-2025-65025.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 24 Nov 2025 00:19:24 +0000.