6.5

CVE-2022-31151: Uncleared cookies on cross-host/cross-origin redirect in undici

Modified
AliasesUBUNTU-CVE-2022-31151DEBIAN-CVE-2022-31151GHSA-q768-x9m6-m9qp
Published 20-07-2022Last modified 22-04-2025

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.

Priority
Routine

Not severe (CVSS 3.7, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
6.5/10
010
Medium · v3.1 (NVD)
EPSS score
0.74%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1github

Advisory lineage

Upstream 0 · Downstream 0 · Related 1

Timeline

  1. 20-07-2022
    PublishedVulnerability first disclosed.
  2. 22-04-2025
    Last 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

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

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • githubUnverified

    Undici

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Version check

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
Npm1 product
  • undici< 5.8.0
Ubuntu1 product
  • node-undiciAll versions (No fix recorded)

4 vendors · 4 products

References

14 links
Show all 14 references