CVE-2022-35948: CRLF Injection in Nodejs ‘undici’ via Content-Type

Disclosed: 2022-09-23 17:38:00 By hl_k To ibb
Medium
Vulnerability Details
undici library should be protects HTTP headers from CRLF injection vulnerabilities. However, CRLF injection exists in the ‘content-type’ header of undici.request api. ## Impact ```=< [email protected]``` 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: http://localhost:3000/ http://localhost:3000/foo2 I have submitted the report: https://hackerone.com/reports/1638888 Advisories: https://github.com/nodejs/undici/security/advisories/GHSA-f772-66g8-q5h3 Resolved as of https://github.com/nodejs/undici/releases/tag/v5.8.2
Actions
View on HackerOne
Report Stats
  • Report ID: 1664019
  • State: Closed
  • Substate: resolved
  • Upvotes: 6
Share this report