{"cve":"CVE-2026-115895","nvd":{"published":"2026-10-23T22:16:58.987","modified":"2026-10-23T22:16:58.987","status":"Received","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8},"cwes":["CWE-94"],"references":["https://github.com/capricorn86/happy-dom/commit/fd163520b74d9fa146be91f7b4e4f46d6cccbe13","https://github.com/capricorn86/happy-dom/pull/2537","https://github.com/capricorn86/happy-dom/releases/tag/v21.0.4","https://github.com/capricorn86/happy-dom/security/advisories/GHSA-834v-8h66-3h79"],"products":[],"source":"nvd","synced_at":"2026-10-24T16:53:35.584907681+00:00"},"epss":{"cve":"CVE-2026-115895","score":0.00367,"percentile":0.30248,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-834v-8h66-3h79","url":"https://osv.dev/vulnerability/GHSA-834v-8h66-3h79","summary":"Happy DOM: Incomplete fix for CVE-2026-33943: unsanitized import alias leads to host code execution","modified":"2026-10-23T22:15:03.526440756Z","packages":[{"ecosystem":"npm","name":"happy-dom","purl":"pkg:npm/happy-dom","ranges":[">=17.0.0 <21.0.4"],"fixed":["21.0.4"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}