Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-65025: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in esm-dev esm.sh

0
High
VulnerabilityCVE-2025-65025cvecve-2025-65025cwe-22
Published: Wed Nov 19 2025 (11/19/2025, 17:32:46 UTC)
Source: CVE Database V5
Vendor/Project: esm-dev
Product: esm.sh

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.

AI-Powered Analysis

AILast updated: 11/26/2025, 18:56:28 UTC

Technical Analysis

CVE-2025-65025 is a path traversal vulnerability classified under CWE-22 affecting esm.sh, a no-build CDN service used for modern web development. The vulnerability exists in esm.sh versions prior to 136 during the extraction of NPM package tarballs. An attacker can craft a malicious NPM package containing file paths with directory traversal sequences such as "package/../../tmp/evil.js". When esm.sh downloads and extracts this package, it fails to properly sanitize or restrict the extraction paths, allowing files to be written outside the intended directory. This improper limitation of pathname can lead to arbitrary file writes on the server hosting esm.sh. The vulnerability can be exploited remotely without any authentication or user interaction, increasing its risk profile. The impact primarily affects the integrity of the server, as attackers can overwrite or place malicious files that may be used for further compromise or persistence. The vulnerability has been assigned a CVSS 3.1 score of 8.2, indicating high severity, with network attack vector, low attack complexity, no privileges required, and no user interaction needed. Although no exploits have been reported in the wild yet, the potential for damage is significant, especially for organizations relying on esm.sh for package delivery. The issue was patched in version 136 of esm.sh, and users are strongly advised to upgrade to this or later versions to remediate the vulnerability.

Potential Impact

For European organizations, the exploitation of CVE-2025-65025 could lead to unauthorized file writes on servers hosting esm.sh or integrated into their development pipelines. This can compromise the integrity of the development environment, potentially allowing attackers to inject malicious scripts or backdoors that could propagate into production systems. Given esm.sh's role as a CDN for modern web development, compromised servers could affect the supply chain of web applications, leading to widespread impact. The vulnerability does not directly affect confidentiality or availability but poses a high risk to integrity, which can indirectly impact confidentiality if malicious code is introduced. Organizations using esm.sh in continuous integration/continuous deployment (CI/CD) pipelines or as part of their package management infrastructure are particularly at risk. The lack of required authentication and user interaction means attackers can exploit this remotely and at scale. This could lead to reputational damage, regulatory compliance issues under GDPR if customer data is indirectly affected, and operational disruptions if malicious files cause failures or require remediation.

Mitigation Recommendations

The primary mitigation is to upgrade esm.sh to version 136 or later, where the path traversal vulnerability has been patched. Organizations should audit their use of esm.sh and ensure no legacy versions are in operation. Additionally, implement strict file system permissions on servers running esm.sh to limit the directories where files can be written, minimizing the impact of any potential exploitation. Employ monitoring and alerting for unusual file system changes, especially outside expected directories, to detect exploitation attempts early. Integrate integrity checking tools to verify the authenticity and expected structure of NPM packages before extraction. Consider sandboxing the extraction process to isolate it from critical system components. Finally, review and tighten supply chain security practices around third-party package usage to reduce the risk of malicious package introduction.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2025-11-13T15:36:51.682Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 691e026693c808727dc91d17

Added to database: 11/19/2025, 5:46:14 PM

Last enriched: 11/26/2025, 6:56:28 PM

Last updated: 1/7/2026, 4:54:00 AM

Views: 31

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats