Read the docs
TI-2025-40212 Aliases CVE-2025-65026GHSA-hcpf-qv9m-vfgp

esm.sh CDN service has JS Template Literal Injection in CSS-to-JavaScript

Priority HIGH 74CWE-94Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Code execution, Cross-site scripting
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-94 and CWE-79.

Summary

esm.sh is a nobuild content delivery network(CDN) for modern web development. Prior to version 136, The esm.sh CDN service contains a Template Literal Injection vulnerability (CWE-94) in its 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. This issue has been patched in version 136.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00514 44th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed esm.sh (esm-dev): 136github.com/esm-dev/esm.sh (Go): 0.0.0-20251118065157-87d2f6497574

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
esm-devesm.shbefore 136136Patch availableCNA
—github.com/esm-dev/esm.sh (Go)before 0.0.0-20251118065157-87d2f64975740.0.0-20251118065157-87d2f6497574Patch availableGHSA-hcpf-qv9m-vfgp
  • esm.sh Vendoresm-dev Affected before 136 Fixed in 136 Patch available CNA
  • github.com/esm-dev/esm.sh (Go) Vendor— Affected before 0.0.0-20251118065157-87d2f6497574 Fixed in 0.0.0-20251118065157-87d2f6497574 Patch available GHSA-hcpf-qv9m-vfgp

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:esm:esm.sh:*:*:*:*:*:*:*:*before 136Vulnerableesm-dev
  • cpe:2.3:a:esm:esm.sh:*:*:*:*:*:*:*:* Versions before 136 Vulnerable ·esm-dev

Remediation

  • Fix · CNA esm.sh (esm-dev) Fixed in 136
  • Fix · GHSA-hcpf-qv9m-vfgp github.com/esm-dev/esm.sh (Go) Fixed in 0.0.0-20251118065157-87d2f6497574 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2025-65026
  2. 2026-10-03 Alias added: GHSA-hcpf-qv9m-vfgp

References

  • TI-2025-40211 esm.sh CDN service has arbitrary file write via tarslip CVSS 3.1CRITICAL 9.8
  • TI-2025-32063 esm.sh is vulnerable to full-response SSRF CVSS 4.0HIGH 8.7
  • TI-2026-22092 esm.sh has SSRF localhost/private-network bypass in `/http(s)` module route CVSS 3.1HIGH 7.5
  • TI-2026-19038 esm.sh has path traversal in `extractPackageTarball` that enables file writes from malicious packages CVSS 4.0HIGH 7.7

Sources