# CVE-2026-33943: Happy DOM ECMAScriptModuleCompiler: unsanitized export names are interpolated as executable code

- Severity: High 8.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.16%, higher than 67% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-03-26T22:22:20.000Z
- Modified: 2026-10-26T00:10:00.150Z
- Also known as: GHSA-6q6h-j7hj-3r64
- Weaknesses: CWE-94, CWE-917
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- capricorn86 happy-dom: >= 15.10.0, < 20.8.8
- ansible-automation-platform-26/gateway-rhel9: no versions given
- openshift4/ose-agent-installer-ui-rhel9: no versions given
- happy-dom (npm): from 15.10.0 before 20.8.8
- capricorn86 happy_dom: from 15.10.0 before 20.8.8

## Every score

- GitHub_M: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- redhat-SADP: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/capricorn86/happy-dom/security/advisories/GHSA-6q6h-j7hj-3r64> (exploit, vendor-advisory, web)
- <https://github.com/capricorn86/happy-dom/commit/5437fdf8f13adb9590f9f52616d9f69c3ee8db3c> (patch, web)
- <https://github.com/capricorn86/happy-dom/releases/tag/v20.8.8> (product, release-notes, web)
- <https://access.redhat.com/security/cve/CVE-2026-33943> (vdb-entry)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2452522> (issue-tracking)
- <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-33943.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-33943> (advisory)
- <https://github.com/capricorn86/happy-dom> (package)

## Sources

- CVE List: [CVE-2026-33943](https://www.cve.org/CVERecord?id=CVE-2026-33943), CVE Terms of Use, modified 2026-07-15
- GitHub Advisory Database: [GHSA-6q6h-j7hj-3r64](https://github.com/advisories/GHSA-6q6h-j7hj-3r64), CC-BY-4.0, modified 2026-03-30
- NVD: [CVE-2026-33943](https://nvd.nist.gov/vuln/detail/CVE-2026-33943), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-33943 · Whole record: https://cve.day/CVE-2026-33943.json · Rebuilt by cve.day 2026-11-25T22:59:17.453Z
