{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-31151","id":"CVE-2022-31151","title":"Uncleared cookies on cross-host/cross-origin redirect in undici","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 cooki","descriptionLong":"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-20T23:00:15.000Z","updated":"2026-06-17T04:44:54.663Z","reserved":"2022-05-18T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","rating":"low","source":"GitHub_M"},"metrics":[{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","rating":"low","source":"GitHub_M"},{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","rating":"low","source":"github.com"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","rating":"low","source":"OSV"},{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","rating":"low","source":"GitHub"}],"rating":"low","products":["nodejs undici"],"affectedProducts":[{"vendor":"nodejs","product":"undici","defaultStatus":null,"versions":[{"status":"affected","version":"< 5.7.1"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"undici","purl":"pkg:npm/undici","ranges":["<5.8.0"],"fixed":["5.8.0"],"advisory":"GHSA-q768-x9m6-m9qp"}],"cwes":["CWE-601","CWE-346","CWE-93"],"aliases":["GHSA-q768-x9m6-m9qp"],"references":[{"url":"https://github.com/nodejs/undici/security/advisories/GHSA-q768-x9m6-m9qp","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/nodejs/undici/issues/872","tags":["x_refsource_MISC","x_transferred","Exploit","Issue Tracking","Third Party Advisory","report","web"]},{"url":"https://hackerone.com/reports/1635514","tags":["x_refsource_MISC","x_transferred","Permissions Required","Third Party Advisory","web"]},{"url":"https://security.netapp.com/advisory/ntap-20220909-0006/","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31151.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31151","tags":["advisory"]},{"url":"https://github.com/nodejs/undici/pull/1441","tags":["web"]},{"url":"https://github.com/nodejs/undici/commit/0a5bee9465e627be36bac88edf7d9bbc9626126d","tags":["web"]},{"url":"https://github.com/nodejs/undici","tags":["package"]},{"url":"https://github.com/nodejs/undici/blob/main/lib/handler/redirect.js#L189","tags":["web"]},{"url":"https://github.com/nodejs/undici/releases/tag/v5.8.0","tags":["web"]},{"url":"https://security.netapp.com/advisory/ntap-20220909-0006","tags":["web"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.00739,"epssPercentile":0.55338,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-31151","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31151","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-31151","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-q768-x9m6-m9qp","ok":true,"note":"GHSA-q768-x9m6-m9qp"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-31151","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":["nodejs"],"critical":[],"attention":null}