CVE-2022-31151: nodejs undici Open Redirect
Vulnerability summary
CVE-2022-31151 is a medium (CVSS 6.5) Open Redirect vulnerability in nodejs undici. EPSS estimates a 0.74% chance of exploitation in the next 30 days, higher than 53.7% of scored vulnerabilities. 1 public exploit is recorded.
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
54%
Versus all other CVEs
30-day change
+0.02 pp
From 0.72% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundUndici
Maturity: poc
Weaknesses
CWE · root cause- CWE-601URL Redirection to Untrusted Site ('Open Redirect')The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.
- CWE-346Origin Validation ErrorThe product does not properly verify that the source of data or communication is valid.
Affected systems
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