CVE-2026-115895 — Happy DOM: Incomplete fix for CVE-2026-33943: unsanitized import alias leads to host code execution
Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. From 17.0.0 until 21.0.4, packages/happy-dom/src/module/ECMAScriptModuleCompiler.ts accepts a named ESM import alias without validating that it is a JavaScript binding identifier before inserting it into a generated destructuring binding. With enableJavaScriptEvaluation enabled, attacker-controlled HTML or module source can use an invalid alias that becomes a valid default initializer after compilation, causing the generated JavaScript to execute in the Node.js host process. The demonstrated reachable path uses a JSON module import attribute, which prevents the malicious alias from being emitted again in a later ESM circular-import assignment and keeps the generated function syntactically valid. This incomplete fix for CVE-2026-33943 is a distinct residual path because the earlier remediation validated the local export importName path but not the named-import alias. This issue is fixed in version 21.0.4.
Who exploits it and how urgent it is
A 0–100 score combining confirmed exploitation, ransomware and APT use, public exploits, EPSS and severity.
How the score was calculated
- EPSS 0.4% (30-day exploitation probability)+5
- Technical severity (high)+6
The score orders the patch queue; it does not replace your asset context (internet exposure, criticality, compensating controls).
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the sources call it.
Remediation
Fixes and mitigations documented by the sources — linked to the original advisory.
- Npm Happy-dom: fixed in version 21.0.4 — github.com (GitHub Security Advisories)
First 24 hours
Ordered from the record’s own fields — exposure first, because you cannot patch what you have not found. A rule-generated starting point.
- Identify exposed assets running the affected vendor/product/version combinations (Capricorn86 Happy Dom, Npm Happy-dom).
- The attack is network-based and needs no privileges: restrict exposure (ACLs, VPN, WAF) until patched.
- Apply the fixed version or the patch documented under Remediation.
- Exploitation requires user interaction: tighten email/web filtering and warn affected users.
- Search available logs for exploit probes matching the vulnerability class (injection), errors and authentication anomalies.
Affected scope
Vendor, product and versions as the sources word them.
| Vendor | Product | Versions | Status | Source |
|---|---|---|---|---|
| Capricorn86 | Happy Dom | version >= 17.0.0, < 21.0.4 | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Npm | Happy-dom | ≥ 17.0.0 and ≤ 21.0.3 | Vulnerable | GitHub Security Advisories |
Attack characteristics
The CVSS vector, decoded. It describes the attack, not your exposure to it.
Every base score collected
Sources score independently and may disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Scored by |
|---|---|---|---|---|---|
| 8.8 | CVSS 3.1 | High | 2.8 | 5.9 | security-advisories@github.com via NIST National Vulnerability Database |
| 8.8 | CVSS 3.1 | High | — | — | GitHub, Inc. via GitHub Security Advisories |
| 8.8 | CVSS 3.1 | High | — | — | GitHub_M via CVE Program (cve.org) e CISA ADP |
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H (score shown at the top: security-advisories@github.com) Weakness MITRE
Weakness class according to MITRE’s CWE catalog.
EPSS over time FIRST
Oct 24, 2026 → Oct 29, 2026 · 6 reading(s) · max 0.56%
Detection
Read off the CVSS vector and the weakness class. Starting points, not tested rules.
- Prioritize edge telemetry for the network-reachable component (proxy, WAF, IDS/IPS).
- Look for parameters with command/query metacharacters and unexpected child processes of the service.
Timeline
What happened to this CVE, newest first.
- 2026
- Source status changed · Received → Awaiting Analysis
- Fix documented
- Affected products added · npm/happy-dom
- Affected products added · capricorn86/happy-dom
- Record published
- CVSS changed · 8.8
- Source status changed · → Received
- Record created in this database
- CVE published
Source activity
Repeated readings are counted rather than listed.
- 1× References added · Oct 23, 2026 – Oct 23, 2026
- 1× Official description updated · Oct 23, 2026 – Oct 23, 2026
References
5 on the record
Elsewhere on this site
Related CVEs (same products)
- High CVE-2026-118660 Happy DOM: SSRF via iframe and link stylesheet when parsing untrusted HTML 1d
- Medium CVE-2026-118661 Happy DOM: Cookie scope forgery: no DNS-label boundary on Domain= matching , attacker origin sets victim cookies 1d
- High CVE-2026-118659 @happy-dom/server-renderer: ServerRendererServer Target-Origin Bypass SSRF / Open Proxy 1d
- High CVE-2026-34226 Happy DOM's fetch credentials include uses page-origin cookies instead of target-origin cookies Mar 27, 2026
- Critical CVE-2026-33943 Happy DOM ECMAScriptModuleCompiler: unsanitized export names are interpolated as executable code Mar 27, 2026
- Critical CVE-2025-62410 --disallow-code-generation-from-strings is not sufficient for isolating untrusted JavaScript in happy-dom Oct 15, 2025
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No CISA SSVC assessment.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.
Answered from this record
Text assembled only from the fields above — no additional claims.
What should defenders know first?
CVE-2026-115895 is "Happy DOM: Incomplete fix for CVE-2026-33943: unsanitized import alias leads to host code execution", rated High. It affects Happy Dom (Capricorn86); versions are in the scope table. It is not in CISA KEV, which does not rule out exploitation. CVSS 8.8 describes technical severity. EPSS 0.37% estimates the probability of exploitation in 30 days; neither replaces your asset context. First verify whether exposed or business-critical assets run the affected versions, apply vendor fixes or mitigations, and preserve logs for review.
Comments
Moderated technical discussion. Read the community guidelines.
No comments yet.
Sign in or create an account to comment and suggest corrections.