CRLF Injection in Nodejs ‘undici’ via Content-Type
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · Low · None
- Fix status
- Partial Red Hat: 2 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat.
Summary
undici is an HTTP/1.1 client, written from scratch for Node.js.`=< [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: 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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| NodeJS | undici | =< 5.8.0 | — | No fix listed | CNA |
| — | undici (npm) | before 5.8.2 | 5.8.2 | Patch available | GHSA-f772-66g8-q5h3 |
- undici VendorNodeJS Affected =< 5.8.0 Fixed in — No fix listed CNA
- undici (npm) Vendor— Affected before 5.8.2 Fixed in 5.8.2 Patch available GHSA-f772-66g8-q5h3
Remediation
- Fix · GHSA-f772-66g8-q5h3 undici (npm) Fixed in 5.8.2 Advisory →
Red Hat 1 advisory
- RHSA-2022:7276 Released 2022-11-01 · Red Hat rating ModerateRed Hat Advanced Cluster Management 2.4.8 security fixes and container updates
- Red Hat Advanced Cluster Management for Kubernetes 2.4 for RHEL 8 rhacm2/acm-grafana-rhel8, rhacm2/acm-must-gather-rhel8, rhacm2/acm-operator-bundle +47
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Advanced Cluster Management for Kubernetes 2 | Affected | No fix yet |
| Red Hat OpenShift Dev Spaces | Affected | No fix yet |
Timeline
- 2026-10-02 Threatist record created from CVE-2022-35948
- 2026-10-03 Alias added: GHSA-f772-66g8-q5h3
References
Advisory 2
More NodeJS Undici vulnerabilities
- TI-2026-01215 undici is vulnerable to Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling') CVSS 3.1CRITICAL 9.8
- TI-2022-16376 `undici.request` vulnerable to SSRF using absolute URL on `pathname` CVSS 3.1CRITICAL 9.8
- TI-2023-09734 CRLF Injection in Nodejs ‘undici’ via host CVSS 3.1MEDIUM 6.5
- TI-2022-13193 CRLF injection in request headers CVSS 3.1MEDIUM 6.5
- TI-2022-13194 Uncleared cookies on cross-host/cross-origin redirect in undici CVSS 3.1MEDIUM 6.5
- TI-2024-20007 Undici's fetch with integrity option is too lax when algorithm is specified but hash value is in incorrect CVSS 3.1LOW 3.5
Sources
- CVE-2022-35948 · CVE Program
- CVE-2022-35948 · NVD
- FIRST EPSS
- GHSA-f772-66g8-q5h3 · GitHub Advisory Database · CC BY 4.0
- CVE-2022-35948 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences