# CVE-2026-118661: Happy DOM: Cookie scope forgery: no DNS-label boundary on Domain= matching , attacker origin sets victim cookies

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.33%, higher than 28% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-10-28T20:30:23.868Z
- Modified: 2026-11-03T14:17:31.910Z
- Also known as: GHSA-5fpq-26gf-qwcr
- Weaknesses: CWE-565
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- capricorn86 happy-dom: < 20.14.6
- happy-dom (npm): before 20.14.6

## Every score

- GitHub_M: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`

## References

- <https://github.com/capricorn86/happy-dom/security/advisories/GHSA-5fpq-26gf-qwcr> (exploit, web)
- <https://github.com/capricorn86/happy-dom/pull/2477> (web)
- <https://github.com/capricorn86/happy-dom/commit/f21dbd7d0a0c63cdd41954ba5d0f05def4e0f2b3> (web)
- <https://github.com/capricorn86/happy-dom/releases/tag/v20.14.6> (web)
- <https://github.com/capricorn86/happy-dom> (package)

## Sources

- CVE List: [CVE-2026-118661](https://www.cve.org/CVERecord?id=CVE-2026-118661), CVE Terms of Use, modified 2026-11-03
- GitHub Advisory Database: [GHSA-5fpq-26gf-qwcr](https://github.com/advisories/GHSA-5fpq-26gf-qwcr), CC-BY-4.0, modified 2026-10-28
- NVD: [CVE-2026-118661](https://nvd.nist.gov/vuln/detail/CVE-2026-118661), Public domain, modified 2026-11-03

---

Page: https://cve.day/CVE-2026-118661 · Whole record: https://cve.day/CVE-2026-118661.json · Rebuilt by cve.day 2026-11-25T22:59:47.691Z
