CVE-2023-45143Undici's cookie header not cleared on cross-origin redirect in fetch
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.
What to do
Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, npm: see the table below for the fixed version per release.
Red Hat, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | node-undici | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | node-undici | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | node-undici | Under investigation | UBUNTU-CVE-2023-45143 | |
| Debian 14 | node-undici | Fixed | 5.26.3+dfsg1+~cs23.10.12-1 | DEBIAN-CVE-2023-45143 |
| Debian 13 | node-undici | Fixed | 5.26.3+dfsg1+~cs23.10.12-1 | DEBIAN-CVE-2023-45143 |
| Debian 12 | node-undici | Fixed | 5.15.0+dfsg1+~cs20.10.9.3-1+deb12u2 | DEBIAN-CVE-2023-45143 |
| Red Hat Enterprise Linux 9 | nodejs | Fixed Affected | 1:18.18.2-2.module+el9.2.0.z+20408+7cb5fda5 | RHSA-2023:5849 |
| Red Hat Enterprise Linux 9 | nodejs-devel | Fixed | 1:18.18.2-2.module+el9.2.0.z+20408+7cb5fda5 | RHSA-2023:5849 |
| Red Hat Enterprise Linux 9 | nodejs-docs | Fixed Affected | 1:18.18.2-2.module+el9.2.0.z+20408+7cb5fda5 | RHSA-2023:5849 |
| Red Hat Enterprise Linux 9 | nodejs-full-i18n | Fixed Affected | 1:18.18.2-2.module+el9.2.0.z+20408+7cb5fda5 | RHSA-2023:5849 |
| Red Hat Enterprise Linux 9 | nodejs-libs | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | nodejs-nodemon | Fixed | 0:3.0.1-1.module+el9.2.0.z+19753+58118bc0 | RHSA-2023:5849 |
| Red Hat Enterprise Linux 9 | nodejs-packaging | Fixed | 0:2021.06-4.module+el9.1.0+15718+e52ec601 | RHSA-2023:5849 |
| Red Hat Enterprise Linux 9 | nodejs-packaging-bundler | Fixed | 0:2021.06-4.module+el9.1.0+15718+e52ec601 | RHSA-2023:5849 |
| Red Hat Enterprise Linux 9 | npm | Fixed Affected | 1:9.8.1-1.18.18.2.2.module+el9.2.0.z+20408+7cb5fda5 | RHSA-2023:5849 |
| Red Hat Enterprise Linux 8 | nodejs | Fixed Fix deferred | 1:20.8.1-1.module+el8.9.0+20473+c4e3d824 | RHSA-2023:5869 |
| Red Hat Enterprise Linux 8 | nodejs-devel | Fixed Fix deferred | 1:18.18.2-1.module+el8.8.0+20407+c11d40bd | RHSA-2023:7205 |
| Red Hat Enterprise Linux 8 | nodejs-docs | Fixed Fix deferred | 1:20.8.1-1.module+el8.9.0+20473+c4e3d824 | RHSA-2023:5869 |
| Red Hat Enterprise Linux 8 | nodejs-full-i18n | Fixed Fix deferred | 1:20.8.1-1.module+el8.9.0+20473+c4e3d824 | RHSA-2023:5869 |
| Red Hat Enterprise Linux 8 | nodejs-libs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nodejs-nodemon | Fixed Fix deferred | 0:3.0.1-1.module+el8.9.0+20473+c4e3d824 | RHSA-2023:5869 |
| Red Hat Enterprise Linux 8 | nodejs-packaging | Fixed Fix deferred | 0:2021.06-4.module+el8.9.0+19519+e25b965a | RHSA-2023:5869 |
| Red Hat Enterprise Linux 8 | nodejs-packaging-bundler | Fixed Fix deferred | 0:2021.06-4.module+el8.9.0+19519+e25b965a | RHSA-2023:5869 |
| Red Hat Enterprise Linux 8 | npm | Fixed Fix deferred | 1:9.8.1-1.18.18.2.1.module+el8.8.0+20407+c11d40bd | RHSA-2023:7205 |
| Red Hat Enterprise Linux 8 | v8-12.4-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | v8-13.6-devel | Fix pending Fix deferred | ||
| AlmaLinux 9 | nodejs | Fixed | 1:18.18.2-2.module_el9.2.0+43+3ebc9e20 | ALSA-2023:5849 |
| AlmaLinux 9 | nodejs-devel | Fixed | 1:18.18.2-2.module_el9.2.0+43+3ebc9e20 | ALSA-2023:5849 |
| AlmaLinux 9 | nodejs-docs | Fixed | 1:18.18.2-2.module_el9.2.0+43+3ebc9e20 | ALSA-2023:5849 |
| AlmaLinux 9 | nodejs-full-i18n | Fixed | 1:18.18.2-2.module_el9.2.0+43+3ebc9e20 | ALSA-2023:5849 |
| AlmaLinux 9 | nodejs-nodemon | Fixed | 3.0.1-1.module_el9.2.0+36+853e48f5 | ALSA-2023:5849 |
| AlmaLinux 9 | nodejs-packaging | Fixed | 2021.06-4.module_el9.1.0+13+d9a595ea | ALSA-2023:5849 |
| AlmaLinux 9 | nodejs-packaging-bundler | Fixed | 2021.06-4.module_el9.1.0+13+d9a595ea | ALSA-2023:5849 |
| AlmaLinux 9 | npm | Fixed | 1:9.8.1-1.18.18.2.2.module_el9.2.0+43+3ebc9e20 | ALSA-2023:5849 |
| AlmaLinux 8 | nodejs | Fixed | 1:20.8.1-1.module_el8.9.0+3675+0258a6d9 | ALSA-2023:5869 |
| AlmaLinux 8 | nodejs-devel | Fixed | 1:18.18.2-1.module_el8.8.0+3652+0e111ba0 | ALSA-2023:7205 |
| AlmaLinux 8 | nodejs-docs | Fixed | 1:18.18.2-1.module_el8.8.0+3652+0e111ba0 | ALSA-2023:7205 |
| AlmaLinux 8 | nodejs-full-i18n | Fixed | 1:20.8.1-1.module_el8.9.0+3675+0258a6d9 | ALSA-2023:5869 |
| AlmaLinux 8 | nodejs-nodemon | Fixed | 3.0.1-1.module_el8.9.0+3675+0258a6d9 | ALSA-2023:5869 |
| AlmaLinux 8 | nodejs-packaging | Fixed | 2021.06-4.module_el8.7.0+3343+ea2b7901 | ALSA-2023:7205 |
| AlmaLinux 8 | nodejs-packaging-bundler | Fixed | 2021.06-4.module_el8.9.0+3684+11b9e959 | ALSA-2023:5869 |
| AlmaLinux 8 | npm | Fixed | 1:10.1.0-1.20.8.1.1.module_el8.9.0+3675+0258a6d9 | ALSA-2023:5869 |
| Rocky Linux 9 | nodejs-nodemon | Fixed | 0:3.0.1-1.module+el9.7.0+40022+9ecc286c | RLSA-2023:5849 |
| Rocky Linux 9 | nodejs-packaging | Fixed | 0:2021.06-4.module+el9.7.0+40017+f0db1785 | RLSA-2023:5849 |
| Rocky Linux 8 | nodejs-nodemon | Fixed | 0:3.0.1-1.module+el8.10.0+1989+e60144d9 | RLSA-2023:5869 |
| Rocky Linux 8 | nodejs-packaging | Fixed | 0:2021.06-4.module+el8.7.0+1072+5b168780 | RLSA-2023:5869 |
| Alpine Linux 3.24 | nodejs | Fixed | 18.18.2-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.24 | nodejs-current | Fixed | 20.8.1-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.24 | openjdk21 | Fixed | 21.0.2_p13-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.23 | nodejs | Fixed | 18.18.2-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.23 | nodejs-current | Fixed | 20.8.1-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.23 | openjdk21 | Fixed | 21.0.2_p13-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.22 | nodejs | Fixed | 18.18.2-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.22 | nodejs-current | Fixed | 20.8.1-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.22 | openjdk21 | Fixed | 21.0.2_p13-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.21 | nodejs | Fixed | 18.18.2-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.21 | nodejs-current | Fixed | 20.8.1-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.21 | openjdk21 | Fixed | 21.0.2_p13-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.20 | nodejs | Fixed | 18.18.2-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.20 | nodejs-current | Fixed | 20.8.1-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.20 | openjdk21 | Fixed | 21.0.2_p13-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.19 | nodejs | Fixed | 18.18.2-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.19 | nodejs-current | Fixed | 20.8.1-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.19 | openjdk21 | Fixed | 21.0.2_p13-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.18 | nodejs | Fixed | 18.18.2-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.18 | nodejs-current | Fixed | 20.8.1-r0 | ALPINE-CVE-2023-45143 |
| Alpine Linux 3.17 | nodejs | Fixed | 18.18.2-r0 | ALPINE-CVE-2023-45143 |
| npm library | undici | Fixed | 5.26.2 | GHSA-q768-x9m6-m9qp |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- nodejs undici: affected: < 5.26.2
References
- https://github.com/nodejs/undici/security/advisories/GHSA-wqq4-5wpv-mx2g
- https://github.com/nodejs/undici/security/advisories/GHSA-q768-x9m6-m9qp
- https://github.com/nodejs/undici/commit/e041de359221ebeae04c469e8aff4145764e6d76
- https://hackerone.com/reports/2166948
- https://github.com/nodejs/undici/releases/tag/v5.26.2
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/E72T67UPDRXHIDLO3OROR25YAMN4GGW5/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/X6QXN4ORIVF6XBW4WWFE7VNPVC74S45Y/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LKYHSZQFDNR7RSA7LHVLLIAQMVYCUGBG/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FNA62Q767CFAFHBCDKYNPBMZWB7TWYVU/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3N4NJ7FR4X4FPZUGNTQAPSTVB2HB2Y4A/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HT7T2R4MQKLIF4ODV4BDLPARWFPCJ5CZ/
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.