node-undici — security advisory
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.
- Products
- node-undici
- Affected versions
- Not specified
- Fixed versions
- 5.8.2+dfsg1+~cs18.9.18.1-1
- CVEs
- CVE-2022-35948
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 15:31 UTC · Revision 1
Source evidence
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.
osv:DEBIAN-CVE-2022-35948
node-undici
Fixed versions: 5.8.2+dfsg1+~cs18.9.18.1-1
node-undici
Fixed versions: 5.8.2+dfsg1+~cs18.9.18.1-1
node-undici
Fixed versions: 5.8.2+dfsg1+~cs18.9.18.1-1
Complete source record
{
"id": "4029a89de53413af0decf0ec5bd30918c80cea3d83d5ddf3846f8fa7ab79a535",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2022-35948",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2022-35948",
"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.",
"evidence": "osv:DEBIAN-CVE-2022-35948",
"products": [
{
"name": {
"value": "node-undici",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.8.2+dfsg1+~cs18.9.18.1-1",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "node-undici",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.8.2+dfsg1+~cs18.9.18.1-1",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "node-undici",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.8.2+dfsg1+~cs18.9.18.1-1",
"evidence": "/affected/2/ranges"
}
],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "DEBIAN-CVE-2022-35948",
"aliases": [
"DEBIAN-CVE-2022-35948"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "5.8.2+dfsg1+~cs18.9.18.1-1"
}
]
}
],
"package": {
"name": "node-undici",
"purl": "pkg:deb/debian/node-undici?arch=source&distro=bookworm",
"ecosystem": "Debian:12"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-35948.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "5.8.2+dfsg1+~cs18.9.18.1-1"
}
]
}
],
"package": {
"name": "node-undici",
"purl": "pkg:deb/debian/node-undici?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-35948.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "5.8.2+dfsg1+~cs18.9.18.1-1"
}
]
}
],
"package": {
"name": "node-undici",
"purl": "pkg:deb/debian/node-undici?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-35948.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-15T08:03:04.557630997Z",
"provider": "osv",
"upstream": [
"CVE-2022-35948"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2022-35948"
]
},
"related_cves": [
{
"value": "CVE-2022-35948",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 325067,
"published_at": "2022-08-15T11:21:38.353+00:00"
}