CVE Catalog

CVE-2026-33943

HighCVSS 8.8
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Elevated risk
0.79%

52th percentile - higher than 52% of all known CVEs

Summary

A code injection vulnerability in Happy DOM versions 15.10.0 through 20.8.7 allows Remote Code Execution (RCE) by injecting arbitrary JavaScript expressions inside `export { }` declarations in ES module scripts. The `ECMAScriptModuleCompiler` directly interpolates unsanitized content into generated code, and the quote filter fails to strip backticks, enabling template literal-based payloads to bypass sanitization.

Risk Assessment

An attacker can remotely execute arbitrary JavaScript code in the context of the application using the vulnerable Happy DOM version, potentially leading to server compromise, data theft, or lateral movement within the infrastructure.

Recommendation

Immediately upgrade Happy DOM to version 20.8.8 or later, which fixes the vulnerability. If upgrading is not possible, temporarily disable ES module processing or deploy WAF rules to block suspicious `export { }` declarations.

Other vulnerabilities in Happy DOM

Original NVD description (English source)

Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. In versions 15.10.0 through 20.8.7, a code injection vulnerability in `ECMAScriptModuleCompiler` allows an attacker to achieve Remote Code Execution (RCE) by injecting arbitrary JavaScript expressions inside `export { }` declarations in ES module scripts processed by happy-dom. The compiler directly interpolates unsanitized content into generated code as an executable expression, and the quote filter does not strip backticks, allowing template literal-based payloads to bypass sanitization. Version 20.8.8 fixes the issue.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS