{"id":"CVE-2022-31150","aliases":["GHSA-3cvr-822r-rqcc"],"url":"https://o3.security/vulnerability/CVE-2022-31150","summary":"CRLF injection in request headers","details":"### Impact\n\nIt is possible to inject CRLF sequences into request headers in Undici.\n\n```js\nconst undici = require('undici')\n\nconst response = undici.request(\"http://127.0.0.1:1000\", {\n  headers: {'a': \"\\r\\nb\"}\n})\n```\n\nThe same applies to `path` and `method`\n\n### Patches\n\nUpdate to v5.8.0\n\n### Workarounds\n\nSanitize all HTTP headers from untrusted sources to eliminate `\\r\\n`.\n\n### References\n\nhttps://hackerone.com/reports/409943\nhttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-12116\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in [undici repository](https://github.com/nodejs/undici/issues)\n* To make a report, follow the [SECURITY](https://github.com/nodejs/node/blob/HEAD/SECURITY.md) document\n","published":"2022-07-19T20:40:10Z","modified":"2026-10-28T02:30:51.941329196Z","cvss":{"score":5.3,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":2,"affectedPackages":[{"ecosystem":"npm","name":"undici","fixedVersion":"5.8.0"}],"fix":{"url":"https://github.com/nodejs/undici/commit/a29a151d0140d095742d21a004023d024fe93259","label":"nodejs/undici@a29a151"},"references":[{"type":"WEB","url":"https://github.com/nodejs/undici/releases/tag/v5.8.0"},{"type":"WEB","url":"https://hackerone.com/reports/409943"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31150.json"},{"type":"ADVISORY","url":"https://github.com/nodejs/undici/security/advisories/GHSA-3cvr-822r-rqcc"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31150"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20220915-0002/"},{"type":"WEB","url":"https://github.com/nodejs/undici/commit/a29a151d0140d095742d21a004023d024fe93259"},{"type":"PACKAGE","url":"https://github.com/nodejs/undici"},{"type":"WEB","url":"https://security.netapp.com/advisory/ntap-20220915-0002"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:30:51.941329196Z"}}