CVE-2026-33943: Happy DOM ECMAScriptModuleCompiler: unsanitized export names are interpolated as executable code
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.
Security readout for executives and security teams
Plain-English summary
Happy DOM versions 15.10.0 through 20.8.7 can turn a malicious ES module export declaration into executable JavaScript. If an application processes attacker-controlled module scripts with happy-dom, this can lead to remote code execution. Version 20.8.8 fixes the issue.
Executive priority
Treat as urgent where happy-dom processes untrusted scripts, because successful exploitation could compromise host confidentiality, integrity, and availability. Lower priority where happy-dom is only isolated test tooling.
Technical view
The ECMAScriptModuleCompiler interpolates unsanitized export names into generated code. The described quote filtering misses backticks, so template literal syntax can bypass sanitization and execute injected expressions. The affected package range is capricorn86 happy-dom >=15.10.0 and <20.8.8.
Likely exposure
Exposure is most likely in server-side JavaScript, test, scraping, rendering, or automation workflows that use happy-dom to process untrusted or user-supplied ES module scripts.
Exploitation context
The source bundle reports RCE potential but does not cite active exploitation. KEV is false. The CVSS vector shows network attackability, low complexity, no privileges, and user interaction required.
Researcher notes
The advisory identifies the vulnerable compiler component, affected range, CWE-917 and CWE-94 classifications, and fixed release. Evidence provided does not establish real-world exploitation or affected downstream applications.
Mitigation direction
Upgrade happy-dom to version 20.8.8 or later.
Regenerate and redeploy lockfiles after upgrading the dependency.
Avoid processing untrusted ES module scripts with vulnerable happy-dom versions.
Check vendor and distribution guidance for downstream package status.
Validation and detection
Search SBOMs and lockfiles for happy-dom versions below 20.8.8.
Map happy-dom usage to any user-supplied script processing paths.
Confirm production artifacts contain happy-dom 20.8.8 or later.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-917: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Code execution and unsafe deserialization weaknesses often justify reviewing execution behavior and process telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
5Timeline events
2ADP providers
7Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-917 · source CWE mapping
Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')
Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Improper Control of Generation of Code ('Code Injection')
Improper Control of Generation of Code ('Code Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.