Public vulnerability disclosure

CVE-2026-118661

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

publishedCWE-565

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.

Technical severity6.5 mediumCVSS 3.1 · CNA: GitHub_M
Published2026-10-28Source updated 2026-11-03
Collected2026-11-033 attributed sources

Fixes and workarounds

Fix

happy-dom (npm): OSV reports a fixed version 20.14.6. Check the advisory for supported release branches.

Source: OSV GHSA-5fpq-26gf-qwcr

Affected products and versions

Affected products, source version ranges and reporting authorities
ProductVersionsAuthority
happy-dom
capricorn86
< 20.14.6 (affected) CNA: GitHub_M
happy-dom

happy-dom
npm
≥ 0; < 20.14.6 (affected, semver); OSV events: introduced 0; fixed 20.14.6
Source events (semver)
[
  {
    "introduced": "0"
  },
  {
    "fixed": "20.14.6"
  }
]

Other versions: unaffected
OSV GHSA-5fpq-26gf-qwcr

Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.

CVSS assessments

CVSS scores, vectors and reporting authorities
Version / scoreVectorAuthority
3.1 / 6.5
medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:NCNA: GitHub_M

Exploit evidence

References

For agents and automation

Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.

Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.

Endpoints and access details

https://api.y2.dev/api/v2/cyber/cves
https://api.y2.dev/api/v2/cyber/cves/{cveId}

A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.

For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.

Agent access JSON · OpenAPI · CVE API guide