esm.sh CDN service has JS Template Literal Injection in CSS-to-JavaScript
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
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
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| esm-dev | esm.sh | before 136 | 136 | Patch available | CNA |
| — | github.com/esm-dev/esm.sh (Go) | before 0.0.0-20251118065157-87d2f6497574 | 0.0.0-20251118065157-87d2f6497574 | Patch available | GHSA-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
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
- 2026-10-02 Threatist record created from CVE-2025-65026
- 2026-10-03 Alias added: GHSA-hcpf-qv9m-vfgp
References
More esm-dev Esm.sh vulnerabilities
- 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
- CVE-2025-65026 · CVE Program
- CVE-2025-65026 · NVD
- FIRST EPSS
- GHSA-hcpf-qv9m-vfgp · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences