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-65026

CVE-2025-65026: Esm.sh CDN RCE Vulnerability

CVE-2025-65026 is a template literal injection flaw in esm.sh CDN that enables remote code execution in Electron apps and XSS in browsers. This article covers technical details, affected versions, and mitigation steps.

Published: March 25, 2026

CVE-2025-65026 Overview

CVE-2025-65026 is a Template Literal Injection vulnerability (CWE-94) affecting esm.sh, a no-build content delivery network (CDN) for modern web development. The vulnerability exists in esm.sh's CSS-to-JavaScript module conversion feature. When a CSS file is requested with the ?module query parameter, esm.sh converts it to a JavaScript module by embedding the CSS content directly into a template literal without proper sanitization. An attacker can inject malicious JavaScript code using ${...} expressions within CSS files, which will execute when the module is imported by victim applications. This enables Cross-Site Scripting (XSS) in browsers and Remote Code Execution (RCE) in Electron applications.

Critical Impact

This vulnerability allows attackers to inject arbitrary JavaScript code through malicious CSS files, enabling XSS attacks in web browsers and potentially achieving Remote Code Execution in Electron-based applications that import compromised CSS modules.

Affected Products

  • esm.sh versions prior to 136

Discovery Timeline

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

Technical Details for CVE-2025-65026

Vulnerability Analysis

The esm.sh CDN provides a convenient feature that allows developers to import CSS files as JavaScript modules by appending the ?module query parameter to CSS file URLs. When this parameter is used, the service converts the CSS content into a JavaScript module that can be consumed by modern bundlers and applications.

The vulnerability arises from the way esm.sh handles this conversion process. When transforming CSS content into a JavaScript module, the service embeds the raw CSS content directly into a JavaScript template literal (backtick-enclosed strings). Template literals in JavaScript support expression interpolation through the ${...} syntax, which allows embedded expressions to be evaluated and their results included in the string.

The critical flaw is that esm.sh fails to sanitize or escape CSS content before embedding it into the template literal. This means that if an attacker can control or inject content into a CSS file (or host a malicious CSS file), they can include ${...} expressions that will be executed as JavaScript code when the module is loaded.

Root Cause

The root cause is improper input sanitization (CWE-94: Improper Control of Generation of Code) in the CSS-to-JavaScript module conversion feature. The service directly embeds untrusted CSS content into JavaScript template literals without escaping template literal special characters (backticks and ${ sequences). This allows malicious content within CSS files to break out of the template literal context and execute arbitrary JavaScript code.

Attack Vector

The attack is network-based and requires user interaction. An attacker can exploit this vulnerability through the following attack flow:

  1. The attacker creates or compromises a CSS file to include malicious JavaScript expressions using the ${...} syntax
  2. A victim application imports this CSS file from esm.sh using the ?module query parameter
  3. esm.sh converts the CSS to a JavaScript module, embedding the malicious content directly into a template literal
  4. When the victim application loads the module, the injected JavaScript expressions are evaluated and executed

In browser contexts, this results in Cross-Site Scripting (XSS) attacks that can steal cookies, session tokens, or perform actions on behalf of the user. In Electron applications, which have access to Node.js APIs, this can escalate to full Remote Code Execution (RCE) on the victim's system.

Detection Methods for CVE-2025-65026

Indicators of Compromise

  • Unusual CSS files containing JavaScript template literal syntax (${...} expressions)
  • Network requests to esm.sh CDN with ?module parameter for CSS files from untrusted sources
  • JavaScript errors or unexpected code execution when loading CSS modules
  • Presence of esm.sh imports for CSS files from external or user-controllable sources

Detection Strategies

  • Monitor application dependencies for CSS imports from esm.sh using the ?module parameter
  • Implement Content Security Policy (CSP) to restrict script sources and detect unauthorized code execution
  • Review application code for dynamic or user-controllable CSS module imports from esm.sh
  • Use static analysis tools to identify potentially vulnerable import patterns

Monitoring Recommendations

  • Enable CSP violation reporting to detect attempted XSS attacks
  • Monitor browser console logs for unexpected JavaScript execution from CSS module imports
  • Track esm.sh CDN requests in network logs to identify suspicious CSS module loading patterns
  • Implement Subresource Integrity (SRI) checks for critical CDN resources where possible

How to Mitigate CVE-2025-65026

Immediate Actions Required

  • Upgrade esm.sh to version 136 or later, which contains the security patch
  • Review all application code for CSS imports from esm.sh using the ?module parameter
  • Audit third-party CSS files imported through esm.sh for malicious content
  • Implement Content Security Policy headers to mitigate potential XSS impact

Patch Information

The vulnerability has been patched in esm.sh version 136. The fix is available in commit 87d2f6497574bf4448641a5527a3ac2beba5fd6c. Organizations should update to the patched version immediately. For detailed patch information, refer to the GitHub Commit Update and the GitHub Security Advisory.

Workarounds

  • Avoid using the ?module query parameter for CSS files from untrusted sources until patching
  • Self-host critical CSS files instead of relying on the esm.sh CDN for module conversion
  • Implement strict Content Security Policy (CSP) headers to limit script execution sources
  • For Electron applications, disable Node.js integration in renderer processes where possible to limit RCE impact

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechEsm

  • SeverityCRITICAL

  • CVSS Score9.6

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-94

  • CWE-79
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-27730: esm.sh CDN SSRF Vulnerability

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

  • CVE-2026-23644: esm.sh Path Traversal Vulnerability

  • CVE-2025-65025: Esm.sh Path Traversal 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