Vulnerability in Node.js Undici
CVE-2022-35948
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.
Published · last modified .
CVSS v3 metric
CVSS v3 base score 5.3 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
EPSS exploit prediction
EPSS: 0.013 (68.7th percentile), scored .
Low probability of exploitation in the next 30 days, but still tracked. 69th percentile — 68.7% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.013 · newest: 0.013 · change: 0.000
Affected products
- Node.js Undici — versions =< 5.8.0
Weakness classification (CWE)
Public proof-of-concept exploits
References
- github.com/nodejs/undici/releases/tag/v5.8.2 (Third Party Advisory, Release Notes)
- github.com/nodejs/undici/security/advisories/GHSA-f772-66g8-q5h3 (Exploit, Third Party Advisory)
- github.com/nodejs/undici/commit/66165d604fd0aee70a93ed5c44ad4cc2df395f80 (Patch, Third Party Advisory)
Frequently asked questions
- What is CVE-2022-35948?
- CVE-2022-35948 is a medium-severity vulnerability in Node.js Undici, classified under Improper Neutralization of Special Elements in Output Used by a Downstream Component (Injection). CVSS score: 5.3/10. Published 2022-08-15.
- How severe is CVE-2022-35948?
- Medium severity. CVSS v3 base score is 5.3 out of 10.
- Is CVE-2022-35948 known to be exploited?
- 2 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.