{"schemaVersion":3,"id":"CVE-2022-31151","aliases":["UBUNTU-CVE-2022-31151","DEBIAN-CVE-2022-31151","GHSA-q768-x9m6-m9qp"],"status":"published","duplicateOf":null,"title":null,"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).","dates":{"published":"2022-07-20T23:00:15.000Z","modified":"2025-04-22T17:48:20.472Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":6.5,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":3.7,"severity":"low","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":6.5,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","exploitability":10,"impact":4.2,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":6.5,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","exploitability":10,"impact":4.2,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Npm","score":3.7,"severity":"low","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","exploitability":5.6,"impact":2.3,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":6.5,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00739,"percentile":0.53736,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.02199999999999997,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.00717},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00739,"percentile":0.53736}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00739,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00739,"percentile":0.53736}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"GITHUB_NODEJS_UNDICI","name":"Undici","source":"github","url":"https://github.com/nodejs/undici/security/advisories/GHSA-3cvr-822r-rqcc","maturity":"poc","reliabilityScore":0.3,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-601","name":"URL Redirection to Untrusted Site ('Open Redirect')","description":"The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"Low","url":"https://cwe.mitre.org/data/definitions/601.html"},{"id":"CWE-346","name":"Origin Validation Error","description":"The product does not properly verify that the source of data or communication is valid.","type":"weakness","status":"Draft","abstraction":"Class","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/346.html"}],"affected":[{"vendor":"debian","product":"node-undici","name":"node-undici","label":"node-undici","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/node-undici","purlType":"deb","versions":[{"text":"< 5.8.0+dfsg1+~cs18.9.16-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 5.8.0+dfsg1+~cs18.9.16-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"node-undici","name":"node-undici","label":"node-undici","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/node-undici","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"nodejs","product":"undici","name":"undici","label":"undici","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 5.7.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 5.7.1","eol":null,"hubHref":"/vendor/nodejs/undici"},{"vendor":"Npm","product":"undici","name":"undici","label":"undici","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/undici","purlType":"npm","versions":[{"text":"< 5.8.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 5.8.0","eol":null,"hubHref":null}],"affectedCount":4,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/nodejs/undici/security/advisories/GHSA-q768-x9m6-m9qp","label":"github.com/nodejs/undici/security/advisories/GHSA-q768-x9m6-m9qp","hostname":"github.com","tags":["X Refsource CONFIRM","REPORT","WEB","Third Party Advisory"]},{"url":"https://github.com/nodejs/undici/issues/872","label":"github.com/nodejs/undici/issues/872","hostname":"github.com","tags":["X Refsource MISC","REPORT","WEB","Exploit","Issue Tracking","Third Party Advisory"]},{"url":"https://hackerone.com/reports/1635514","label":"hackerone.com/reports/1635514","hostname":"hackerone.com","tags":["X Refsource MISC","REPORT","WEB","Permissions Required","Third Party Advisory"]},{"url":"https://security.netapp.com/advisory/ntap-20220909-0006/","label":"security.netapp.com/advisory/ntap-20220909-0006/","hostname":"security.netapp.com","tags":["X Refsource CONFIRM","Third Party Advisory"]},{"url":"https://ubuntu.com/security/CVE-2022-31151","label":"ubuntu.com/security/CVE-2022-31151","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-31151","label":"www.cve.org/CVERecord?id=CVE-2022-31151","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-31151","label":"security-tracker.debian.org/tracker/CVE-2022-31151","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31151","label":"nvd.nist.gov/vuln/detail/CVE-2022-31151","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/nodejs/undici/pull/1441","label":"github.com/nodejs/undici/pull/1441","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/nodejs/undici/commit/0a5bee9465e627be36bac88edf7d9bbc9626126d","label":"github.com/nodejs/undici/commit/0a5bee9465e627be36bac88edf7d9bbc9626126d","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/nodejs/undici","label":"github.com/nodejs/undici","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/nodejs/undici/blob/main/lib/handler/redirect.js#L189","label":"github.com/nodejs/undici/blob/main/lib/handler/redirect.js","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/nodejs/undici/releases/tag/v5.8.0","label":"github.com/nodejs/undici/releases/tag/v5.8.0","hostname":"github.com","tags":["WEB"]},{"url":"https://security.netapp.com/advisory/ntap-20220909-0006","label":"security.netapp.com/advisory/ntap-20220909-0006","hostname":"security.netapp.com","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":["CVE-2023-45143"]},"timeline":[{"kind":"published","date":"2022-07-20T23:00:15.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-04-22T17:48:20.472Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":36,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-19T23:57:02.973Z","stale":false,"partial":false}}