Skip to content

← Actionable
Low, CVSS 3.9amended

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

CVE-2023-45143GHSA-wqq4-5wpv-mx2g

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (node 20.8.1, 18.18.2; undici 5.26.2), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • runtime node

    Affected
    >= 18.0.0, < 18.18.2>= 20.0.0, < 20.8.1
    Fixed in
    20.8.1, 18.18.2
  • npm undici

    Affected
    < 5.26.2
    Fixed in
    5.26.2

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
3.9 · CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L
EPSS
  • CVE-2023-45143: 1.37% estimated exploitation activity in the next 30 days; percentile 71.90 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Impact Undici clears Authorization headers on cross-origin redirects, but does 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 specification, 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 3rd-party site or a malicious attacker who can control the redirection target (ie. an open redirector) to leak the cookie to the 3rd party site. Patches This was patched in e041de359221ebeae04c469e8aff4145764e6d76, which is included in version 5.26.2.

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 3 · amended ·

    Amended from vendor_advisory record nodejs-security-wg:core:125

  2. Revision 2 · amended ·

    Amended from ghsa record GHSA-wqq4-5wpv-mx2g

  3. Revision 1 · created ·

    Published from osv record GHSA-wqq4-5wpv-mx2g

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2023-45143

Advisory: Undici's cookie header not cleared on cross-origin redirect in fetch
IDs: CVE-2023-45143, GHSA-wqq4-5wpv-mx2g
Record: https://patchnext.com/advisories/cve-2023-45143 (revision 3, source checked 26 Oct 2026, 16:40 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Low (CVSS 3.9)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: node 20.8.1, 18.18.2; undici 5.26.2. A vendor fix does not mean a deployment is fixed.

## Affected components
- runtime node: affected >= 18.0.0, < 18.18.2; >= 20.0.0, < 20.8.1; fixed in 20.8.1, 18.18.2
- npm undici: affected < 5.26.2; fixed in 5.26.2

## Suggested inspection (read-only)
- runtime node: check the installed version with your package manager.
- `npm ls undici --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on node, undici.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-wqq4-5wpv-mx2g (OSV record GHSA-wqq4-5wpv-mx2g lists affected ranges: npm undici >=0 <5.26.2 (fixed))
- Verified: https://github.com/advisories/GHSA-wqq4-5wpv-mx2g (GitHub-reviewed advisory GHSA-wqq4-5wpv-mx2g lists affected ranges: npm undici >=0 <5.26.2)
- Verified: https://raw.githubusercontent.com/nodejs/security-wg/main/vuln/core/125.json (Node.js security working group core entry 125 lists CVE-2023-45143 affecting node >=18.0.0 =20.0.0 <20.8.1)
- Verified: https://nodejs.org/dist/index.json (The nodejs.org release index dates the first patched release for CVE-2023-45143 to 2023-10-13.)

Commands are suggestions: review each one before running it.

Loading voting…