Happy DOM ECMAScriptModuleCompiler: unsanitized export names are interpolated as executable code
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 1 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-94.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| capricorn86 | happy-dom | 15.10.0 to before 20.8.8 | 20.8.8 | Patch available | CNA |
| — | happy-dom (npm) | 15.10.0 to before 20.8.8 | 20.8.8 | Patch available | GHSA-6q6h-j7hj-3r64 |
- happy-dom Vendorcapricorn86 Affected 15.10.0 to before 20.8.8 Fixed in 20.8.8 Patch available CNA
- happy-dom (npm) Vendor— Affected 15.10.0 to before 20.8.8 Fixed in 20.8.8 Patch available GHSA-6q6h-j7hj-3r64
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:capricorn86:happy_dom:*:*:*:*:*:node.js:*:* | 15.10.0 to before 20.8.8 | Vulnerable | capricorn86 |
- cpe:2.3:a:capricorn86:happy_dom:*:*:*:*:*:node.js:*:* Versions 15.10.0 to before 20.8.8 Vulnerable ·capricorn86
Remediation
- Fix · CNA happy-dom (capricorn86) Fixed in 20.8.8
- Fix · GHSA-6q6h-j7hj-3r64 happy-dom (npm) Fixed in 20.8.8 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat OpenShift Container Platform 4 | Affected | No fix yet |
Not affected: 1 product
- Red Hat Ansible Automation Platform 2
Timeline
- 2026-10-02 Threatist record created from CVE-2026-33943
- 2026-10-03 Alias added: GHSA-6q6h-j7hj-3r64
References
More capricorn86 Happy Dom vulnerabilities
- TI-2026-26521 Happy DOM's fetch credentials include uses page-origin cookies instead of target-origin cookies CVSS 3.1HIGH 7.5
Sources
- CVE-2026-33943 · CVE Program
- CVE-2026-33943 · NVD
- FIRST EPSS
- GHSA-6q6h-j7hj-3r64 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-33943 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences