{"id":"CVE-2022-35948","summary":"CRLF Injection in Nodejs ‘undici’ via Content-Type","details":"undici is an HTTP/1.1 client, written from scratch for Node.js.`=\u003c 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.","aliases":["GHSA-f772-66g8-q5h3"],"modified":"2026-10-22T10:33:45.036079110Z","published":"2022-08-13T00:00:00Z","related":["SUSE-SU-2022:3196-1","SUSE-SU-2022:3250-1","SUSE-SU-2022:3251-1"],"database_specific":{"cwe_ids":["CWE-74","CWE-93"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35948.json","cna_assigner":"GitHub_M"},"references":[{"type":"WEB","url":"https://github.com/nodejs/undici/releases/tag/v5.8.2"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35948.json"},{"type":"ADVISORY","url":"https://github.com/nodejs/undici/security/advisories/GHSA-f772-66g8-q5h3"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-35948"},{"type":"FIX","url":"https://github.com/nodejs/undici/commit/66165d604fd0aee70a93ed5c44ad4cc2df395f80"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/nodejs/undici","events":[{"introduced":"26f60b7b6e612bb831133d7f85914963d1955011"},{"fixed":"52d1ce56f7641d0c0d8359fc76537ebe15473e7e"},{"fixed":"66165d604fd0aee70a93ed5c44ad4cc2df395f80"}],"database_specific":{"extracted_events":[{"strategy":"StandaloneSingleVersion","range":[{"introduced":"=\u003c 5.8.0"},{"last_affected":"=\u003c 5.8.0"}],"source":"AFFECTED_FIELD"},{"original_tag":"v5.8.2","range":[{"fixed":"52d1ce56f7641d0c0d8359fc76537ebe15473e7e"}],"source":"REFERENCES_TAG"},{"range":[{"fixed":"66165d604fd0aee70a93ed5c44ad4cc2df395f80"}],"source":"REFERENCES_COMMIT"}]}}],"versions":["=\u003c 5.8.0","v5.8.1","v5.8.0"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-35948.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"}]}