{"id":"CVE-2022-31150","aliases":["CVE-2022-31150","GHSA-3cvr-822r-rqcc"],"related":[],"kind":"vulnerability","state":"published","title":"CRLF injection in request headers","summary":"undici is an HTTP/1.1 client, written from scratch for Node.js. It is possible to inject CRLF sequences into request headers in undici in versions less than 5.7.1. A fix was released in version 5.8.0. Sanitizing all HTTP headers from untrusted sources to eliminate `\\r\\n` is a workaround for this issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"undici is an HTTP/1.1 client, written from scratch for Node.js. It is possible to inject CRLF sequences into request headers in undici in versions less than 5.7.1. A fix was released in version 5.8.0. Sanitizing all HTTP headers from untrusted sources to eliminate `\\r\\n` is a workaround for this issue.","source":"cvelist"},{"lang":"en","text":"### 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","format":"markdown","source":"ghsa"},{"lang":"es","text":"undici es un cliente HTTP/1.1, escrito desde cero para Node.js. Es posible inyectar secuencias de tipo CRLF en los encabezados de las peticiones en undici en versiones anteriores a 5.7.1. En versión 5.8.0 ha sido publicada una corrección. Una corrección a este problema es sanear todas las cabeceras HTTP de fuentes no confiables para eliminar las secuencias de tipo CRLF.","source":"nvd"}],"published":"2022-07-19T20:40:10.000Z","modified":"2026-06-17T04:44:54.533Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-93"],"affected":[{"ranges":[{"version":"< v5.7.1, >= v5.8.0","status":"affected"}],"vendor":"nodejs","product":"undici","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"5.8.0"}],"ecosystem":"npm","package":"undici","purl":"pkg:npm/undici","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.8.0"}],"vendor":"nodejs","product":"undici","cpe":"cpe:2.3:a:nodejs:undici:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/nodejs/undici/security/advisories/GHSA-3cvr-822r-rqcc","tags":["exploit","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://hackerone.com/reports/409943","tags":["exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nodejs/undici/releases/tag/v5.8.0","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://security.netapp.com/advisory/ntap-20220915-0002/","tags":["third-party-advisory","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31150","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nodejs/undici/commit/a29a151d0140d095742d21a004023d024fe93259","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/nodejs/undici","tags":["package"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20220915-0002","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2025-04-22T15:40:20.790Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-31150","url":"https://www.cve.org/CVERecord?id=CVE-2022-31150","licence":"CVE Terms of Use","modified":"2025-04-22T17:48:45.328Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3cvr-822r-rqcc","url":"https://github.com/advisories/GHSA-3cvr-822r-rqcc","licence":"CC-BY-4.0","modified":"2023-11-08T04:09:27.728Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-31150","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31150","licence":"Public domain","modified":"2026-06-17T04:44:54.533Z"}],"updatedAt":"2026-11-25T22:58:13.056Z","epss":{"score":0.01515,"percentile":0.75255,"date":"2026-12-01T12:00:22.000Z"}}