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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** LOW 3.9
- **CVSS:** 3.9 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: High; User interaction: Required; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: Low; Availability impact: Low
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 1.57% (percentile 76, 2026-11-26)
- **CWE:** CWE-200
- **Aliases:** GHSA-wqq4-5wpv-mx2g
- **Published:** 2023-10-12T16:35:40.637Z
- **Modified:** 2026-06-17T06:28:18.473Z

## Who should check

- Projects that depend on npm package undici (\< 5.26.2)
- Anyone running nodejs undici \< 5.26.2

## 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 and fixed versions

- npm `undici`: affected \< 5.26.2; fixed 5.26.2 (osv)
- nodejs undici: \< 5.26.2 (cvelist)

## Mitigation

- Upgrade undici to 5.26.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-45143. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-45143.md
Affected: undici < 5.26.2
Fixed in: 5.26.2

Steps:
1. Search this machine and project for undici (npm), nodejs undici: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-45143 being exploited?

There is no confirmed exploitation: CVE-2023-45143 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.57% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-45143?

Low: CVSS 3.9 (v3.1, scored by CNA). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2023-45143?

undici \< 5.26.2.

### Is there a fix for CVE-2023-45143?

Yes. Fixed in 5.26.2. Upgrade undici to 5.26.2 or later.

### How do I check if I'm affected by CVE-2023-45143?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/nodejs/undici/security/advisories/GHSA-wqq4-5wpv-mx2g>
- vendor: <https://github.com/nodejs/undici/security/advisories/GHSA-q768-x9m6-m9qp>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2023-45143>
- patch: <https://github.com/nodejs/undici/commit/e041de359221ebeae04c469e8aff4145764e6d76>
- other: <https://hackerone.com/reports/2166948>
- other: <https://github.com/nodejs/undici/releases/tag/v5.26.2>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/E72T67UPDRXHIDLO3OROR25YAMN4GGW5/>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/X6QXN4ORIVF6XBW4WWFE7VNPVC74S45Y/>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LKYHSZQFDNR7RSA7LHVLLIAQMVYCUGBG/>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FNA62Q767CFAFHBCDKYNPBMZWB7TWYVU/>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3N4NJ7FR4X4FPZUGNTQAPSTVB2HB2Y4A/>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HT7T2R4MQKLIF4ODV4BDLPARWFPCJ5CZ/>
- other: <https://github.com/nodejs/undici>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3N4NJ7FR4X4FPZUGNTQAPSTVB2HB2Y4A>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/E72T67UPDRXHIDLO3OROR25YAMN4GGW5>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FNA62Q767CFAFHBCDKYNPBMZWB7TWYVU>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HT7T2R4MQKLIF4ODV4BDLPARWFPCJ5CZ>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LKYHSZQFDNR7RSA7LHVLLIAQMVYCUGBG>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/X6QXN4ORIVF6XBW4WWFE7VNPVC74S45Y>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-45143>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-wqq4-5wpv-mx2g> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-45143> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-45143>
