Skip to content

Commit f9bd25e

Browse files
1 parent 4596dd7 commit f9bd25e

3 files changed

Lines changed: 280 additions & 0 deletions

File tree

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-4992-7rv2-5pvq",
4+
"modified": "2026-03-13T20:41:26Z",
5+
"published": "2026-03-13T20:41:26Z",
6+
"aliases": [
7+
"CVE-2026-1527"
8+
],
9+
"summary": "Undici has CRLF Injection in undici via `upgrade` option",
10+
"details": "### Impact\n\nWhen an application passes user-controlled input to the `upgrade` option of `client.request()`, an attacker can inject CRLF sequences (`\\r\\n`) to:\n\n1. Inject arbitrary HTTP headers\n2. Terminate the HTTP request prematurely and smuggle raw data to non-HTTP services (Redis, Memcached, Elasticsearch)\n\nThe vulnerability exists because undici writes the `upgrade` value directly to the socket without validating for invalid header characters:\n\n```javascript\n// lib/dispatcher/client-h1.js:1121\nif (upgrade) {\n header += `connection: upgrade\\r\\nupgrade: ${upgrade}\\r\\n`\n}\n```\n\n### Patches\n\n Patched in the undici version v7.24.0 and v6.24.0. Users should upgrade to this version or later.\n\n### Workarounds\n\nSanitize the `upgrade` option string before passing to undici:\n\n```javascript\nfunction sanitizeUpgrade(value) {\n if (/[\\r\\n]/.test(value)) {\n throw new Error('Invalid upgrade value')\n }\n return value\n}\n\nclient.request({\n upgrade: sanitizeUpgrade(userInput)\n})\n```",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "npm",
21+
"name": "undici"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "6.24.0"
32+
}
33+
]
34+
}
35+
]
36+
},
37+
{
38+
"package": {
39+
"ecosystem": "npm",
40+
"name": "undici"
41+
},
42+
"ranges": [
43+
{
44+
"type": "ECOSYSTEM",
45+
"events": [
46+
{
47+
"introduced": "7.0.0"
48+
},
49+
{
50+
"fixed": "7.24.0"
51+
}
52+
]
53+
}
54+
]
55+
}
56+
],
57+
"references": [
58+
{
59+
"type": "WEB",
60+
"url": "https://github.com/nodejs/undici/security/advisories/GHSA-4992-7rv2-5pvq"
61+
},
62+
{
63+
"type": "ADVISORY",
64+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-1527"
65+
},
66+
{
67+
"type": "WEB",
68+
"url": "https://hackerone.com/reports/3487198"
69+
},
70+
{
71+
"type": "WEB",
72+
"url": "https://cna.openjsf.org/security-advisories.html"
73+
},
74+
{
75+
"type": "PACKAGE",
76+
"url": "https://github.com/nodejs/undici"
77+
}
78+
],
79+
"database_specific": {
80+
"cwe_ids": [
81+
"CWE-93"
82+
],
83+
"severity": "MODERATE",
84+
"github_reviewed": true,
85+
"github_reviewed_at": "2026-03-13T20:41:26Z",
86+
"nvd_published_at": "2026-03-12T21:16:25Z"
87+
}
88+
}
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-v9p9-hfj2-hcw8",
4+
"modified": "2026-03-13T20:41:41Z",
5+
"published": "2026-03-13T20:41:41Z",
6+
"aliases": [
7+
"CVE-2026-2229"
8+
],
9+
"summary": "Undici has Unhandled Exception in WebSocket Client Due to Invalid server_max_window_bits Validation",
10+
"details": "### Impact\n\nThe undici WebSocket client is vulnerable to a denial-of-service attack due to improper validation of the `server_max_window_bits` parameter in the permessage-deflate extension. When a WebSocket client connects to a server, it automatically advertises support for permessage-deflate compression. A malicious server can respond with an out-of-range `server_max_window_bits` value (outside zlib's valid range of 8-15). When the server subsequently sends a compressed frame, the client attempts to create a zlib InflateRaw instance with the invalid windowBits value, causing a synchronous RangeError exception that is not caught, resulting in immediate process termination.\n\nThe vulnerability exists because:\n\n1. The `isValidClientWindowBits()` function only validates that the value contains ASCII digits, not that it falls within the valid range 8-15\n2. The `createInflateRaw()` call is not wrapped in a try-catch block\n3. The resulting exception propagates up through the call stack and crashes the Node.js process\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "npm",
21+
"name": "undici"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "6.24.0"
32+
}
33+
]
34+
}
35+
]
36+
},
37+
{
38+
"package": {
39+
"ecosystem": "npm",
40+
"name": "undici"
41+
},
42+
"ranges": [
43+
{
44+
"type": "ECOSYSTEM",
45+
"events": [
46+
{
47+
"introduced": "7.0.0"
48+
},
49+
{
50+
"fixed": "7.24.0"
51+
}
52+
]
53+
}
54+
]
55+
}
56+
],
57+
"references": [
58+
{
59+
"type": "WEB",
60+
"url": "https://github.com/nodejs/undici/security/advisories/GHSA-v9p9-hfj2-hcw8"
61+
},
62+
{
63+
"type": "ADVISORY",
64+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-2229"
65+
},
66+
{
67+
"type": "WEB",
68+
"url": "https://hackerone.com/reports/3487486"
69+
},
70+
{
71+
"type": "WEB",
72+
"url": "https://cna.openjsf.org/security-advisories.html"
73+
},
74+
{
75+
"type": "WEB",
76+
"url": "https://datatracker.ietf.org/doc/html/rfc7692"
77+
},
78+
{
79+
"type": "PACKAGE",
80+
"url": "https://github.com/nodejs/undici"
81+
},
82+
{
83+
"type": "WEB",
84+
"url": "https://nodejs.org/api/zlib.html#class-zlibinflateraw"
85+
}
86+
],
87+
"database_specific": {
88+
"cwe_ids": [
89+
"CWE-248"
90+
],
91+
"severity": "HIGH",
92+
"github_reviewed": true,
93+
"github_reviewed_at": "2026-03-13T20:41:41Z",
94+
"nvd_published_at": "2026-03-12T21:16:25Z"
95+
}
96+
}
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-vrm6-8vpv-qv8q",
4+
"modified": "2026-03-13T20:41:56Z",
5+
"published": "2026-03-13T20:41:56Z",
6+
"aliases": [
7+
"CVE-2026-1526"
8+
],
9+
"summary": "Undici has Unbounded Memory Consumption in WebSocket permessage-deflate Decompression",
10+
"details": "## Description\n\nThe undici WebSocket client is vulnerable to a denial-of-service attack via unbounded memory consumption during permessage-deflate decompression. When a WebSocket connection negotiates the permessage-deflate extension, the client decompresses incoming compressed frames without enforcing any limit on the decompressed data size. A malicious WebSocket server can send a small compressed frame (a \"decompression bomb\") that expands to an extremely large size in memory, causing the Node.js process to exhaust available memory and crash or become unresponsive.\n\nThe vulnerability exists in the `PerMessageDeflate.decompress()` method, which accumulates all decompressed chunks in memory and concatenates them into a single Buffer without checking whether the total size exceeds a safe threshold.\n\n## Impact\n\n- Remote denial of service against any Node.js application using undici's WebSocket client\n- A single compressed WebSocket frame of ~6 MB can decompress to ~1 GB or more\n- Memory exhaustion occurs in native/external memory, bypassing V8 heap limits\n- No application-level mitigation is possible as decompression occurs before message delivery\n\n### Patches\n\nUsers should upgrade to fixed versions.\n\n### Workarounds\n\nNo workaround are possible.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "npm",
21+
"name": "undici"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "6.24.0"
32+
}
33+
]
34+
}
35+
]
36+
},
37+
{
38+
"package": {
39+
"ecosystem": "npm",
40+
"name": "undici"
41+
},
42+
"ranges": [
43+
{
44+
"type": "ECOSYSTEM",
45+
"events": [
46+
{
47+
"introduced": "7.0.0"
48+
},
49+
{
50+
"fixed": "7.24.0"
51+
}
52+
]
53+
}
54+
]
55+
}
56+
],
57+
"references": [
58+
{
59+
"type": "WEB",
60+
"url": "https://github.com/nodejs/undici/security/advisories/GHSA-vrm6-8vpv-qv8q"
61+
},
62+
{
63+
"type": "ADVISORY",
64+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-1526"
65+
},
66+
{
67+
"type": "WEB",
68+
"url": "https://hackerone.com/reports/3481206"
69+
},
70+
{
71+
"type": "WEB",
72+
"url": "https://cna.openjsf.org/security-advisories.html"
73+
},
74+
{
75+
"type": "WEB",
76+
"url": "https://datatracker.ietf.org/doc/html/rfc7692"
77+
},
78+
{
79+
"type": "PACKAGE",
80+
"url": "https://github.com/nodejs/undici"
81+
},
82+
{
83+
"type": "WEB",
84+
"url": "https://owasp.org/www-community/attacks/Denial_of_Service"
85+
}
86+
],
87+
"database_specific": {
88+
"cwe_ids": [
89+
"CWE-409"
90+
],
91+
"severity": "HIGH",
92+
"github_reviewed": true,
93+
"github_reviewed_at": "2026-03-13T20:41:56Z",
94+
"nvd_published_at": "2026-03-12T21:16:23Z"
95+
}
96+
}

0 commit comments

Comments
 (0)