npm
CVE-2026-118661
Happy DOM has cookie scope forgery: no DNS-label boundary on Domain= matching , attacker origin sets victim cookies
- Severity
- Medium 6.5
- Published
- 28 Oct 2026
- Last changed
- 28 Oct 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 20.14.6
- Exploit chance
- 0.3% in the next 30 daysHigher than 26% of CVEs. EPSS by FIRST, 24 Nov 2026
- Weakness
- CWE-565
- Attack
- Over the network · No login needed · No user action needed
- Attacker can
- Read some data · Change some data
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N- Also known as
- GHSA-5fpq-26gf-qwcr
- Sources
- OSV.dev and GitHub
Description
A cookie-scoping bug in happy-dom lets an attacker origin set cookies that a victim origin then receives, diverging from browser semantics.
happy-dom matches Domain=example.com against notexample.com (endsWith without a DNS-label boundary), diverging from browser semantics (verified 20.11.6 npm latest: cookieMatchesURL(Domain=example.com, url=http://notexample.com) = true). Relevant where happy-dom is used for SSR/prerender cookie handling. Matching in src/cookie/CookieContainer.ts.
Cookie-scoping divergence / session forgery . Applications using happy-dom for SSR/prerender cookie handling can accept cookies from wrong origins. Affects happy-dom <= 20.14.5. Note: main pushback will be that happy-dom is a test DOM — state the SSR use case.
Affected software
| Software | Affected versions |
|---|---|
happy-domnpm · osv:npm:happy-dom |
|
About happy-dom
- Weekly downloads (npm)
- 37,849,124npm, 23 Nov 2026
Vulnerabilities in happy-dom
- In our list
- 2
- Published in the last 12 months
- 2
- Critical, last 12 months
- 0
- High, last 12 months
- 1
- Known exploited
- 0
- CVE-2026-118660Happy DOM: SSRF via iframe and link stylesheet when parsing untrusted HTMLHigh 8.6 28 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-118661
- GitHub Advisory Database https://github.com/advisories/GHSA-5fpq-26gf-qwcr