Bug 2121101 (CVE-2022-35948)

Summary: CVE-2022-35948 nodejs: undici vulnerable to CRLF via content headers
Product: [Other] Security Response Reporter: ybuenos
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: fjansen, gparvin, jramanat, nboldt, njean, pahickey, scorneli, stcannon
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: undici 5.8.2 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the undici package. When requesting unsanitized input on content-type headers, it is possible to inject additional requests via Carriage Return/Line Feed (CRLF).
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-03 02:33:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2121293    
Bug Blocks: 2118398    

Description ybuenos 2022-08-24 13:06:33 UTC
undici up to and including 5.8.1 is vulnerable to CRLF (Carriage Return / Line Feed) Injection on headers when using unsanitized input as request headers, 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
    },
})

Comment 3 errata-xmlrpc 2022-11-01 16:53:28 UTC
This issue has been addressed in the following products:

  Red Hat Advanced Cluster Management for Kubernetes 2.4 for RHEL 8

Via RHSA-2022:7276 https://access.redhat.com/errata/RHSA-2022:7276

Comment 4 Product Security DevOps Team 2022-12-03 02:33:14 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-35948