Skip to content
OpenAdvisories
Medium · 6.1 CVE-2025-65026 EUVD-2025-198180GHSA-hcpf-qv9m-vfgpGO-2025-4139

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

Published Nov 19, 2025 · Updated Nov 20, 2025 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
esm-dev esm.sh < 136 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
SLES 15 SP6 govulncheck-vulndb 0.0.20251209T172047-150000.1.127.1 SUSE-SU-2025:4395-1
ReleasePackageFixed inAdvisory
openSUSE Leap 16.0 govulncheck-vulndb 0.0.20260723T184607-160000.1.1 openSUSE-SU-2026:21483-1
openSUSE Leap 15.6 govulncheck-vulndb 0.0.20251209T172047-150000.1.127.1 SUSE-SU-2025:4395-1

Affected packages

EcosystemPackageAffectedFixedRecord
Go github.com/esm-dev/esm.sh < 0.0.0-20251118065157-87d2f6497574 0.0.0-20251118065157-87d2f6497574 GHSA-hcpf-qv9m-vfgp

Advisories 2

References