SecurityContext

CVE-2025-65026: esm.sh - Template Injection

  • Cve: CVE-2025-65026
  • Name: esm.sh - Template Injection
  • 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.
  • Impact: Attackers can execute arbitrary JavaScript in browsers or remote code in Electron apps, leading to XSS or remote code execution.
  • Remediation: Update to version 136 or later.
  • Vulnerability type: template_injection
  • Vulnerability impact: remote_code_execution, client_script_exec
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: critical
  • Cvss score: 9.6
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
  • Epss score: 0.00514
  • Epss percentile: 0.44697
  • Assignee: [email protected]
  • Published at: 2025-11-19T18:15:50Z
  • Age in days: 370
  • Modified at: 2026-10-18T20:10:00Z
  • Patch available: yes
  • Public exploits total: 1
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2025-65026
  • Nvd status: analyzed
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-94Improper Control of Generation of Code
CWE-79Improper Neutralization of Input During Web Page Generation

Public exploits

UrlSourceAdded date
https://github.com/esm-dev/esm.sh/security/advisories/GHSA-hcpf-qv9m-vfgpnvd2025-11-19

References

UrlSourceTags
https://github.com/esm-dev/esm.sh/commit/87d2f6497574bf4448641a5527a3ac2beba5fd6cnvdPatch
https://github.com/esm-dev/esm.sh/security/advisories/GHSA-hcpf-qv9m-vfgpnvdExploit, Vendor Advisory

Products

ProductAffectedPlatform boundSourcesUrl
esm:esm.sh< 136nonvd/v1/products/esm/esm.sh

Projects

RepositoryLink kindsIndexedUrl
esm-dev/esm.shcommit, fix, package, security_advisoryyes/v1/repositories/esm-dev/esm.sh

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Public exploit: yes
  • Public exploit count: 1
  • Public exploit first date: 2025-11-19
  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts