CVE-2022-31151: Uncleared cookies on cross-host/cross-origin redirect in undici
Vulnerability summary
CVE-2022-31151 is a medium (CVSS 6.5) URL Redirection to Untrusted Site vulnerability in nodejs undici. EPSS estimates a 0.74% chance of exploitation in the next 30 days, higher than 55.9% of scored vulnerabilities. 1 public exploit is recorded.
Not severe (CVSS 3.7, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 0 · Related 1Timeline
- 20-07-2022PublishedVulnerability first disclosed.
- 22-04-2025Last modifiedVulnerability information updated.
Description
Authorization headers are cleared on cross-origin redirect. However, cookie headers which are sensitive headers and are official headers found in the spec, remain uncleared. There are active users using cookie headers in undici. 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. This was patched in v5.7.1. By default, this vulnerability is not exploitable. Do not enable redirections, i.e. `maxRedirections: 0` (the default).
CVSS metrics
5 scores · 5 sources · 1 version- CVE.orgCNA3.7LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:NDiffers
- OSV · UbuntuEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
- OSV · DebianEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
- OSV · NpmEcosystem advisory · calculated3.7LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:NDiffers
EPSS trend
Probability
0.74%
Chance of exploitation in the next 30 days
Percentile
56%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.74% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundUndici
Maturity: poc
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Debian1 product
- node-undici< 5.8.0+dfsg1+~cs18.9.16-1
Nodejs1 product
- undici< 5.7.1
Npm1 product
- undici< 5.8.0
Ubuntu1 product
- node-undiciAll versions (No fix recorded)
4 vendors · 4 products
References
14 links- github.com/nodejs/undici/security/advisories/GHSA-q768-x9m6-m9qpX Refsource CONFIRMREPORTWEBThird Party Advisory
- github.com/nodejs/undici/issues/872X Refsource MISCREPORTWEBExploitIssue TrackingThird Party Advisory