Skip to content
Fencer Vulns
high 8.8

CVE-2026-33943 json

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

published 2026-03-26 7 mo ago modified 2026-10-26 14 d ago also EUVD-2026-16864 , GHSA-6q6h-j7hj-3r64

cvss
8.8
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.6%
EPSS 0.6% chance of exploitation in 30 days, percentile 51%
public exploits
0
none known

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.

Patch / fix

  • npm happy-dom 20.8.8
  • capricorn86 happy_dom 20.8.8

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2026-33943 updated cvss 8.8

happy-dom: Happy DOM: Remote Code Execution via JavaScript expression injection

  • Red Hat OpenShift Container Platform 4 openshift4/ose-agent-installer-ui-rhel9
    affected: workaround, no fix available
  • Red Hat Ansible Automation Platform 2 ansible-automation-platform-26/gateway-rhel9
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
Proof of concept is public
Automatable
no
Technical impact
total
Assessed
7 mo ago

Exploit prediction

0.65% chance of exploitation in the next 30 days, higher than 51% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • github.com https://github.com/capricorn86/happy-dom/security/advisories/GHSA-6q6h-j7hj-3r64 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 8.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CISA ADP 3.1 8.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
GitHub 3.1 8.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
npm happy-dom
>=15.10.0, <20.8.8
20.8.8

Affected products

  • capricorn86 happy-dom
  • Red Hat Red Hat Ansible Automation Platform 2
  • Red Hat Red Hat OpenShift Container Platform 4

Classification

Weakness
  • CWE-94 Improper Control of Generation of Code
  • CWE-917 Improper Neutralization of Special Elements used in an Expression Language Statement

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.