Breaking News: Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2022-35948

nodejs: undici vulnerable to CRLF via content headers

Overview

Published
15 Aug 2022
Modified
17 Jun 2026
Medium CVE
3 Registry packages
6 OS packages
4 Linux distributions
Yes Fix available

Description

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.

Source: OX vulnerability database

Severity

5.3 · MEDIUM

CVSS 3.1 base score, scored by NVD.

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Weakness: CWE-74, CWE-93

Affected packages · 3

Packages affected by CVE-2022-35948
EcosystemPackageVulnerableFixed in
npm undici <5.8.2 5.8.2
Seal npm @seal-security/undici >=4.16.0-sp1, <4.16.0-sp999 4.16.0-sp999
Seal npm undici >=4.16.0-sp0, <4.16.0-sp999 4.16.0-sp999

Open a package to see all its vulnerabilities.

Operating systems · 6 fixes

SUSE Linux Enterprise 1 release · 1 package

fixed 1
nodejs16
SUSE Linux Enterprise fixes for CVE-2022-35948
ReleasePackageFixed inAdvisory
15.4 nodejs16 +3 16.17.0-150400.3.6.1 SUSE-SU-2022:3250-1

debian 3 releases · 1 package

fixed 3
node-undici
debian fixes for CVE-2022-35948
ReleasePackageFixed in
12 node-undici 5.8.2+dfsg1+~cs18.9.18.1-1
13 node-undici 5.8.2+dfsg1+~cs18.9.18.1-1
14 node-undici 5.8.2+dfsg1+~cs18.9.18.1-1

echo 1 release · 1 package

fixed 1
node-undici
echo fixes for CVE-2022-35948
ReleasePackageFixed in
node-undici 5.8.2+dfsg1+~cs18.9.18.1-1

root.io debian 1 release · 1 package

fixed 1
rootio-node-undici
root.io debian fixes for CVE-2022-35948
ReleasePackageFixed in
12 rootio-node-undici 5.8.2+dfsg1+~cs18.9.18.1-1

References

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.