CVE-2022-35948 json
CRLF Injection in Nodejs ‘undici’ via Content-Type
published 2022-08-13 4 y ago modified 2026-06-17 4 mo ago also GHSA-f772-66g8-q5h3 , EUVD-2022-6547
- cvss
- 5.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.4%
- EPSS 1.4% chance of exploitation in 30 days, percentile 72%
- public exploits
- 0
- none known
Summary
undici is an HTTP/1.1 client, written from scratch for Node.js.`=< 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: ``` 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.
Patch / fix
- npm undici 5.8.2
- nodejs undici 5.8.2
- node-undici Debian 14, Debian 13, Debian 12 5.8.2+dfsg1+~cs18.9.18.1-1
debian advisories DEBIAN-CVE-2022-35948
- nodejs16 SLE Module for Web and Scripting 15 SP3, openSUSE Leap 15.3 16.17.0-150300.7.9.1
- nodejs16 SLE Module for Web and Scripting 15 SP4, openSUSE Leap 15.4 16.17.0-150400.3.6.1
- nodejs16 SLE Module for Web and Scripting 12 16.17.0-8.9.1
suse advisories SUSE-SU-2022:3251-1SUSE-SU-2022:3250-1SUSE-SU-2022:3196-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-35948 updated cvss 5.3
nodejs: undici vulnerable to CRLF via content headers
-
Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/search-ui-rhel8 Red Hat OpenShift Dev Spaces devspaces/dashboard-rhel8affected: workaround, no fix available “A possible mitigation is to sanitize user input when sending content-type headers.”
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 18 mo ago
Exploit prediction
1.39% chance of exploitation in the next 30 days, higher than 72% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/nodejs/undici/security/advisories/GHSA-f772-66g8-q5h3 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| NVD | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| GitHub | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | undici | <5.8.2 |
5.8.2 |
Affected products
- nodejs undici
Classification
References
-
github.com
/nodejs/undici/commit/66165d604fd0aee70a93ed5c44ad4cc2df395f80
web, patch, third-party-advisory
-
github.com
/nodejs/undici/security/advisories/GHSA-f772-66g8-q5h3
web, exploit, third-party-advisory
-
github.com
/nodejs/undici/releases/tag/v5.8.2
web, release-notes, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-35948
advisory
-
github.com
/nodejs/undici
package
Sources
- CVE List CVE-2022-35948
- GitHub Advisory GHSA-f772-66g8-q5h3
- NVD CVE-2022-35948
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.