esm.sh CDN service has JS Template Literal Injection in CSS-to-JavaScript
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/esm-dev/esm.shGo | < 0.0.0-20251118065157-87d2f6497574 | 0.0.0-20251118065157-87d2f6497574 |
Affected products
4- ghsa-coords3 versionspkg:golang/github.com/esm-dev/esm.shpkg:rpm/opensuse/govulncheck-vulndb&distro=openSUSE%20Leap%2015.6pkg:rpm/suse/govulncheck-vulndb&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015%20SP6
< 0.0.0-20251118065157-87d2f6497574+ 2 more
- (no CPE)range: < 0.0.0-20251118065157-87d2f6497574
- (no CPE)range: < 0.0.20251209T172047-150000.1.127.1
- (no CPE)range: < 0.0.20251209T172047-150000.1.127.1
Patches
Vulnerability mechanics
References
4- github.com/advisories/GHSA-hcpf-qv9m-vfgpghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-65026ghsaADVISORY
- github.com/esm-dev/esm.sh/commit/87d2f6497574bf4448641a5527a3ac2beba5fd6cghsax_refsource_MISCWEB
- github.com/esm-dev/esm.sh/security/advisories/GHSA-hcpf-qv9m-vfgpghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.