Vulnerability · Published Oct 12, 2023 · Assigned by GitHub_M
CVE-2023-45143Undici's cookie header not cleared on cross-origin redirect in fetch
Low 3.9
In plain English
A low-severity information exposure in undici from nodejs. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.4% (higher than 72% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | nodejs | 1:18.18.2-1.module_el8.8.0+3652+0e111ba0 | ALSA-2023:5869 |
| AlmaLinux:8 | nodejs | 1:20.8.1-1.module_el8.9.0+3675+0258a6d9 | ALSA-2023:7205 |
| AlmaLinux:9 | nodejs | 1:18.18.2-2.module_el9.2.0+43+3ebc9e20 | ALSA-2023:5849 |
| AlmaLinux:8 | nodejs-devel | 1:20.8.1-1.module_el8.9.0+3675+0258a6d9 | ALSA-2023:7205 |
| AlmaLinux:8 | nodejs-devel | 1:18.18.2-1.module_el8.8.0+3652+0e111ba0 | ALSA-2023:5869 |
| AlmaLinux:9 | nodejs-devel | 1:18.18.2-2.module_el9.2.0+43+3ebc9e20 | ALSA-2023:5849 |
| AlmaLinux:8 | nodejs-docs | 1:20.8.1-1.module_el8.9.0+3675+0258a6d9 | ALSA-2023:7205 |
| AlmaLinux:8 | nodejs-docs | 1:18.18.2-1.module_el8.8.0+3652+0e111ba0 | ALSA-2023:5869 |
| AlmaLinux:9 | nodejs-docs | 1:18.18.2-2.module_el9.2.0+43+3ebc9e20 | ALSA-2023:5849 |
| AlmaLinux:8 | nodejs-full-i18n | 1:18.18.2-1.module_el8.8.0+3652+0e111ba0 | ALSA-2023:5869 |
| AlmaLinux:8 | nodejs-full-i18n | 1:20.8.1-1.module_el8.9.0+3675+0258a6d9 | ALSA-2023:7205 |
| AlmaLinux:9 | nodejs-full-i18n | 1:18.18.2-2.module_el9.2.0+43+3ebc9e20 | ALSA-2023:5849 |
| AlmaLinux:8 | nodejs-nodemon | 3.0.1-1.module_el8.8.0+3613+1ed8c91d | ALSA-2023:5869 |
| AlmaLinux:8 | nodejs-nodemon | 3.0.1-1.module_el8.9.0+3675+0258a6d9 | ALSA-2023:7205 |
| AlmaLinux:9 | nodejs-nodemon | 3.0.1-1.module_el9.2.0+36+853e48f5 | ALSA-2023:5849 |
| AlmaLinux:8 | nodejs-packaging | 2021.06-4.module_el8.7.0+3343+ea2b7901 | ALSA-2023:5869 |
| AlmaLinux:8 | nodejs-packaging | 2021.06-4.module_el8.9.0+3684+11b9e959 | ALSA-2023:7205 |
| AlmaLinux:9 | nodejs-packaging | 2021.06-4.module_el9.1.0+13+d9a595ea | ALSA-2023:5849 |
| AlmaLinux:8 | nodejs-packaging-bundler | 2021.06-4.module_el8.7.0+3343+ea2b7901 | ALSA-2023:5869 |
| AlmaLinux:8 | nodejs-packaging-bundler | 2021.06-4.module_el8.9.0+3684+11b9e959 | ALSA-2023:7205 |
| AlmaLinux:9 | nodejs-packaging-bundler | 2021.06-4.module_el9.1.0+13+d9a595ea | ALSA-2023:5849 |
| AlmaLinux:8 | npm | 1:10.1.0-1.20.8.1.1.module_el8.9.0+3675+0258a6d9 | ALSA-2023:7205 |
| AlmaLinux:8 | npm | 1:9.8.1-1.18.18.2.1.module_el8.8.0+3652+0e111ba0 | ALSA-2023:5869 |
| AlmaLinux:9 | npm | 1:9.8.1-1.18.18.2.2.module_el9.2.0+43+3ebc9e20 | ALSA-2023:5849 |
| Alpine:v3.20 | nodejs | 18.18.2-r0 | ALPINE-CVE-2023-45143 |
| Alpine:v3.21 | nodejs | 18.18.2-r0 | ALPINE-CVE-2023-45143 |
| Alpine:v3.22 | nodejs | 18.18.2-r0 | ALPINE-CVE-2023-45143 |
| Alpine:v3.23 | nodejs | 18.18.2-r0 | ALPINE-CVE-2023-45143 |
| Alpine:v3.24 | nodejs | 18.18.2-r0 | ALPINE-CVE-2023-45143 |
| Alpine:v3.20 | nodejs-current | 20.8.1-r0 | ALPINE-CVE-2023-45143 |
| Alpine:v3.21 | nodejs-current | 20.8.1-r0 | ALPINE-CVE-2023-45143 |
| Alpine:v3.22 | nodejs-current | 20.8.1-r0 | ALPINE-CVE-2023-45143 |
| Alpine:v3.23 | nodejs-current | 20.8.1-r0 | ALPINE-CVE-2023-45143 |
| Alpine:v3.24 | nodejs-current | 20.8.1-r0 | ALPINE-CVE-2023-45143 |
| Alpine:v3.20 | openjdk21 | 21.0.2_p13-r0 | ALPINE-CVE-2023-45143 |
| Alpine:v3.21 | openjdk21 | 21.0.2_p13-r0 | ALPINE-CVE-2023-45143 |
| Alpine:v3.22 | openjdk21 | 21.0.2_p13-r0 | ALPINE-CVE-2023-45143 |
| Alpine:v3.23 | openjdk21 | 21.0.2_p13-r0 | ALPINE-CVE-2023-45143 |
| Alpine:v3.24 | openjdk21 | 21.0.2_p13-r0 | ALPINE-CVE-2023-45143 |
| Debian:12 | node-undici | 5.15.0+dfsg1+~cs20.10.9.3-1+deb12u2 | DEBIAN-CVE-2023-45143 |
| Debian:13 | node-undici | 5.26.3+dfsg1+~cs23.10.12-1 | DEBIAN-CVE-2023-45143 |
| Debian:14 | node-undici | 5.26.3+dfsg1+~cs23.10.12-1 | DEBIAN-CVE-2023-45143 |
| Rocky Linux:8 | nodejs-nodemon | 0:3.0.1-1.module+el8.10.0+1824+532140ee | RLSA-2023:5869 |
| Rocky Linux:8 | nodejs-nodemon | 0:3.0.1-1.module+el8.8.0+1459+02651ab6 | RLSA-2023:7205 |
| Rocky Linux:8 | nodejs-nodemon | 0:3.0.1-1.module+el8.10.0+1989+e60144d9 | RLSA-2023:5869 |
| Rocky Linux:8 | nodejs-nodemon | 0:3.0.1-1.module+el8.10.0+1988+437f3d23 | RLSA-2023:5869 |
| Rocky Linux:8 | nodejs-nodemon | 0:3.0.1-1.module+el8.9.0+1760+903d54b9 | RLSA-2023:5869 |
| Rocky Linux:9 | nodejs-nodemon | 0:3.0.1-1.module+el9.7.0+40018+a011993d | RLSA-2023:5849 |
| Rocky Linux:9 | nodejs-nodemon | 0:3.0.1-1.module+el9.7.0+40017+f0db1785 | RLSA-2023:5849 |
| Rocky Linux:9 | nodejs-nodemon | 0:3.0.1-1.module+el9.7.0+40022+9ecc286c | RLSA-2023:5849 |
| Rocky Linux:8 | nodejs-packaging | 0:2021.06-4.module+el8.10.0+1989+e60144d9 | RLSA-2023:5869 |
| Rocky Linux:8 | nodejs-packaging | 0:2021.06-4.module+el8.7.0+1072+5b168780 | RLSA-2023:7205 |
| Rocky Linux:8 | nodejs-packaging | 0:2021.06-4.module+el8.10.0+1824+532140ee | RLSA-2023:5869 |
| Rocky Linux:8 | nodejs-packaging | 0:2021.06-4.module+el8.10.0+1988+437f3d23 | RLSA-2023:5869 |
| Rocky Linux:9 | nodejs-packaging | 0:2021.06-4.module+el9.7.0+40025+0e0cf6b2 | RLSA-2023:5849 |
| Rocky Linux:9 | nodejs-packaging | 0:2021.06-4.module+el9.7.0+40017+f0db1785 | RLSA-2023:5849 |
| Rocky Linux:9 | nodejs-packaging | 0:2021.06-4.module+el9.7.0+40018+a011993d | RLSA-2023:5849 |
| Rocky Linux:9 | nodejs-packaging | 0:2021.06-4.module+el9.7.0+40022+9ecc286c | RLSA-2023:5849 |
| Ubuntu:24.04:LTS | node-undici | no fix listed | UBUNTU-CVE-2023-45143 |
| npm | undici | 5.26.2 | GHSA-wqq4-5wpv-mx2g |
Affected products (as reported)
Weakness: CWE-200 · Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L
References
- https://github.com/nodejs/undici/security/advisories/GHSA-wqq4-5wpv-mx2g x_refsource_CONFIRM
- https://github.com/nodejs/undici/security/advisories/GHSA-q768-x9m6-m9qp x_refsource_MISC
- https://github.com/nodejs/undici/commit/e041de359221ebeae04c469e8aff4145764e6d76 x_refsource_MISC
- https://hackerone.com/reports/2166948 x_refsource_MISC
- https://github.com/nodejs/undici/releases/tag/v5.26.2 x_refsource_MISC
- 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/