CVE-2025-65026: esm.sh CDN service has JS Template Literal Injection in CSS-to-JavaScript
Vulnerability summary
CVE-2025-65026 is a critical (CVSS 9.6) Improper Control of Generation of Code vulnerability in esm-dev esm.sh. EPSS estimates a 0.51% chance of exploitation in the next 30 days, higher than 45.3% of scored vulnerabilities. 1 public exploit is recorded.
Not severe (CVSS 6.1, network access); no exploitation reported by the 5 checked sources
CIRCL last checked 05-12-2026
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 2 · Related 2Timeline
- 19-11-2025PublishedVulnerability first disclosed.
- 20-11-2025Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
3 scores · 3 sources · 1 version- CVE.orgCNA6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NDiffers
- OSV · GoEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NDiffers
EPSS trend
Probability
0.51%
Chance of exploitation in the next 30 days
Percentile
45%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.51% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundEsm.Sh
Maturity: poc
Weaknesses
CWE · root cause- CWE-94Improper Control of Generation of CodeThe product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
- CWE-79Improper Neutralization of Input During Web Page GenerationThe product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Affected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Esm1 product
- esm.sh< 136
Esm-dev1 product
- esm.sh< 136
Github.com/esm-dev1 product
- esm.sh< 0.0.0-20251118065157-87d2f6497574
3 vendors · 3 products
References
4 links- github.com/esm-dev/esm.sh/security/advisories/GHSA-hcpf-qv9m-vfgpX Refsource CONFIRMWEBAdvisoryExploitVendor Advisory
- github.com/esm-dev/esm.sh/commit/87d2f6497574bf4448641a5527a3ac2beba5fd6cX Refsource MISCWEBFIXPatch
- github.com/esm-dev/esm.shPACKAGE