CVE-2026-34226: Happy DOM's fetch credentials include uses page-origin cookies instead of target-origin cookies
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.
References
- github.com/advisories/GHSA-w4gp-fjgq-3q4g
- github.com/capricorn86/happy-dom
- github.com/capricorn86/happy-dom/blob/f8d8cad41e9722fab9eefb9dfb3cca696462e908/packages/happy-dom/src/fetch/utilities/FetchRequestHeaderUtility.ts
- github.com/capricorn86/happy-dom/commit/68324c21d7b98f53f7bb5a7b3e185bda7106e751
- github.com/capricorn86/happy-dom/pull/2117
- github.com/capricorn86/happy-dom/releases/tag/v20.8.9
- github.com/capricorn86/happy-dom/security/advisories/GHSA-w4gp-fjgq-3q4g
- nvd.nist.gov/vuln/detail/CVE-2026-34226
Code Behaviors & Features
Detect and mitigate CVE-2026-34226 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →