Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-65025

CVE-2025-65025: Esm.sh Path Traversal Vulnerability

CVE-2025-65025 is a path traversal vulnerability in Esm.sh CDN that allows attackers to write files to arbitrary server locations during NPM package extraction. This post covers technical details, affected versions, and mitigation.

Published: March 11, 2026

CVE-2025-65025 Overview

CVE-2025-65025 is a critical path traversal vulnerability affecting esm.sh, a nobuild content delivery network (CDN) designed 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.

Critical Impact

This vulnerability allows attackers to write arbitrary files to the server filesystem, potentially enabling remote code execution, configuration tampering, or complete server compromise through malicious NPM package uploads.

Affected Products

  • esm.sh versions prior to 136
  • esm:esm.sh (all versions before security patch)
  • esm.sh CDN services processing untrusted NPM packages

Discovery Timeline

  • 2025-11-19 - CVE-2025-65025 published to NVD
  • 2026-01-15 - Last updated in NVD database

Technical Details for CVE-2025-65025

Vulnerability Analysis

This path traversal vulnerability exists in the NPM package extraction functionality within esm.sh's server-side code. The vulnerability arises from improper sanitization of file paths contained within NPM package tarballs during extraction. When processing incoming packages, the server concatenates the extraction directory with the filename from the tarball header without properly validating or cleaning the path components.

An attacker can exploit this by publishing a malicious NPM package where internal file paths include directory traversal sequences such as ../. When esm.sh extracts this package, these sequences are preserved, allowing file writes outside the designated package directory. This can lead to overwriting critical configuration files, injecting malicious scripts into web-accessible directories, or achieving remote code execution by writing to executable locations.

Root Cause

The root cause stems from the direct use of untrusted file names from the tarball header (h.Name) when constructing the destination file path. The original code in server/npmrc.go joined the package directory with the extracted filename without applying path normalization, allowing traversal sequences to escape the intended directory boundary.

Attack Vector

The attack vector is network-based, requiring no authentication or user interaction. An attacker can:

  1. Create a malicious NPM package with files containing path traversal sequences
  2. Publish the package to NPM registry or host it on a malicious registry
  3. Trigger esm.sh to fetch and extract the malicious package
  4. Achieve arbitrary file write on the esm.sh server infrastructure

The following patch from GitHub Commit 9d77b88 demonstrates the fix:

go
 		}
 		// strip tarball root dir
 		_, name := utils.SplitByFirstByte(h.Name, '/')
-		filename := path.Join(pkgDir, name)
+		filename := path.Join(pkgDir, path.Clean(name))
 		if h.Typeflag != tar.TypeReg {
 			continue
 		}

Source: GitHub Commit 9d77b88

The fix applies path.Clean() to sanitize the filename before path construction, removing any .. sequences and normalizing the path to prevent directory escape.

Detection Methods for CVE-2025-65025

Indicators of Compromise

  • Unexpected files appearing outside NPM package extraction directories
  • Modified system or configuration files with recent timestamps coinciding with package extraction operations
  • Log entries showing package downloads from untrusted or suspicious NPM registries
  • Files with names containing encoded path traversal patterns in package metadata

Detection Strategies

  • Monitor file system write operations originating from the esm.sh process for paths outside expected extraction directories
  • Implement file integrity monitoring (FIM) on critical server directories
  • Analyze NPM package contents before extraction for suspicious path patterns using automated scanning
  • Review access logs for unusual package fetch requests or patterns

Monitoring Recommendations

  • Configure alerts for any file modifications in system directories triggered by the CDN service
  • Implement logging and auditing of all NPM package extraction operations with full path information
  • Deploy runtime application self-protection (RASP) solutions to detect and block path traversal attempts
  • Monitor for unexpected process spawning or network connections following package extraction events

How to Mitigate CVE-2025-65025

Immediate Actions Required

  • Upgrade esm.sh to version 136 or later immediately
  • Review server filesystems for any unauthorized files written outside package directories
  • Audit recently processed NPM packages for malicious path traversal payloads
  • Restrict access to the esm.sh service until patching is complete if public-facing

Patch Information

This vulnerability has been patched in esm.sh version 136. The fix is available in GitHub Commit 9d77b88. For complete details, refer to the GitHub Security Advisory GHSA-h3mw-4f23-gwpw.

Workarounds

  • If immediate patching is not possible, implement a Web Application Firewall (WAF) rule to inspect and reject packages containing traversal sequences
  • Restrict esm.sh to only process packages from trusted NPM registries
  • Run the esm.sh service in a containerized environment with strict volume mount restrictions
  • Apply filesystem-level sandboxing using chroot or namespace isolation to limit write scope
bash
# Example: Running esm.sh in a restricted container environment
docker run --read-only \
  --tmpfs /tmp:rw,noexec,nosuid \
  -v /app/packages:/app/packages:rw \
  --security-opt no-new-privileges:true \
  esm-sh:136

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechEsm

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-22
  • Vendor Resources
  • GitHub Commit 9d77b88

  • GitHub Security Advisory GHSA-h3mw-4f23-gwpw
  • Related CVEs
  • CVE-2026-23644: esm.sh Path Traversal Vulnerability

  • CVE-2026-27730: esm.sh CDN SSRF Vulnerability

  • CVE-2025-50180: esm.sh CDN SSRF Vulnerability

  • CVE-2025-65026: Esm.sh CDN RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English