Staging Environment: Content and features may be unstable or change without notice.
Search for packages
Package details: pkg:npm/undici@7.2.2
purl pkg:npm/undici@7.2.2
Next non-vulnerable version 7.24.0
Latest non-vulnerable version 7.24.0
Risk 3.1
Vulnerabilities affecting this package (8)
Vulnerability Summary Fixed by
VCID-1294-r4v2-3ud7
Aliases:
CVE-2025-47279
GHSA-cxrh-j4jr-qwg3
undici Denial of Service attack via bad certificate data ### Impact Applications that use undici to implement a webhook-like system are vulnerable. If the attacker set up a server with an invalid certificate, and they can force the application to call the webhook repeatedly, then they can cause a memory leak. ### Patches This has been patched in https://github.com/nodejs/undici/pull/4088. ### Workarounds If a webhook fails, avoid keep calling it repeatedly. ### References Reported as: https://github.com/nodejs/undici/issues/3895
7.5.0
Affected by 6 other vulnerabilities.
VCID-hgd1-7u6j-p7dh
Aliases:
CVE-2026-2229
GHSA-v9p9-hfj2-hcw8
Undici has Unhandled Exception in WebSocket Client Due to Invalid server_max_window_bits Validation ### Impact The 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. The vulnerability exists because: 1. The `isValidClientWindowBits()` function only validates that the value contains ASCII digits, not that it falls within the valid range 8-15 2. The `createInflateRaw()` call is not wrapped in a try-catch block 3. The resulting exception propagates up through the call stack and crashes the Node.js process ### Patches _Has the problem been patched? What versions should users upgrade to?_ ### Workarounds _Is there a way for users to fix or remediate the vulnerability without upgrading?_
7.24.0
Affected by 0 other vulnerabilities.
VCID-n6ew-t7g1-33gn
Aliases:
CVE-2026-1525
GHSA-2mjp-6q6p-2qxm
Undici has an HTTP Request/Response Smuggling issue ### Impact Undici allows duplicate HTTP `Content-Length` headers when they are provided in an array with case-variant names (e.g., `Content-Length` and `content-length`). This produces malformed HTTP/1.1 requests with multiple conflicting `Content-Length` values on the wire. **Who is impacted:** - Applications using `undici.request()`, `undici.Client`, or similar low-level APIs with headers passed as flat arrays - Applications that accept user-controlled header names without case-normalization **Potential consequences:** - **Denial of Service**: Strict HTTP parsers (proxies, servers) will reject requests with duplicate `Content-Length` headers (400 Bad Request) - **HTTP Request Smuggling**: In deployments where an intermediary and backend interpret duplicate headers inconsistently (e.g., one uses the first value, the other uses the last), this can enable request smuggling attacks leading to ACL bypass, cache poisoning, or credential hijacking ### Patches Patched in the undici version v7.24.0 and v6.24.0. Users should upgrade to this version or later. ### Workarounds If upgrading is not immediately possible: 1. **Validate header names**: Ensure no duplicate `Content-Length` headers (case-insensitive) are present before passing headers to undici 2. **Use object format**: Pass headers as a plain object (`{ 'content-length': '123' }`) rather than an array, which naturally deduplicates by key 3. **Sanitize user input**: If headers originate from user input, normalize header names to lowercase and reject duplicates
7.24.0
Affected by 0 other vulnerabilities.
VCID-pah5-gspe-hbbh
Aliases:
CVE-2025-22150
GHSA-c76h-2ccp-4975
Use of Insufficiently Random Values in undici ### Impact [Undici `fetch()` uses Math.random()](https://github.com/nodejs/undici/blob/8b06b8250907d92fead664b3368f1d2aa27c1f35/lib/web/fetch/body.js#L113) to choose the boundary for a multipart/form-data request. It is known that the output of Math.random() can be predicted if several of its generated values are known. If there is a mechanism in an app that sends multipart requests to an attacker-controlled website, they can use this to leak the necessary values. Therefore, An attacker can tamper with the requests going to the backend APIs if certain conditions are met. ### Patches This is fixed in 5.28.5; 6.21.1; 7.2.3. ### Workarounds Do not issue multipart requests to attacker controlled servers. ### References * https://hackerone.com/reports/2913312 * https://blog.securityevaluators.com/hacking-the-javascript-lottery-80cc437e3b7f
7.2.3
Affected by 7 other vulnerabilities.
VCID-ph2p-u33d-8yh3
Aliases:
CVE-2026-1527
GHSA-4992-7rv2-5pvq
Undici has CRLF Injection in undici via `upgrade` option ### Impact When an application passes user-controlled input to the `upgrade` option of `client.request()`, an attacker can inject CRLF sequences (`\r\n`) to: 1. Inject arbitrary HTTP headers 2. Terminate the HTTP request prematurely and smuggle raw data to non-HTTP services (Redis, Memcached, Elasticsearch) The vulnerability exists because undici writes the `upgrade` value directly to the socket without validating for invalid header characters: ```javascript // lib/dispatcher/client-h1.js:1121 if (upgrade) { header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n` } ``` ### Patches Patched in the undici version v7.24.0 and v6.24.0. Users should upgrade to this version or later. ### Workarounds Sanitize the `upgrade` option string before passing to undici: ```javascript function sanitizeUpgrade(value) { if (/[\r\n]/.test(value)) { throw new Error('Invalid upgrade value') } return value } client.request({ upgrade: sanitizeUpgrade(userInput) }) ```
7.24.0
Affected by 0 other vulnerabilities.
VCID-sy2z-sqgk-d7hg
Aliases:
CVE-2026-1526
GHSA-vrm6-8vpv-qv8q
Undici has Unbounded Memory Consumption in WebSocket permessage-deflate Decompression ## Description The 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. The 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. ## Impact - Remote denial of service against any Node.js application using undici's WebSocket client - A single compressed WebSocket frame of ~6 MB can decompress to ~1 GB or more - Memory exhaustion occurs in native/external memory, bypassing V8 heap limits - No application-level mitigation is possible as decompression occurs before message delivery ### Patches Users should upgrade to fixed versions. ### Workarounds No workaround are possible.
7.24.0
Affected by 0 other vulnerabilities.
VCID-z7ac-jr58-gkfm
Aliases:
CVE-2026-1528
GHSA-f269-vfmq-vjvj
Undici: Malicious WebSocket 64-bit length overflows parser and crashes the client ### Impact A server can reply with a WebSocket frame using the 64-bit length form and an extremely large length. undici's ByteParser overflows internal math, ends up in an invalid state, and throws a fatal TypeError that terminates the process. ### Patches Patched in the undici version v7.24.0 and v6.24.0. Users should upgrade to this version or later. ### Workarounds There are no workarounds.
7.24.0
Affected by 0 other vulnerabilities.
VCID-zb3h-efqz-dff3
Aliases:
CVE-2026-22036
GHSA-g9mf-h72j-4rw9
Undici has an unbounded decompression chain in HTTP responses on Node.js Fetch API via Content-Encoding leads to resource exhaustion ### Impact The `fetch()` API supports chained HTTP encoding algorithms for response content according to RFC 9110 (e.g., Content-Encoding: gzip, br). This is also supported by the undici decompress interceptor. However, the number of links in the decompression chain is unbounded and the default maxHeaderSize allows a malicious server to insert thousands compression steps leading to high CPU usage and excessive memory allocation. ### Patches Upgrade to 7.18.2 or 6.23.0. ### Workarounds It is possible to apply an undici interceptor and filter long `Content-Encoding` sequences manually. ### References * https://hackerone.com/reports/3456148 * https://github.com/advisories/GHSA-gm62-xv2j-4w53 * https://curl.se/docs/CVE-2022-32206.html
7.18.2
Affected by 6 other vulnerabilities.
Vulnerabilities fixed by this package (0)
Vulnerability Summary Aliases
This package is not known to fix vulnerabilities.

Date Actor Action Vulnerability Source VulnerableCode Version
2026-04-13T14:31:37.651668+00:00 GitLab Importer Affected by VCID-n6ew-t7g1-33gn https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/undici/CVE-2026-1525.yml 38.3.0
2026-04-13T14:31:33.294748+00:00 GitLab Importer Affected by VCID-z7ac-jr58-gkfm https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/undici/CVE-2026-1528.yml 38.3.0
2026-04-13T14:31:32.917491+00:00 GitLab Importer Affected by VCID-hgd1-7u6j-p7dh https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/undici/CVE-2026-2229.yml 38.3.0
2026-04-13T14:31:24.367016+00:00 GitLab Importer Affected by VCID-sy2z-sqgk-d7hg https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/undici/CVE-2026-1526.yml 38.3.0
2026-04-13T14:31:13.311950+00:00 GitLab Importer Affected by VCID-ph2p-u33d-8yh3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/undici/CVE-2026-1527.yml 38.3.0
2026-04-12T01:33:07.131352+00:00 GitLab Importer Affected by VCID-zb3h-efqz-dff3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/undici/CVE-2026-22036.yml 38.3.0
2026-04-12T00:48:23.529254+00:00 GitLab Importer Affected by VCID-1294-r4v2-3ud7 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/undici/CVE-2025-47279.yml 38.3.0
2026-04-12T00:37:58.743887+00:00 GitLab Importer Affected by VCID-pah5-gspe-hbbh https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/undici/CVE-2025-22150.yml 38.3.0
2026-04-03T01:42:04.187651+00:00 GitLab Importer Affected by VCID-zb3h-efqz-dff3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/undici/CVE-2026-22036.yml 38.1.0
2026-04-03T00:56:24.331016+00:00 GitLab Importer Affected by VCID-1294-r4v2-3ud7 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/undici/CVE-2025-47279.yml 38.1.0
2026-04-03T00:45:53.866661+00:00 GitLab Importer Affected by VCID-pah5-gspe-hbbh https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/undici/CVE-2025-22150.yml 38.1.0