CVE-2026-87029: undici vulnerable to Denial of Service via unhandled exception in the decompress interceptor
undici's decompress interceptor lets a malicious or compromised HTTP server crash a Node.js client. If the client pairs decompress with a handler that throws, such as dump with maxSize, a small compressed body that expands past the limit raises an uncaught exception and ends the process. Fixed in undici 7.30.1 and 8.12.2.
Published Oct 27, 2026 · Analysis Nov 1, 2026
What an attacker can do
The decompress interceptor passes decompressed data to the downstream handler from zlib stream event callbacks. undici normally turns a synchronous throw from a handler into a failure of that one request. A throw from a zlib callback is asynchronous, so that protection does not apply. The exception escapes and terminates the process.
The built-in dump interceptor throws when a response exceeds its maxSize, so the combination decompress plus dump is vulnerable by design. The attacker is a server your client talks to. It can be malicious, or a legitimate server that was compromised. It returns a compressed body that is tiny on the wire but decompresses past the limit. Only the decompressed size matters.
The result is a denial of service: the whole Node.js process exits, which drops every other in-flight request. If the app installs a global uncaughtException handler, the process survives, but the affected request hangs until the body timeout. The advisory reports no confidentiality or integrity impact. Attack complexity is rated high because the client must use this specific interceptor composition.
Who is affected
undici from 7.15.0 up to but not including 7.30.1, and from 8.0.0 up to but not including 8.12.2. You are exposed only if your code composes the decompress interceptor with a response handler that can throw during processing, such as dump with maxSize. Check the installed version, including nested copies:
npm ls undiciThen search your code for interceptors.decompress.
undici
- Ecosystem
- npm
- Affected
- >= 7.15.0, < 7.30.1
- Fixed in
- 7.30.1
- Check
npm ls undici
undici
- Ecosystem
- npm
- Affected
- >= 8.0.0, < 8.12.2
- Fixed in
- 8.12.2
- Check
npm ls undici
How to fix it
Upgrade to undici 7.30.1 on the 7.x line or 8.12.2 on the 8.x line:
npm install [email protected]On 8.x use npm install [email protected]. If a dependency pins its own undici, update that dependency or use an npm override. Until you upgrade, the advisory's workaround is to not combine the decompress interceptor with a handler that throws during response processing, such as dump with a maxSize.
How to tell if you were hit
Look for Node.js processes that exit or restart after an outbound request, with an uncaught exception stack that passes through zlib callbacks and the dump interceptor's maxSize error. In apps with a global uncaughtException handler, look for outbound requests that stall until the body timeout. Review which upstream servers returned highly compressible responses just before the failures.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Impact
undici's decompress interceptor forwards decompressed response data to the downstream handler from zlib stream event callbacks without catching exceptions those callbacks may throw. undici's engine converts a synchronous throw from a downstream handler into a per-request failure, but that protection is not in place when the throw happens asynchronously from a zlib callback. As a result, a downstream handler that throws by design, for example the built-in dump interceptor which throws when a response exceeds its maxSize, escapes as an uncaught exception and terminates the Node.js process.
A malicious or compromised HTTP server can crash any client that composes the decompress interceptor with dump (or another response handler that throws), by returning a small compressed body that decompresses to more than the configured limit. The compressed bytes on the wire are tiny, so only the decompressed size matters. If the application keeps the process alive with a global uncaught-exception handler, the affected request instead hangs until the body timeout.
Patches
Upgrade to undici 7.30.1 or 8.12.2.
Workarounds
Avoid composing the decompress interceptor with a response handler that throws during response processing (such as dump with a maxSize) until upgrading.
Credited to Yanhaoxi, mcollina, UlisesGascon.
Questions
- Do I need to be running a server to be affected by this undici bug?
No. The flaw is in the HTTP client. Your process is at risk when it makes requests through undici with the decompress interceptor and a throwing handler, and the remote server returns a crafted compressed body.
- Does a global uncaughtException handler protect me?
It keeps the process alive, but the affected request then hangs until the body timeout, according to the advisory. The request still fails.
- Which undici versions fix this?
7.30.1 for the 7.x line and 8.12.2 for the 8.x line. Versions before 7.15.0 are not listed as affected.
References
Read for this analysis:
- https://nvd.nist.gov/vuln/detail/CVE-2026-87029
- https://github.com/nodejs/undici/commit/63cba7712ca012b2603c6aeeb4c72d8692332cd0
- https://github.com/nodejs/undici/commit/f851f315db1f2acce0ea668f88d9d0fa61c8420c
- https://cna.openjsf.org/security-advisories.html
- https://github.com/nodejs/undici/releases/tag/v7.30.1
- https://github.com/nodejs/undici/releases/tag/v8.12.2
- https://github.com/advisories/GHSA-55wc-3pg8-jfw6
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-109383
undici vulnerable to TLS certificate validation bypass via dropped tls options in Agent
high7.4Oct 27, 2026CVE-2026-109829
undici vulnerable to cache poisoning and cross-user disclosure via cross-origin redirects
high7.4Oct 27, 2026CVE-2026-109855
undici WebSocket client vulnerable to Denial of Service via failed HTTP/2 handshake
high7.5Oct 27, 2026CVE-2026-109932
undici WebSocket client vulnerable to Denial of Service via unbounded automatic PONG buffering
medium5.9Oct 27, 2026CVE-2026-87018
undici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiation
high7.5Oct 27, 2026CVE-2026-109841
undici vulnerable to Subresource Integrity bypass via non-lowercase algorithm tokens
medium5.9Oct 23, 2026
