CVE-2026-33943CWE-94

Happy DOM ECMAScriptModuleCompiler: unsanitized export names are interpolated as executable code

High · published March 27, 2026

CVSS v3.1
8.8
EPSS
1%
Percentile
61.5
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
8.8 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00970 · 61.5th percentile
Weakness
CWE-94 · Improper Control of Generation of Code ('Code Injection')
Published
2026-03-27T21:15Z
EPSS history
Timeline
  • 27 MAR 21:15Z
    Happy DOM ECMAScriptModuleCompiler: unsanitized export names are interpolated as executable code
    cvelistv5