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

Exp

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).

Published: 2022-07-21 Last update: 2026-06-17 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-31151 is rated Exploit Available (50/100): CVSS Low severity, with low exploitation likelihood (EPSS 0.56%). Core evidence: 1 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2022-31151

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2022-31151

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.11% 0.56% +0.46%
2 2025-09-30 0.18% 0.11% -0.07%
3 2025-09-27 0.18%

Full EPSS history (20 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-31151

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
3.7 3.1 LOW
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.
2.2 1.4 [email protected]
6.5 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.
3.9 2.5 [email protected]

Weakness enumeration for CVE-2022-31151

GitHub Security Advisory for CVE-2022-31151

GHSA-q768-x9m6-m9qp · Severity: low · Ecosystem: npm — undici before v5.8.0 vulnerable to uncleared cookies on cross-host / cross-origin redirect

OS Trackers for CVE-2022-31151

vendor priority summary link
debian not yet assigned CVE-2022-31151 not yet assigned priority: Debian including 1 source packages (node-undici), 4 status rows across 4 suites (bookworm, forky, sid, trixie): resolved 4. https://security-tracker.debian.org/tracker/CVE-2022-31151
redhat medium https://access.redhat.com/security/cve/CVE-2022-31151
suse low https://www.suse.com/security/cve/CVE-2022-31151/
ubuntu medium CVE-2022-31151 medium priority: Ubuntu including 1 source packages (node-undici), 13 status rows across 13 suites (bionic, focal, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): DNE 5, ignored 5, needs-triage 3. https://ubuntu.com/security/CVE-2022-31151

Affected software / configurations for CVE-2022-31151

Vendor Product Version Raw CPE
nodejs undici < 5.7.1 cpe:2.3:a:nodejs:undici:*:*:*:*:*:node.js:*:*

References for CVE-2022-31151

URL Tags
https://github.com/nodejs/undici/issues/872 Exploit Issue Tracking Third Party Advisory
https://github.com/nodejs/undici/security/advisories/GHSA-q768-x9m6-m9qp Third Party Advisory
https://hackerone.com/reports/1635514 Permissions Required Third Party Advisory
https://security.netapp.com/advisory/ntap-20220909-0006/ Third Party Advisory
cvelogic Threat Intelligence