CVE-2026-33943
March 27, 2026
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.
Affected Packages
https://github.com/capricorn86/happy-dom.git (GITHUB):
Affected version(s) >=v15.10.0 <v20.8.8Fix Suggestion:
Update to version v20.8.8https://github.com/capricorn86/happy-dom.git (GITHUB):
Affected version(s) >=v15.10.0 <v20.8.8Fix Suggestion:
Update to version v20.8.8https://github.com/capricorn86/happy-dom.git (GITHUB):
Affected version(s) >=v15.10.0 <v20.8.8Fix Suggestion:
Update to version v20.8.8https://github.com/capricorn86/happy-dom.git (GITHUB):
Affected version(s) >=v15.10.0 <v20.8.8Fix Suggestion:
Update to version v20.8.8https://github.com/capricorn86/happy-dom.git (GITHUB):
Affected version(s) >=v15.10.0 <v20.8.8Fix Suggestion:
Update to version v20.8.8https://github.com/capricorn86/happy-dom.git (GITHUB):
Affected version(s) >=v15.10.0 <v20.8.8Fix Suggestion:
Update to version v20.8.8happy-dom (NPM):
Affected version(s) >=15.10.0 <20.8.8Fix Suggestion:
Update to version 20.8.8happy-dom (NPM):
Affected version(s) >=15.10.0 <20.8.8Fix Suggestion:
Update to version 20.8.8happy-dom (NPM):
Affected version(s) >=15.10.0 <20.8.8Fix Suggestion:
Update to version 20.8.8happy-dom (NPM):
Affected version(s) >=15.10.0 <20.8.8Fix Suggestion:
Update to version 20.8.8happy-dom (NPM):
Affected version(s) >=15.10.0 <20.8.8Fix Suggestion:
Update to version 20.8.8happy-dom (NPM):
Affected version(s) >=15.10.0 <20.8.8Fix Suggestion:
Update to version 20.8.8Related ResourcesĀ (4)
Do you need more information?
Contact UsCVSS v4
Base Score:
8.7
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
PASSIVE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
HIGH
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
8.8
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Weakness Type (CWE)
Improper Control of Generation of Code ('Code Injection')
EPSS
Base Score:
0.07