CVEfocus › CVE database › CVE-2022-35948

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

CVSS 5.3 MediumEPSS 1.4% (higher than 73% of CVEs)Published 2022-08-13Updated 2025-04-22Assigner: GitHub_M

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.

CWE-74CWE-93

What to do

Fixed builds are available from Debian, npm: see the table below for the fixed version per release.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

4Fixed

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Debian 14node-undiciFixed5.8.2+dfsg1+~cs18.9.18.1-1DEBIAN-CVE-2022-35948
Debian 13node-undiciFixed5.8.2+dfsg1+~cs18.9.18.1-1DEBIAN-CVE-2022-35948
Debian 12node-undiciFixed5.8.2+dfsg1+~cs18.9.18.1-1DEBIAN-CVE-2022-35948
npm libraryundiciFixed5.8.2GHSA-f772-66g8-q5h3

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.