{"id":"CVE-2023-45143","aliases":["CVE-2023-45143","GHSA-wqq4-5wpv-mx2g"],"related":[],"kind":"vulnerability","state":"published","title":"Undici's cookie header not cleared on cross-origin redirect in fetch","summary":"Undici is an HTTP/1.1 client written from scratch for Node.js. Prior to version 5.26.2, Undici already cleared Authorization headers on cross-origin redirects, but did not clear `Cookie` headers. By design, `cookie` headers are forbidden request headers, disallowing them to be set in RequestInit.headers in browser environments. Since undici handles headers more liberally than the spec, there was a disconnect from the assumptions the spec made, and undici's implementation of fetch. As such this may lead to accidental leakage of cookie to a third-party site or a malicious attacker who can control the redirection target (ie. an open redirector) to leak the cookie to the third party site. This was patched in version 5.26.2. There are no known workarounds.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Undici is an HTTP/1.1 client written from scratch for Node.js. Prior to version 5.26.2, Undici already cleared Authorization headers on cross-origin redirects, but did not clear `Cookie` headers. By design, `cookie` headers are forbidden request headers, disallowing them to be set in RequestInit.headers in browser environments. Since undici handles headers more liberally than the spec, there was a disconnect from the assumptions the spec made, and undici's implementation of fetch. As such this may lead to accidental leakage of cookie to a third-party site or a malicious attacker who can control the redirection target (ie. an open redirector) to leak the cookie to the third party site. This was patched in version 5.26.2. There are no known workarounds.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nUndici clears Authorization headers on cross-origin redirects, but does not clear `Cookie` headers. By design, `cookie` headers are [forbidden request headers](https://fetch.spec.whatwg.org/#forbidden-request-header), disallowing them to be set in `RequestInit.headers` in browser environments. Since Undici handles headers more liberally than the specification, there was a disconnect from the assumptions the spec made, and Undici's implementation of fetch.\n\nAs such this may lead to accidental leakage of cookie to a 3rd-party site or a malicious attacker who can control the redirection target (ie. an open redirector) to leak the cookie to the 3rd party site.\n\n### Patches\n\nThis was patched in [e041de359221ebeae04c469e8aff4145764e6d76](https://github.com/nodejs/undici/commit/e041de359221ebeae04c469e8aff4145764e6d76), which is included in version 5.26.2.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Undici es un cliente HTTP/1.1 escrito desde cero para Node.js. Antes de la versión 5.26.2, Undici ya borraba los encabezados de Autorización en redireccionamientos entre orígenes, pero no borraba los encabezados de \"Cookie\". Por diseño, los encabezados de \"cookie\" son encabezados de solicitud prohibidos, lo que no permite que se establezcan en RequestInit.headers en entornos de navegador. Dado que undici maneja los encabezados de manera más liberal que la especificación, hubo una desconexión con las suposiciones que hizo la especificación y la implementación de fetch por parte de undici. Como tal, esto puede provocar una fuga accidental de cookies a un sitio de terceros o que un atacante malicioso que pueda controlar el objetivo de la redirección (es decir, un redirector abierto) filtre la cookie al sitio de terceros. Esto fue parcheado en la versión 5.26.2. No se conocen workarounds.","source":"nvd"}],"published":"2023-10-12T16:35:40.637Z","modified":"2026-06-17T06:28:18.473Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L","score":3.9,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L","score":3.9,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L","score":3.9,"rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:N","score":3.5,"rating":"LOW"}],"cwes":["CWE-200"],"affected":[{"ranges":[{"version":"< 5.26.2","status":"affected"}],"vendor":"nodejs","product":"undici","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"5.26.2"}],"ecosystem":"npm","package":"undici","purl":"pkg:npm/undici","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.26.2"}],"vendor":"nodejs","product":"undici","cpe":"cpe:2.3:a:nodejs:undici:*:*:*:*:*:node.js:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"37"},{"status":"affected","version":"38"},{"status":"affected","version":"39"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/nodejs/undici/security/advisories/GHSA-wqq4-5wpv-mx2g","tags":["vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nodejs/undici/security/advisories/GHSA-q768-x9m6-m9qp","tags":["not-applicable","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nodejs/undici/commit/e041de359221ebeae04c469e8aff4145764e6d76","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://hackerone.com/reports/2166948","tags":["permissions-required","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nodejs/undici/releases/tag/v5.26.2","tags":["release-notes","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/E72T67UPDRXHIDLO3OROR25YAMN4GGW5/","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/X6QXN4ORIVF6XBW4WWFE7VNPVC74S45Y/","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LKYHSZQFDNR7RSA7LHVLLIAQMVYCUGBG/","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FNA62Q767CFAFHBCDKYNPBMZWB7TWYVU/","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3N4NJ7FR4X4FPZUGNTQAPSTVB2HB2Y4A/","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HT7T2R4MQKLIF4ODV4BDLPARWFPCJ5CZ/","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-45143","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nodejs/undici","tags":["package"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3N4NJ7FR4X4FPZUGNTQAPSTVB2HB2Y4A","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/E72T67UPDRXHIDLO3OROR25YAMN4GGW5","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FNA62Q767CFAFHBCDKYNPBMZWB7TWYVU","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HT7T2R4MQKLIF4ODV4BDLPARWFPCJ5CZ","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LKYHSZQFDNR7RSA7LHVLLIAQMVYCUGBG","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/X6QXN4ORIVF6XBW4WWFE7VNPVC74S45Y","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-17T13:10:30.877Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-45143","url":"https://www.cve.org/CVERecord?id=CVE-2023-45143","licence":"CVE Terms of Use","modified":"2025-02-13T17:13:50.221Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-wqq4-5wpv-mx2g","url":"https://github.com/advisories/GHSA-wqq4-5wpv-mx2g","licence":"CC-BY-4.0","modified":"2026-02-04T02:35:56.289Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-45143","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-45143","licence":"Public domain","modified":"2026-06-17T06:28:18.473Z"}],"updatedAt":"2026-11-25T22:58:28.714Z","epss":{"score":0.01368,"percentile":0.7268,"date":"2026-12-01T12:00:22.000Z"}}