Skip to content
OpenAdvisories
Low · 3.9 CVE-2023-45143 EUVD-2023-2832GHSA-wqq4-5wpv-mx2g

Undici's cookie header not cleared on cross-origin redirect in fetch

Published Oct 12, 2023 · Updated Feb 13, 2025 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
nodejs undici < 5.26.2 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 node-undici 5.26.3+dfsg1+~cs23.10.12-1 —
Debian 13 node-undici 5.26.3+dfsg1+~cs23.10.12-1 —
Debian 12 node-undici 5.15.0+dfsg1+~cs20.10.9.3-1+deb12u2 —
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS node-undici No fix yet —
ReleasePackageFixed inAdvisory
RHEL 9 nodejs +3 1:18.18.2-2.module+el9.2.0.z+20408+7cb5fda5 RHSA-2023:5849
RHEL 9 nodejs-nodemon 3.0.1-1.module+el9.2.0.z+19753+58118bc0 RHSA-2023:5849
RHEL 9 nodejs-packaging +1 2021.06-4.module+el9.1.0+15718+e52ec601 RHSA-2023:5849
RHEL 9 npm 1:9.8.1-1.18.18.2.2.module+el9.2.0.z+20408+7cb5fda5 RHSA-2023:5849
RHEL 8 nodejs +3 1:18.18.2-1.module+el8.8.0+20407+c11d40bd RHSA-2023:7205, RHSA-2023:5869
RHEL 8 nodejs-nodemon 3.0.1-1.module+el8.8.0+19757+8ca87034 RHSA-2023:7205, RHSA-2023:5869
RHEL 8 nodejs-packaging +1 2021.06-4.module+el8.7.0+15582+19c314fa RHSA-2023:7205, RHSA-2023:5869
RHEL 8 npm 1:9.8.1-1.18.18.2.1.module+el8.8.0+20407+c11d40bd RHSA-2023:7205, RHSA-2023:5869

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 nodejs +3 1:18.18.2-2.module_el9.2.0+43+3ebc9e20 ALSA-2023:5849
AlmaLinux 9 nodejs-nodemon 3.0.1-1.module_el9.2.0+36+853e48f5 ALSA-2023:5849
AlmaLinux 9 nodejs-packaging +1 2021.06-4.module_el9.1.0+13+d9a595ea ALSA-2023:5849
AlmaLinux 9 npm 1:9.8.1-1.18.18.2.2.module_el9.2.0+43+3ebc9e20 ALSA-2023:5849
AlmaLinux 8 nodejs +3 1:18.18.2-1.module_el8.8.0+3652+0e111ba0 ALSA-2023:7205, ALSA-2023:5869
AlmaLinux 8 nodejs-nodemon 3.0.1-1.module_el8.8.0+3613+1ed8c91d ALSA-2023:7205, ALSA-2023:5869
AlmaLinux 8 nodejs-packaging +1 2021.06-4.module_el8.7.0+3343+ea2b7901 ALSA-2023:7205, ALSA-2023:5869
AlmaLinux 8 npm 1:9.8.1-1.18.18.2.1.module_el8.8.0+3652+0e111ba0 ALSA-2023:7205, ALSA-2023:5869

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 nodejs-nodemon 3.0.1-1.module+el9.7.0+40017+f0db1785 RLSA-2023:5849
Rocky Linux 9 nodejs-packaging 2021.06-4.module+el9.7.0+40017+f0db1785 RLSA-2023:5849
Rocky Linux 8 nodejs-nodemon 3.0.1-1.module+el8.8.0+1459+02651ab6 RLSA-2023:7205, RLSA-2023:5869
Rocky Linux 8 nodejs-packaging 2021.06-4.module+el8.7.0+1072+5b168780 RLSA-2023:7205, RLSA-2023:5869
ReleasePackageFixed inAdvisory
SLES 15 SP5 nodejs18 18.18.2-150400.9.15.1 SUSE-SU-2023:4133-1
SLES 15 SP4 nodejs16 16.20.2-150400.3.27.2 SUSE-SU-2023:4155-1
SLES 15 SP4 nodejs18 18.18.2-150400.9.15.1 SUSE-SU-2023:4133-1
SLES 15 SP3 nodejs16 16.20.2-150300.7.30.1 SUSE-SU-2023:4207-1
SLES 12 nodejs16 16.20.2-8.36.1 SUSE-SU-2023:4150-1
SLES 12 nodejs18 18.18.2-8.15.1 SUSE-SU-2023:4132-1
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP3 nodejs16 16.20.2-150300.7.30.1 SUSE-SU-2023:4207-1
SLE HPC 15 SP3 nodejs16 16.20.2-150300.7.30.1 SUSE-SU-2023:4207-1
SUSE Manager Server 4.2 nodejs16 16.20.2-150300.7.30.1 SUSE-SU-2023:4207-1
SUSE Enterprise Storage 7.1 nodejs16 16.20.2-150300.7.30.1 SUSE-SU-2023:4207-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed nodejs-electron 25.9.1-2.1 openSUSE-SU-2024:13340-1
openSUSE Tumbleweed nodejs20 20.8.1-1.1 openSUSE-SU-2024:13337-1
ReleasePackageFixed inAdvisory
Alpine v3.24 nodejs 18.18.2-r0 —
Alpine v3.24 nodejs-current 20.8.1-r0 —
Alpine v3.24 openjdk21 21.0.2_p13-r0 —
Alpine v3.23 nodejs 18.18.2-r0 —
Alpine v3.23 nodejs-current 20.8.1-r0 —
Alpine v3.23 openjdk21 21.0.2_p13-r0 —
Alpine v3.22 nodejs 18.18.2-r0 —
Alpine v3.22 nodejs-current 20.8.1-r0 —
Alpine v3.22 openjdk21 21.0.2_p13-r0 —
Alpine v3.21 nodejs 18.18.2-r0 —
Alpine v3.21 nodejs-current 20.8.1-r0 —
Alpine v3.21 openjdk21 21.0.2_p13-r0 —
Alpine v3.20 nodejs 18.18.2-r0 —
Alpine v3.20 nodejs-current 20.8.1-r0 —
Alpine v3.20 openjdk21 21.0.2_p13-r0 —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 nodejs 18.18.2-r0 —
Alpine v3.19 nodejs-current 20.8.1-r0 —
Alpine v3.19 openjdk21 21.0.2_p13-r0 —
Alpine v3.18 nodejs 18.18.2-r0 —
Alpine v3.18 nodejs-current 20.8.1-r0 —
Alpine v3.17 nodejs 18.18.2-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 nodejs +4 1:18.18.2-1.amzn2023.0.1 ALAS2023-2023-412
Amazon Linux 2023 nodejs-npm 1:9.8.1-1.18.18.2.1.amzn2023.0.1 ALAS2023-2023-412
Amazon Linux 2023 v8-10.2-devel 3:10.2.154.26-1.18.18.2.1.amzn2023.0.1 ALAS2023-2023-412

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 2 (CBL-Mariner) nodejs18 18.18.2-2 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 nodejs +3 1:18.18.2-2.module+el9.2.0+21194+c0bbf6cf ELSA-2023-5849
Oracle Linux 9 nodejs-nodemon 3.0.1-1.module+el9.2.0+21169+1d24b6cc ELSA-2023-5849
Oracle Linux 9 nodejs-packaging +1 2021.06-4.module+el9.1.0+20762+f52d7401 ELSA-2023-5849
Oracle Linux 9 npm 1:9.8.1-1.18.18.2.2.module+el9.2.0+21194+c0bbf6cf ELSA-2023-5849
Oracle Linux 8 nodejs +3 1:18.18.2-1.module+el8.8.0+21193+eb5c830b ELSA-2023-7205, ELSA-2023-5869
Oracle Linux 8 nodejs-nodemon 3.0.1-1.module+el8.8.0+21170+2efec6d4 ELSA-2023-7205, ELSA-2023-5869
Oracle Linux 8 nodejs-packaging +1 2021.06-4.module+el8.7.0+20766+0a247725 ELSA-2023-7205, ELSA-2023-5869
Oracle Linux 8 npm 1:9.8.1-1.18.18.2.1.module+el8.8.0+21193+eb5c830b ELSA-2023-7205, ELSA-2023-5869

Affected packages

EcosystemPackageAffectedFixedRecord
npm undici < 5.26.2 5.26.2 GHSA-wqq4-5wpv-mx2g

Advisories 24

References