Skip to content
Fencer Intel
medium 5.3

CVE-2022-35948 json

CRLF Injection in Nodejs ‘undici’ via Content-Type

published 4y ago modified 4mo 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

Is CVE-2022-35948 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

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-rhel8
    affected: 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
last yr.

Exploit prediction

1.39% chance of exploitation in the next 30 days, higher than 72% of all scored CVEs (FIRST EPSS, 2026-11-09).

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

Weakness
  • CWE-93 Improper Neutralization of CRLF Sequences
  • CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component

References

Sources

Fencer Intel 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.