cve.bz

CVE-2022-35948 nodejs undici: Injection

5.3 mediumExploit referenceEPSS 1.4%Fix available

Medium (5.3) in nodejs undici. EPSS 1.4% estimated probability of exploitation activity in the next 30 days. Fixed in undici 5.8.2.

On this page
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.

Severity

CVSS 3.1

5.3 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
EPSS
1.4% (unchanged from 1.4% a week ago; 1.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 73rd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: partial, assessed 2025-04-22. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component (Injection)
CWE-93 Improper Neutralization of CRLF Sequences (CRLF Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-35948 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-35948?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-35948?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-35948 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
nodejs:undicibefore 5.8.2

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-f772-66g8-q5h3npmundici<5.8.25.8.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14node-undici5.8.2+dfsg1+~cs18.9.18.1-1DEBIAN-CVE-2022-35948
SUSELinux Enterprise Module for Web and Scripting 12nodejs1616.17.0-8.9.1SUSE-SU-2022:3196-1
SUSELinux Enterprise Module for Web and Scripting 15 SP3nodejs1616.17.0-150300.7.9.1SUSE-SU-2022:3251-1
SUSELinux Enterprise Module for Web and Scripting 15 SP4nodejs1616.17.0-150400.3.6.1SUSE-SU-2022:3250-1
openSUSELeap 15.3nodejs1616.17.0-150300.7.9.1SUSE-SU-2022:3251-1
openSUSELeap 15.4nodejs1616.17.0-150400.3.6.1SUSE-SU-2022:3250-1

From the distributions' data via OSV.dev: the Debian Security Tracker; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's mitigation

A possible mitigation is to sanitize user input when sending content-type headers.

ProductPackageStateAdvisory
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/search-ui-rhel8Affected
Red Hat OpenShift Dev Spacesdevspaces/dashboard-rhel8Affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-35948.

Attack patterns (CAPEC)

  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-81 Web Server Logs Tampering Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-74 (37).

References

Check your stackJSON