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

> Happy DOM leaks cookies from the current page origin to the target URL during fetch requests, exposing sensitive session data.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 Mar 2026
- **Updated:** 15 Jul 2026
- **Also known as:** CLSA-2026-1790598377, CLSA-2026-1792191308, CLSA-2026-1792254633, CLSA-2026-1792254634, CLSA-2026-1792866974, CLSA-2026-1792866976, GHSA-w4gp-fjgq-3q4g

## What is CVE-2026-34226?

CVE-2026-34226 is a high-severity vulnerability in capricorn86 happy-dom, published on 27 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### 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.

Weakness: CWE-359 (Exposure of Private Personal Information to an Unauthorized Actor), CWE-201 (Insertion of Sensitive Information Into Sent Data)

## Which versions are affected by CVE-2026-34226?

2 open source packages ship an affected version, including happy-dom. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `happy-dom` | npm | All versions | 20.8.9 |
| `happy-dom` | npm | All versions | 20.8.9 |

Products: Capricorn86 Happy Dom.

## How do I fix CVE-2026-34226?

Upgrade happy-dom to 20.8.9 or later.

## Is CVE-2026-34226 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-34226 exists.

## Other vulnerabilities in capricorn86 happy-dom

- [CVE-2026-33943](https://insights.sbomify.com/CVE-2026-33943/): Happy DOM ECMAScriptModuleCompiler: unsanitized export names are interpolated as executable code (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-34226 and fix it if it is affected.

What it is: CVE-2026-34226 is a high-severity vulnerability in capricorn86 happy-dom, published on 27 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-34226 exists.

Affected packages and fixed versions:
- happy-dom (npm): affected all versions; fixed in 20.8.9
- happy-dom (npm): affected all versions; fixed in 20.8.9

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-34226/ (Markdown: https://insights.sbomify.com/CVE-2026-34226/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-34226
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-34226
- OSV: https://osv.dev/vulnerability/CVE-2026-34226

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-34226/
Summaries are generated and may contain mistakes; the official description above is the record.
