# CVE-2026-115895: Happy DOM: Incomplete fix for CVE-2026-33943: unsanitized import alias leads to host code execution

- Priority: **Routine**
- Reason: Not severe (CVSS 8.8, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-10-23 · Modified: 2026-10-30
- Aliases: GHSA-834v-8h66-3h79, CGA-32xp-jg9g-pfhp, CGA-46vq-mxfq-8wfc, CGA-ccv4-m633-4m5q
- Record: https://cvemate.com/vulnerability/CVE-2026-115895 · JSON: https://cvemate.com/vulnerability/CVE-2026-115895/json

## Description

```text
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.
```

## Signals

- CVSS: 8.8 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- EPSS: 0.473%, percentile 42.559%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- chainguard librechat (Chainguard): All versions (No fix recorded) \| \< 0.8.8-r8
- capricorn86 happy-dom: ≥ 17.0.0, \< 21.0.4
- Npm happy-dom (Npm): ≥ 17.0.0, \< 21.0.4

## References

- <https://github.com/capricorn86/happy-dom/security/advisories/GHSA-834v-8h66-3h79>
- <https://github.com/capricorn86/happy-dom/pull/2537>
- <https://github.com/capricorn86/happy-dom/commit/fd163520b74d9fa146be91f7b4e4f46d6cccbe13>
- <https://github.com/capricorn86/happy-dom/releases/tag/v21.0.4>
- <https://github.com/capricorn86/happy-dom>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/115xxx/CVE-2026-115895.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-115895>

---

Data as of 2026-12-05T06:40:43.010Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
