Staging Environment: Content and features may be unstable or change without notice.
Search for vulnerabilities
Vulnerability details: VCID-x5np-z1be-m7gq
Vulnerability ID VCID-x5np-z1be-m7gq
Aliases CVE-2022-31151
GHSA-q768-x9m6-m9qp
Summary undici before v5.8.0 vulnerable to uncleared cookies on cross-host / cross-origin redirect ### Impact Authorization headers are already cleared on cross-origin redirect in https://github.com/nodejs/undici/blob/main/lib/handler/redirect.js#L189, based on https://github.com/nodejs/undici/issues/872. However, cookie headers which are sensitive headers and are official headers found in the spec, remain uncleared. There also has been active discussion of implementing a cookie store https://github.com/nodejs/undici/pull/1441, which suggests that there are active users using cookie headers in undici. 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 v5.8.0. ### Workarounds By default, this vulnerability is not exploitable. Do not enable redirections, i.e. `maxRedirections: 0` (the default). ### References https://hackerone.com/reports/1635514 https://curl.se/docs/CVE-2018-1000007.html https://curl.se/docs/CVE-2022-27776.html ### For more information If you have any questions or comments about this advisory: * Open an issue in [undici repository](https://github.com/nodejs/undici/issues) * To make a report, follow the [SECURITY](https://github.com/nodejs/node/blob/HEAD/SECURITY.md) document
Status Published
Exploitability 0.5
Weighted Severity 3.3
Risk 1.6
Affected and Fixed Packages Package Details
Weaknesses (6)
System Score Found at
cvssv3 3.7 https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2022-31151.json
epss 0.00118 https://api.first.org/data/v1/epss?cve=CVE-2022-31151
epss 0.00118 https://api.first.org/data/v1/epss?cve=CVE-2022-31151
epss 0.00118 https://api.first.org/data/v1/epss?cve=CVE-2022-31151
epss 0.00118 https://api.first.org/data/v1/epss?cve=CVE-2022-31151
epss 0.00118 https://api.first.org/data/v1/epss?cve=CVE-2022-31151
epss 0.00118 https://api.first.org/data/v1/epss?cve=CVE-2022-31151
epss 0.00118 https://api.first.org/data/v1/epss?cve=CVE-2022-31151
epss 0.00118 https://api.first.org/data/v1/epss?cve=CVE-2022-31151
epss 0.00118 https://api.first.org/data/v1/epss?cve=CVE-2022-31151
cvssv3.1 3.7 https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
cvssv3.1_qr LOW https://github.com/advisories/GHSA-q768-x9m6-m9qp
cvssv3.1 3.7 https://github.com/nodejs/undici
generic_textual LOW https://github.com/nodejs/undici
cvssv3.1 3.7 https://github.com/nodejs/undici/blob/main/lib/handler/redirect.js#L189
generic_textual LOW https://github.com/nodejs/undici/blob/main/lib/handler/redirect.js#L189
cvssv3.1 3.7 https://github.com/nodejs/undici/commit/0a5bee9465e627be36bac88edf7d9bbc9626126d
generic_textual LOW https://github.com/nodejs/undici/commit/0a5bee9465e627be36bac88edf7d9bbc9626126d
cvssv3.1 3.7 https://github.com/nodejs/undici/issues/872
generic_textual LOW https://github.com/nodejs/undici/issues/872
ssvc Track https://github.com/nodejs/undici/issues/872
cvssv3.1 3.7 https://github.com/nodejs/undici/pull/1441
generic_textual LOW https://github.com/nodejs/undici/pull/1441
cvssv3.1 3.7 https://github.com/nodejs/undici/releases/tag/v5.8.0
generic_textual LOW https://github.com/nodejs/undici/releases/tag/v5.8.0
cvssv3.1 3.7 https://github.com/nodejs/undici/security/advisories/GHSA-q768-x9m6-m9qp
cvssv3.1_qr LOW https://github.com/nodejs/undici/security/advisories/GHSA-q768-x9m6-m9qp
generic_textual LOW https://github.com/nodejs/undici/security/advisories/GHSA-q768-x9m6-m9qp
ssvc Track https://github.com/nodejs/undici/security/advisories/GHSA-q768-x9m6-m9qp
cvssv3.1 3.7 https://hackerone.com/reports/1635514
generic_textual LOW https://hackerone.com/reports/1635514
ssvc Track https://hackerone.com/reports/1635514
cvssv3.1 3.7 https://nvd.nist.gov/vuln/detail/CVE-2022-31151
generic_textual LOW https://nvd.nist.gov/vuln/detail/CVE-2022-31151
cvssv3.1 3.7 https://security.netapp.com/advisory/ntap-20220909-0006
generic_textual LOW https://security.netapp.com/advisory/ntap-20220909-0006
cvssv3.1 3.7 https://security.netapp.com/advisory/ntap-20220909-0006/
ssvc Track https://security.netapp.com/advisory/ntap-20220909-0006/
No exploits are available.
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N Found at https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2022-31151.json
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N Found at https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N Found at https://github.com/nodejs/undici
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N Found at https://github.com/nodejs/undici/blob/main/lib/handler/redirect.js#L189
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N Found at https://github.com/nodejs/undici/commit/0a5bee9465e627be36bac88edf7d9bbc9626126d
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N Found at https://github.com/nodejs/undici/issues/872
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none


Vector: SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-04-22T15:45:24Z/ Found at https://github.com/nodejs/undici/issues/872
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N Found at https://github.com/nodejs/undici/pull/1441
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N Found at https://github.com/nodejs/undici/releases/tag/v5.8.0
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N Found at https://github.com/nodejs/undici/security/advisories/GHSA-q768-x9m6-m9qp
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none


Vector: SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-04-22T15:45:24Z/ Found at https://github.com/nodejs/undici/security/advisories/GHSA-q768-x9m6-m9qp
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N Found at https://hackerone.com/reports/1635514
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none


Vector: SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-04-22T15:45:24Z/ Found at https://hackerone.com/reports/1635514
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N Found at https://nvd.nist.gov/vuln/detail/CVE-2022-31151
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N Found at https://security.netapp.com/advisory/ntap-20220909-0006
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N Found at https://security.netapp.com/advisory/ntap-20220909-0006/
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none


Vector: SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-04-22T15:45:24Z/ Found at https://security.netapp.com/advisory/ntap-20220909-0006/
Exploit Prediction Scoring System (EPSS)
Percentile 0.30854
EPSS Score 0.00118
Published At April 2, 2026, 12:55 p.m.
Date Actor Action Source VulnerableCode Version
2026-04-01T13:07:17.391762+00:00 GithubOSV Importer Import https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/07/GHSA-q768-x9m6-m9qp/GHSA-q768-x9m6-m9qp.json 38.0.0