{"id":"CVE-2026-118661","published":"2026-10-28T20:30:23Z","modified":"2026-11-03T13:33:35Z","title":"Happy DOM: Cookie scope forgery: no DNS-label boundary on Domain= matching , attacker origin sets victim cookies","vendor":"capricorn86","product":"happy-dom","tier":"tail","description":{"text":"Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. Prior to 20.14.6, Happy DOM's CookieContainer in src/cookie/CookieContainer.ts does not correctly validate or match Domain cookie attributes. It can accept a Domain unrelated to the origin setting the cookie, including a public suffix, and separately treats an unrelated suffix-sharing hostname as a match because cookieMatchesURL does not enforce a DNS-label boundary. In server-side rendering and prerendering applications that contact attacker-controlled origins and then make requests to a victim origin, these behaviors can plant and deliver a forged cookie, enabling cookie injection or session fixation. This issue is fixed in version 20.14.6.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00332,"percentile":0.26984,"provenance":"source"},"cwes":[{"id":"CWE-565","name":"Reliance on Cookies without Validation and Integrity Checking"}],"references":[{"url":"https://github.com/capricorn86/happy-dom/security/advisories/GHSA-5fpq-26gf-qwcr","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/capricorn86/happy-dom/pull/2477","tags":["x_refsource_MISC"]},{"url":"https://github.com/capricorn86/happy-dom/commit/f21dbd7d0a0c63cdd41954ba5d0f05def4e0f2b3","tags":["x_refsource_MISC"]},{"url":"https://github.com/capricorn86/happy-dom/releases/tag/v20.14.6","tags":["x_refsource_MISC"]}],"priority":{"score":9.9,"factors":[{"name":"EPSS percentile","points":5.4},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"capricorn86","affectedVersions":[{"vendor":"capricorn86","product":"happy-dom","versions":["< 20.14.6"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-11-03T13:33:09.550280Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"happy-dom","vulnerableRanges":["<20.14.6"],"patched":["20.14.6"],"from":["GHSA-5fpq-26gf-qwcr"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-112468","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-capricorn86-happy-dom-cve-2025-61927","parents":[{"from":"CVE-2026-34226","to":"CVE-2026-118661","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:happy-dom","fromFixed":"20.8.9","toFixed":"20.14.6","daysApart":215},{"kind":"same-code","provenance":"machine","files":["packages/happy-dom/src/cookie/CookieContainer.ts"],"commits":["https://github.com/capricorn86/happy-dom/commit/f21dbd7d0a0c63cdd41954ba5d0f05def4e0f2b3","https://github.com/capricorn86/happy-dom/commit/68324c21d7b98f53f7bb5a7b3e185bda7106e751"],"basis":"shared function","functions":["CookieContainer"]}]},{"from":"CVE-2026-115895","to":"CVE-2026-118661","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/happy-dom/src/cookie/PublicSuffixList.ts","packages/happy-dom/src/css/declaration/CSSPropertyList.ts","packages/happy-dom/src/css/declaration/ICSSStyleDeclaration.ts"],"commits":["https://github.com/capricorn86/happy-dom/commit/fd163520b74d9fa146be91f7b4e4f46d6cccbe13","https://github.com/capricorn86/happy-dom/commit/f21dbd7d0a0c63cdd41954ba5d0f05def4e0f2b3"],"basis":"shared function","functions":["ICSSStyleDeclaration"]}]}],"packageHistory":[{"cve":"CVE-2025-62410","published":"2025-10-15","fixed":"20.0.2","kev":false},{"cve":"CVE-2026-33943","published":"2026-03-27","fixed":"20.8.8","kev":false},{"cve":"CVE-2026-34226","published":"2026-03-27","fixed":"20.8.9","kev":false},{"cve":"CVE-2026-118661","published":"2026-10-28","fixed":"20.14.6","kev":false},{"cve":"CVE-2026-118660","published":"2026-10-28","fixed":"21.0.0","kev":false},{"cve":"CVE-2026-115895","published":"2026-10-23","fixed":"21.0.4","kev":false}],"package":"npm:happy-dom"}}