{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-115895","id":"CVE-2026-115895","title":"Happy DOM code injection in ESM import alias compilation","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","descriptionLong":"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.","published":"2026-10-23T21:32:24.999Z","updated":"2026-11-01T02:30:15.687462804Z","reserved":"2026-10-23T19:37:27.177Z","status":"Awaiting Analysis","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"github.com"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub"}],"rating":"high","products":["capricorn86 happy-dom"],"affectedProducts":[{"vendor":"capricorn86","product":"happy-dom","defaultStatus":null,"versions":[{"version":">= 17.0.0, < 21.0.4","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"happy-dom","purl":"pkg:npm/happy-dom","ranges":[">=17.0.0 <21.0.4"],"fixed":["21.0.4"],"advisory":"GHSA-834v-8h66-3h79"}],"cwes":["CWE-94"],"aliases":["GHSA-834v-8h66-3h79"],"references":[{"url":"https://github.com/capricorn86/happy-dom/security/advisories/GHSA-834v-8h66-3h79","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/capricorn86/happy-dom/pull/2537","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/capricorn86/happy-dom/commit/fd163520b74d9fa146be91f7b4e4f46d6cccbe13","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/capricorn86/happy-dom/releases/tag/v21.0.4","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/115xxx/CVE-2026-115895.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-115895","tags":["advisory"]},{"url":"https://github.com/capricorn86/happy-dom","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total"},"epss":0.00473,"epssPercentile":0.41816,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-115895","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-115895","ok":true,"note":"Awaiting Analysis"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-115895","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-834v-8h66-3h79","ok":true,"note":"GHSA-834v-8h66-3h79"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-115895","ok":true,"note":"scored 2026-11-20"}],"aiTitle":true,"tech":[],"critical":[],"attention":null}