A security flaw has been discovered in nodejs undici up to 7.24.0. This affects the function Object.assign of the file balanced-pool.js of the component BalancedPool. The manipulation results in improperly controlled modification of object prototype attributes. The attack may be launched remotely. The exploit has been released to the public and may be used for attacks. Upgrading to version 7.24.1 is able to mitigate this issue. The patch is identified as 0d7ec33ff37563d3e7c98d11d7bca736f330d156. You should upgrade the affected component.
undici, an HTTP client for Node.js, has a vulnerability in versions 7.0.0 through 7.30.1 and 8.0.0 through 8.12.3 where a shared cache can incorrectly validate cached responses across origins. This occurs when a cached response is revalidated with a conditional request that is redirected to a different origin. The redirect handler removes origin-bound credential headers but not cache validators, causing undici to treat a 304 Not Modified response from the redirected origin as a successful revalidation. This can lead to serving authenticated cached responses to unauthenticated callers. The issue is fixed in versions 7.30.2 and 8.12.4.
A vulnerability in the undici HTTP client for Node.js allows sensitive headers such as Authorization and Cookie to be improperly retained and sent to cross-origin redirect destinations when headers are supplied as an array of name-value tuples. This bypasses intended cross-origin header stripping, potentially exposing origin-bound credentials. The issue affects versions 7.0.0 through 7.30.1 and 8.0.0 through 8.12.3 and is fixed in versions 7.30.2 and 8.12.4.
undici, an HTTP client for Node.js, has a vulnerability in versions 7.15.0 through 7.30.1 and 8.0.0 through 8.12.3 where Subresource Integrity (SRI) metadata is improperly validated. The client incorrectly splits the integrity string only on spaces, ignoring other ASCII whitespace like tabs. This causes integrity values with whitespace to be skipped, allowing attacker-controlled responses to bypass integrity checks. The issue is fixed in versions 7.30.2 and 8.12.4.
undici versions 7.30.1 and 8.12.2 through 8.12.3 contain an origin validation error in the handling of redirect and shared cache interceptors. This flaw allows an attacker controlling a redirect target from a trusted URL to poison cached responses or cause private responses to be served to other users. The issue arises because undici only inspects the final redirect hop for caching decisions, ignoring intermediate hops that may alter cacheability or vary headers. The vulnerability is fixed in versions 7.30.2 and 8.12.4.
CVE-2026-120222 is a vulnerability in the undici HTTP client for Node.js affecting versions 7.0.0 through 7.30.1 and 8.0.0 through 8.12.3. When the cache interceptor is used with a downstream response handler that throws during processing, an asynchronous throw can escape as an uncaught exception or unhandled promise rejection, causing the Node.js process to terminate. This can be triggered by a malicious or compromised HTTP server serving a cacheable response that causes the throw on replay, impacting availability. The issue is fixed in versions 7.30.2 and 8.12.4. Users are advised to upgrade to these fixed versions or later or avoid composing the cache interceptor with such response handlers until upgrading.
undici versions 7.0.0 through 7.30.1 and 8.0.0 through 8.12.3 contain a vulnerability where the use of a redirect interceptor combined with a shared response cache can cause sensitive response data from an authenticated request to be cached under a key that omits credentials. This allows subsequent anonymous or different users to receive cached private responses, resulting in cross-user data disclosure. The issue is fixed in versions 7.30.2 and 8.12.4.
undici versions 7.0.0 through before 7.30.1 and 8.0.0 through before 8.12.2 have a cache poisoning and cross-user data disclosure vulnerability when using an originless Agent with composed redirect and shared cache interceptors. The cache key is built from the original request URL before redirects change the origin, causing responses from redirected origins to be cached under the original URL. This allows an attacker controlling the redirect target to poison the cache or disclose private data to other users. The issue is fixed in versions 7.30.1 and 8.12.2 by verifying origin consistency before caching and preserving cache-control policies across redirects.
undici's Agent component improperly handles TLS options by deep cloning constructor options via JSON serialization, which drops function-valued TLS callbacks such as checkServerIdentity. This results in a TLS certificate validation bypass where custom verification logic is ignored, potentially allowing acceptance of TLS peers that should be rejected. The vulnerability affects applications using Agent as the default dispatcher for request, fetch, and setGlobalDispatcher, as well as EnvHttpProxyAgent on certain routes. Fixed in undici versions 6.29.1, 7.30.1, and 8.12.2.
undici is vulnerable to a denial of service condition triggered by a TLS 1.2 server-initiated renegotiation presenting a different, valid but hostname-mismatched certificate. This causes an uncaught assertion error that crashes the Node.js client process, affecting both HTTP/1.1 and HTTP/2. Only TLS 1.2 is impacted, as TLS 1.3 does not support renegotiation. The issue is fixed in undici versions 6.29.1, 7.30.1, and 8.12.2. Mitigation includes upgrading to these versions or restricting connections to TLS 1.3 to prevent renegotiation.
undici's WebSocket client, including Node.js's bundled globalThis.WebSocket, is vulnerable to a denial of service condition caused by unbounded automatic PONG buffering. A malicious WebSocket server can send continuous PING frames causing the client to queue PONG responses without respecting backpressure, leading to memory exhaustion and process termination. This affects undici versions from 5.15.0 up to but not including 6.29.1, 7.0.0 up to 7.30.1, and 8.0.0 up to 8.12.2. Upgrading to versions 6.29.1, 7.30.1, or 8.12.2 mitigates the issue by properly handling backpressure.
A vulnerability in undici's decompress interceptor allows a denial of service via an unhandled exception. When the decompress interceptor forwards decompressed data to a downstream handler that throws an exception asynchronously (such as the dump interceptor with a maxSize limit), the exception is uncaught and terminates the Node.js process. This can be triggered by a malicious HTTP server sending a small compressed response that decompresses to a size exceeding the limit. The issue affects undici versions >=7.15.0 <7.30.1 and >=8.0.0 <8.12.2. Fixed in versions 7.30.1 and 8.12.2.
The undici WebSocket client, when using HTTP/2 (enabled by default with allowH2: true), crashes the Node.js process if it connects to a malicious server that responds with a failed WebSocket handshake over HTTP/2. This occurs because the client aborts the request too late, leaving an open HTTP/2 stream that emits an unhandled error when the server closes the connection, causing a denial of service. Versions 8.11.0 and 8.11.1 are affected. A fix is available in version 8.11.2. Workarounds include disabling HTTP/2 for WebSocket connections or avoiding untrusted servers until patched.