CVE-2023-45143

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

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.

Category

3.9
CVSS
Severity: Low
CVSS 3.1 •
EPSS 0.07%
Vendor Advisory github.com
Affected: nodejs undici
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2023-45143?
CVE-2023-45143 has been scored as a low severity vulnerability.
How to fix CVE-2023-45143?
To fix CVE-2023-45143, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2023-45143 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2023-45143 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2023-45143?
CVE-2023-45143 affects nodejs undici.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.