{"id":"CVE-2022-35948","published":"2022-08-13T00:00:00Z","modified":"2025-04-22T17:42:05Z","title":"CRLF Injection in Nodejs ‘undici’ via Content-Type","vendor":"nodejs","product":"undici","tier":"tail","description":{"text":"undici is an HTTP/1.1 client, written from scratch for Node.js.`=< undici@5.8.0` users are vulnerable to _CRLF Injection_ on headers when using unsanitized input as request headers, more specifically, inside the `content-type` header. Example: ``` import { request } from 'undici' const unsanitizedContentTypeInput = 'application/json\\r\\n\\r\\nGET /foo2 HTTP/1.1' await request('http://localhost:3000, { method: 'GET', headers: { 'content-type': unsanitizedContentTypeInput }, }) ``` The above snippet will perform two requests in a single `request` API call: 1) `http://localhost:3000/` 2) `http://localhost:3000/foo2` This issue was patched in Undici v5.8.1. Sanitize input when sending content-type headers using user input as a workaround.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01391,"percentile":0.72345,"provenance":"source"},"cwes":[{"id":"CWE-93","name":"Improper Neutralization of CRLF Sequences"},{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"}],"references":[{"url":"https://github.com/nodejs/undici/releases/tag/v5.8.2","tags":[]},{"url":"https://github.com/nodejs/undici/security/advisories/GHSA-f772-66g8-q5h3","tags":[]},{"url":"https://github.com/nodejs/undici/commit/66165d604fd0aee70a93ed5c44ad4cc2df395f80","tags":[]}],"priority":{"score":18.2,"factors":[{"name":"EPSS percentile","points":14.47},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"nodejs","affectedVersions":[{"vendor":"nodejs","product":"undici","versions":["=< 5.8.0"]}],"affected":[{"ecosystem":"npm","package":"undici","vulnerableRanges":["<5.8.2"],"patched":["5.8.2"],"from":["GHSA-f772-66g8-q5h3"],"provenance":"source"}],"euvd":{"id":"EUVD-2022-6547","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-undici-cve-2022-35948","children":[{"from":"CVE-2022-35948","to":"CVE-2026-15157","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"This is the same defect class as CVE-2022-35948 and CVE-2026-1527, on a header sink that the earlier fixes did not cover.","from":"CVE.org","in":"CVE-2026-15157"}]}],"packageHistory":[{"cve":"CVE-2022-32210","published":"2022-07-14","fixed":"5.5.1","kev":false},{"cve":"CVE-2022-31150","published":"2022-07-19","fixed":"5.8.0","kev":false},{"cve":"CVE-2022-31151","published":"2022-07-20","fixed":"5.8.0","kev":false,"link":{"from":"CVE-2022-31151","to":"CVE-2022-35948","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:undici","fromFixed":"5.8.0","toFixed":"5.8.2","daysApart":24}]}},{"cve":"CVE-2022-35948","published":"2022-08-13","fixed":"5.8.2","kev":false},{"cve":"CVE-2022-35949","published":"2022-08-12","fixed":"5.8.2","kev":false},{"cve":"CVE-2023-23936","published":"2023-02-16","fixed":"5.19.1","kev":false,"link":{"from":"CVE-2022-35948","to":"CVE-2023-23936","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:undici","fromFixed":"5.8.2","toFixed":"5.19.1","daysApart":187}]}},{"cve":"CVE-2023-24807","published":"2023-02-16","fixed":"5.19.1","kev":false,"link":{"from":"CVE-2022-35948","to":"CVE-2023-24807","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:undici","fromFixed":"5.8.2","toFixed":"5.19.1","daysApart":187}]}}],"package":"npm:undici"}}