Vulnerability · Published Mar 27, 2026 · Assigned by GitHub_M
CVE-2026-34226Happy DOM's fetch credentials include uses page-origin cookies instead of target-origin cookies
High 7.5
In plain English
A high-severity security flaw in happy-dom from capricorn86. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 41% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | happy-dom | 20.8.9 | GHSA-w4gp-fjgq-3q4g |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| capricorn86 | happy-dom | < 20.8.9 |
Weakness: CWE-201, CWE-359 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
References
- https://github.com/capricorn86/happy-dom/security/advisories/GHSA-w4gp-fjgq-3q4g x_refsource_CONFIRM
- https://github.com/capricorn86/happy-dom/pull/2117 x_refsource_MISC
- https://github.com/capricorn86/happy-dom/commit/68324c21d7b98f53f7bb5a7b3e185bda7106e751 x_refsource_MISC
- https://github.com/capricorn86/happy-dom/blob/f8d8cad41e9722fab9eefb9dfb3cca696462e908/packages/happy-dom/src/fetch/utilities/FetchRequestHeaderUtility.ts x_refsource_MISC
- https://github.com/capricorn86/happy-dom/releases/tag/v20.8.9 x_refsource_MISC
- https://access.redhat.com/security/cve/CVE-2026-34226 vdb-entry, x_refsource_REDHAT
- RHBZ#2452519 issue-tracking, x_refsource_REDHAT
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-34226.json x_sadp-csaf-vex