Happy DOM: Cookie scope forgery: no DNS-label boundary on Domain= matching , attacker origin sets victim cookies
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.
- Products
- happy-dom
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-118661
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 2 Nov 2026, 15:08 UTC · Revision 1
Source evidence
Happy DOM: Cookie scope forgery: no DNS-label boundary on Domain= matching , attacker origin sets victim cookies
core-cve · Original sourcePublished 28 Oct 2026, 20:30 UTC
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.
cve:CVE-2026-118661
happy-dom
Fixed versions: Not specified
Complete source record
{
"id": "d7d19d0beedddb97c935689e832c43a489f90d7f9c67e4c7baa150977efb8b0f",
"url": "https://www.cve.org/CVERecord?id=CVE-2026-118661",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Happy DOM: Cookie scope forgery: no DNS-label boundary on Domain= matching , attacker origin sets victim cookies",
"summary": "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.",
"evidence": "cve:CVE-2026-118661",
"products": [
{
"name": {
"value": "happy-dom",
"evidence": "/containers/cna/affected/0/product"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "CVE-2026-118661",
"aliases": [
"CVE-2026-118661"
],
"metrics": [
{
"cvssV3_1": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 6.5,
"attackVector": "NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N",
"integrityImpact": "LOW",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "LOW"
}
}
],
"affected": [
{
"vendor": "capricorn86",
"product": "happy-dom",
"versions": [
{
"status": "affected",
"version": "< 20.14.6"
}
]
}
],
"modified": "2026-10-28T20:30:23.868Z",
"provider": "cve",
"references": [
"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/releases/tag/v20.14.6"
],
"provider_metadata": {
"cna": {
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M",
"dateUpdated": "2026-10-28T20:30:23.868Z"
}
}
},
"related_cves": [
{
"value": "CVE-2026-118661",
"evidence": "/cveMetadata/cveId"
}
],
"security_relevant": true,
"severity_evidence": "/containers/cna/metrics"
},
"source_id": "core-cve",
"document_id": 486263,
"published_at": "2026-10-28T20:30:23.868+00:00"
}