{"id":"GHSA-f772-66g8-q5h3","revision":"cd5b2be6026a4c27ad3bdec5b62c00e5","records":[{"revision":"cd5b2be6026a4c27ad3bdec5b62c00e5","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-f772-66g8-q5h3","aliases":["CVE-2022-35948"],"title":"Nodejs ‘undici’ vulnerable to CRLF Injection via Content-Type","description":"### Impact\n\n`=< 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.\n\nExample:\n\n```\nimport { request } from 'undici'\n\nconst unsanitizedContentTypeInput =  'application/json\\r\\n\\r\\nGET /foo2 HTTP/1.1'\n\nawait request('http://localhost:3000, {\n    method: 'GET',\n    headers: {\n      'content-type': unsanitizedContentTypeInput\n    },\n})\n```\n\nThe above snippet will perform two requests in a single `request` API call:\n\n1) `http://localhost:3000/`\n2) `http://localhost:3000/foo2`\n\n### Patches\n\nThis issue was patched in Undici v5.8.1\n\n### Workarounds\n\nSanitize input when sending content-type headers using user input.\n\n## For more information\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","state":0,"publishedAt":"2022-08-18T19:02:56+00:00","modifiedAt":"2023-11-08T04:09:53.836338+00:00","affected":[{"ecosystem":"npm","name":"undici","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"5.8.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/nodejs/undici/security/advisories/GHSA-f772-66g8-q5h3","https://nvd.nist.gov/vuln/detail/CVE-2022-35948","https://github.com/nodejs/undici/commit/66165d604fd0aee70a93ed5c44ad4cc2df395f80","https://github.com/nodejs/undici","https://github.com/nodejs/undici/releases/tag/v5.8.2"],"sourceUrl":"https://github.com/advisories/GHSA-f772-66g8-q5h3","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-f772-66g8-q5h3","identifiers":["GHSA-f772-66g8-q5h3","CVE-2022-35948"]},"retained":false,"historicalAffected":[]}],"coverage":[]}