# Happy DOM has cookie scope forgery: no DNS-label boundary on Domain= matching , attacker origin sets victim cookies

Advisory record · `GHSA-5fpq-26gf-qwcr`

- **Identifiers:** `GHSA-5fpq-26gf-qwcr` · `CVE-2026-118661`
- **State:** Confirmed
- **Severity:** CVSS 6.5 Medium
- **Critical:** No
- **Weakness (CWE):** [CWE-565](https://cwe.mitre.org/data/definitions/565.html)
- **Tags:** [CWE-565](https://agentprime.io/advisories/tag/cwe-565.md)
- **Published:** 28 Oct 2026
- **Updated:** 28 Oct 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 28 Oct 2026, 21:06 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `happy-dom` (npm): affected `<20.14.6`; fixed in `20.14.6`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Happy DOM versions before 20.14.6 (npm package happy-dom) match cookie Domain attributes without a DNS-label boundary, so a cookie scoped to example.com can also be matched for notexample.com. An attacker controlling a different origin can therefore cause cookies to be set and received where browsers would not, which the source describes as cookie scope forgery relevant to server-side rendering or prerender cookie handling. Upgrade to happy-dom 20.14.6, which is listed as the fixed version.

Written 31 Oct 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 6.5 Medium, CVSS 3.1: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0027, the 19th percentile, on 5 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 28 Oct 2026, 20:30 UTC: [Confirmed by the CVE List](https://www.cve.org/CVERecord?id=CVE-2026-118661)
- 28 Oct 2026, 21:16 UTC: [Confirmed by NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-118661)
- 31 Oct 2026, 13:33 UTC: First seen by agentprime
- 31 Oct 2026, 13:33 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-5fpq-26gf-qwcr)

## Sources

- [GitHub Advisory Database: GHSA-5fpq-26gf-qwcr](https://github.com/advisories/GHSA-5fpq-26gf-qwcr)
- [OSV: GHSA-5fpq-26gf-qwcr](https://osv.dev/vulnerability/GHSA-5fpq-26gf-qwcr)
- <https://github.com/capricorn86/happy-dom/security/advisories/GHSA-5fpq-26gf-qwcr>
- <https://github.com/capricorn86/happy-dom/pull/2477>
- <https://github.com/capricorn86/happy-dom/commit/f21dbd7d0a0c63cdd41954ba5d0f05def4e0f2b3>
- <https://github.com/capricorn86/happy-dom>
- <https://github.com/capricorn86/happy-dom/releases/tag/v20.14.6>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-5fpq-26gf-qwcr>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-5fpq-26gf-qwcr/>. Everything for agents: <https://agentprime.io/llms.txt>.
