{"id":29246,"date":"2022-08-14T18:49:09","date_gmt":"2022-08-14T14:49:09","guid":{"rendered":"https:\/\/cve.report\/CVE-2022-35948"},"modified":"2022-08-14T18:49:09","modified_gmt":"2022-08-14T14:49:09","slug":"cve-2022-35948","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2022-35948\/","title":{"rendered":"CVE-2022-35948"},"content":{"rendered":"<p>undici is an HTTP\/1.1 client, written from scratch for Node.js.`=&lt; 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: &#8220;` import { request } from &#8216;undici&#8217; const unsanitizedContentTypeInput = &#8216;application\/json\\r\\n\\r\\nGET \/foo2 HTTP\/1.1&#8217; await request(&#8216;http:\/\/localhost:3000, { method: &#8216;GET&#8217;, headers: { &#8216;content-type&#8217;: unsanitizedContentTypeInput }, }) &#8220;` 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. <\/p>\n<p><a href=\"https:\/\/afaghhosting.net\">\u0645\u062f\u06cc\u0631\u06cc\u062a \u0633\u0631\u0648\u0631\u060c \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0648 \u06a9\u0627\u0646\u0641\u06cc\u06af \u0633\u0631\u0648\u0631<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>undici is an HTTP\/1.1 client, written from scratch for Node.js.`=&lt; 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: &#8220;` import { request } from &#8216;undici&#8217; const unsanitizedContentTypeInput = &#8216;application\/json\\r\\n\\r\\nGET \/foo2 HTTP\/1.1&#8217; await request(&#8216;http:\/\/localhost:3000, { method: &#8216;GET&#8217;, headers: { &#8216;content-type&#8217;: unsanitizedContentTypeInput &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-29246","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/29246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=29246"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/29246\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=29246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=29246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=29246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}