CVEfocus › CVE database › CVE-2023-45143

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

CVSS 3.9 LowEPSS 1.6% (higher than 76% of CVEs)Published 2023-10-12Updated 2025-02-13Assigner: GitHub_M

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.

CWE-200

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

61Fixed
4Fix pending
1Under investigation
2Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04node-undiciNot affected
vulnerable_code_not_present
Ubuntu 25.10node-undiciNot affected
vulnerable_code_not_present
Ubuntu 24.04node-undiciUnder investigationUBUNTU-CVE-2023-45143
Debian 14node-undiciFixed5.26.3+dfsg1+~cs23.10.12-1DEBIAN-CVE-2023-45143
Debian 13node-undiciFixed5.26.3+dfsg1+~cs23.10.12-1DEBIAN-CVE-2023-45143
Debian 12node-undiciFixed5.15.0+dfsg1+~cs20.10.9.3-1+deb12u2DEBIAN-CVE-2023-45143
Red Hat Enterprise Linux 9nodejsFixed
Affected
1:18.18.2-2.module+el9.2.0.z+20408+7cb5fda5RHSA-2023:5849
Red Hat Enterprise Linux 9nodejs-develFixed1:18.18.2-2.module+el9.2.0.z+20408+7cb5fda5RHSA-2023:5849
Red Hat Enterprise Linux 9nodejs-docsFixed
Affected
1:18.18.2-2.module+el9.2.0.z+20408+7cb5fda5RHSA-2023:5849
Red Hat Enterprise Linux 9nodejs-full-i18nFixed
Affected
1:18.18.2-2.module+el9.2.0.z+20408+7cb5fda5RHSA-2023:5849
Red Hat Enterprise Linux 9nodejs-libsFix pending
Affected
Red Hat Enterprise Linux 9nodejs-nodemonFixed0:3.0.1-1.module+el9.2.0.z+19753+58118bc0RHSA-2023:5849
Red Hat Enterprise Linux 9nodejs-packagingFixed0:2021.06-4.module+el9.1.0+15718+e52ec601RHSA-2023:5849
Red Hat Enterprise Linux 9nodejs-packaging-bundlerFixed0:2021.06-4.module+el9.1.0+15718+e52ec601RHSA-2023:5849
Red Hat Enterprise Linux 9npmFixed
Affected
1:9.8.1-1.18.18.2.2.module+el9.2.0.z+20408+7cb5fda5RHSA-2023:5849
Red Hat Enterprise Linux 8nodejsFixed
Fix deferred
1:20.8.1-1.module+el8.9.0+20473+c4e3d824RHSA-2023:5869
Red Hat Enterprise Linux 8nodejs-develFixed
Fix deferred
1:18.18.2-1.module+el8.8.0+20407+c11d40bdRHSA-2023:7205
Red Hat Enterprise Linux 8nodejs-docsFixed
Fix deferred
1:20.8.1-1.module+el8.9.0+20473+c4e3d824RHSA-2023:5869
Red Hat Enterprise Linux 8nodejs-full-i18nFixed
Fix deferred
1:20.8.1-1.module+el8.9.0+20473+c4e3d824RHSA-2023:5869
Red Hat Enterprise Linux 8nodejs-libsFix pending
Fix deferred
Red Hat Enterprise Linux 8nodejs-nodemonFixed
Fix deferred
0:3.0.1-1.module+el8.9.0+20473+c4e3d824RHSA-2023:5869
Red Hat Enterprise Linux 8nodejs-packagingFixed
Fix deferred
0:2021.06-4.module+el8.9.0+19519+e25b965aRHSA-2023:5869
Red Hat Enterprise Linux 8nodejs-packaging-bundlerFixed
Fix deferred
0:2021.06-4.module+el8.9.0+19519+e25b965aRHSA-2023:5869
Red Hat Enterprise Linux 8npmFixed
Fix deferred
1:9.8.1-1.18.18.2.1.module+el8.8.0+20407+c11d40bdRHSA-2023:7205
Red Hat Enterprise Linux 8v8-12.4-develFix pending
Fix deferred
Red Hat Enterprise Linux 8v8-13.6-develFix pending
Fix deferred
AlmaLinux 9nodejsFixed1:18.18.2-2.module_el9.2.0+43+3ebc9e20ALSA-2023:5849
AlmaLinux 9nodejs-develFixed1:18.18.2-2.module_el9.2.0+43+3ebc9e20ALSA-2023:5849
AlmaLinux 9nodejs-docsFixed1:18.18.2-2.module_el9.2.0+43+3ebc9e20ALSA-2023:5849
AlmaLinux 9nodejs-full-i18nFixed1:18.18.2-2.module_el9.2.0+43+3ebc9e20ALSA-2023:5849
AlmaLinux 9nodejs-nodemonFixed3.0.1-1.module_el9.2.0+36+853e48f5ALSA-2023:5849
AlmaLinux 9nodejs-packagingFixed2021.06-4.module_el9.1.0+13+d9a595eaALSA-2023:5849
AlmaLinux 9nodejs-packaging-bundlerFixed2021.06-4.module_el9.1.0+13+d9a595eaALSA-2023:5849
AlmaLinux 9npmFixed1:9.8.1-1.18.18.2.2.module_el9.2.0+43+3ebc9e20ALSA-2023:5849
AlmaLinux 8nodejsFixed1:20.8.1-1.module_el8.9.0+3675+0258a6d9ALSA-2023:5869
AlmaLinux 8nodejs-develFixed1:18.18.2-1.module_el8.8.0+3652+0e111ba0ALSA-2023:7205
AlmaLinux 8nodejs-docsFixed1:18.18.2-1.module_el8.8.0+3652+0e111ba0ALSA-2023:7205
AlmaLinux 8nodejs-full-i18nFixed1:20.8.1-1.module_el8.9.0+3675+0258a6d9ALSA-2023:5869
AlmaLinux 8nodejs-nodemonFixed3.0.1-1.module_el8.9.0+3675+0258a6d9ALSA-2023:5869
AlmaLinux 8nodejs-packagingFixed2021.06-4.module_el8.7.0+3343+ea2b7901ALSA-2023:7205
AlmaLinux 8nodejs-packaging-bundlerFixed2021.06-4.module_el8.9.0+3684+11b9e959ALSA-2023:5869
AlmaLinux 8npmFixed1:10.1.0-1.20.8.1.1.module_el8.9.0+3675+0258a6d9ALSA-2023:5869
Rocky Linux 9nodejs-nodemonFixed0:3.0.1-1.module+el9.7.0+40022+9ecc286cRLSA-2023:5849
Rocky Linux 9nodejs-packagingFixed0:2021.06-4.module+el9.7.0+40017+f0db1785RLSA-2023:5849
Rocky Linux 8nodejs-nodemonFixed0:3.0.1-1.module+el8.10.0+1989+e60144d9RLSA-2023:5869
Rocky Linux 8nodejs-packagingFixed0:2021.06-4.module+el8.7.0+1072+5b168780RLSA-2023:5869
Alpine Linux 3.24nodejsFixed18.18.2-r0ALPINE-CVE-2023-45143
Alpine Linux 3.24nodejs-currentFixed20.8.1-r0ALPINE-CVE-2023-45143
Alpine Linux 3.24openjdk21Fixed21.0.2_p13-r0ALPINE-CVE-2023-45143
Alpine Linux 3.23nodejsFixed18.18.2-r0ALPINE-CVE-2023-45143
Alpine Linux 3.23nodejs-currentFixed20.8.1-r0ALPINE-CVE-2023-45143
Alpine Linux 3.23openjdk21Fixed21.0.2_p13-r0ALPINE-CVE-2023-45143
Alpine Linux 3.22nodejsFixed18.18.2-r0ALPINE-CVE-2023-45143
Alpine Linux 3.22nodejs-currentFixed20.8.1-r0ALPINE-CVE-2023-45143
Alpine Linux 3.22openjdk21Fixed21.0.2_p13-r0ALPINE-CVE-2023-45143
Alpine Linux 3.21nodejsFixed18.18.2-r0ALPINE-CVE-2023-45143
Alpine Linux 3.21nodejs-currentFixed20.8.1-r0ALPINE-CVE-2023-45143
Alpine Linux 3.21openjdk21Fixed21.0.2_p13-r0ALPINE-CVE-2023-45143
Alpine Linux 3.20nodejsFixed18.18.2-r0ALPINE-CVE-2023-45143
Alpine Linux 3.20nodejs-currentFixed20.8.1-r0ALPINE-CVE-2023-45143
Alpine Linux 3.20openjdk21Fixed21.0.2_p13-r0ALPINE-CVE-2023-45143
Alpine Linux 3.19nodejsFixed18.18.2-r0ALPINE-CVE-2023-45143
Alpine Linux 3.19nodejs-currentFixed20.8.1-r0ALPINE-CVE-2023-45143
Alpine Linux 3.19openjdk21Fixed21.0.2_p13-r0ALPINE-CVE-2023-45143
Alpine Linux 3.18nodejsFixed18.18.2-r0ALPINE-CVE-2023-45143
Alpine Linux 3.18nodejs-currentFixed20.8.1-r0ALPINE-CVE-2023-45143
Alpine Linux 3.17nodejsFixed18.18.2-r0ALPINE-CVE-2023-45143
npm libraryundiciFixed5.26.2GHSA-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.

References

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.