CVE-2026-33943
published high CVSS 3.1 · 8.8Happy DOM ECMAScriptModuleCompiler: unsanitized export names are interpolated as executable code
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| capricorn86 | — | happy-dom>= 15.10.0, < 20.8.8 | Affected | Not stated | GitHub_M |
| Red Hat | — | ansible-automation-platform-26/gateway-rhel9Red Hat Ansible Automation Platform 2 | Unaffected | Not required | redhat-SADP |
| Red Hat | — | openshift4/ose-agent-installer-ui-rhel9Red Hat OpenShift Container Platform 4 | Affected | Not stated | redhat-SADP |
Description
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.
A flaw was found in Happy DOM, a JavaScript implementation of a web browser. This vulnerability allows a remote attacker to achieve Remote Code Execution (RCE) by injecting arbitrary JavaScript expressions. The `ECMAScriptModuleCompiler` component fails to properly sanitize content within `export { }` declarations in ES module scripts, leading to the direct execution of malicious code.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.8 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 8.8 | high | redhat-SADP · adp | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| capricorn86 | happy-dom | >= 15.10.0, < 20.8.8 (affected) | GitHub_M · cna |
| Red Hat | Red Hat Ansible Automation Platform 2 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift Container Platform 4 | Default: affected | redhat-SADP · adp |
Weaknesses
2- CWE-94 CWE-94: Improper Control of Generation of Code ('Code Injection')
- CWE-917 Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')
References
6- https://access.redhat.com/security/cve/CVE-2026-33943
- RHBZ#2452522 https://bugzilla.redhat.com/show_bug.cgi?id=2452522
- https://github.com/capricorn86/happy-dom/commit/5437fdf8f13adb9590f9f52616d9f69c3ee8db3c
- https://github.com/capricorn86/happy-dom/releases/tag/v20.8.8
- https://github.com/capricorn86/happy-dom/security/advisories/GHSA-6q6h-j7hj-3r64
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-33943.json
Provider assertions
3GitHub_M · cna
Happy DOM ECMAScriptModuleCompiler: unsanitized export names are interpolated as executable code
redhat-SADP · adp
happy-dom: Happy DOM: Remote Code Execution via JavaScript expression injection
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- c5be91ab3527d6a8ebd897ca0b3747f8c30d2f54a2690688130c6a760109cb35
- Ingested
- 23 Sep 2026, 09:10:54 UTC
- Source record
- Official CVE record