Description
happy-dom may attach cookies from the current page origin (window.location) instead of the request target URL when fetch(..., { credentials: "include" }) is used. This can leak cookies from origin A to destination B.
Recommendation
Update the happy-dom package to the latest compatible version. Followings are version details:
- Affected version(s): < 20.8.9
- Patched version(s): 20.8.9
References
Could your website be exposed too?
SmartScanner can check your website for Happy DOM's fetch credentials include uses page-origin cookies instead of target-origin cookies and gives you actionable findings to investigate.
Start a free scanRelated Issues
- Happy DOM has cookie scope forgery: no DNS-label boundary on Domain= matching , attacker origin sets victim cookies - CVE-2026-118661
- Happy DOM ECMAScriptModuleCompiler: unsanitized export names are interpolated as executable code - CVE-2026-33943
- Happy DOM: SSRF via iframe and link stylesheet when parsing untrusted HTML - CVE-2026-118660
- Happy DOM: Incomplete fix for CVE-2026-33943: unsanitized import alias leads to host code execution - CVE-2026-115895


