---
id: "CVE-2026-87029"
kind: "vulnerability"
aliases: ["CVE-2026-87029", "GHSA-55wc-3pg8-jfw6"]
title: "undici vulnerable to Denial of Service via unhandled exception in the decompress interceptor"
severity: "high"
cvss: 7.5
epss: 0.0026
exploited: false
status: "open"
category: "package"
products: [{"name": "undici", "fixed": ["7.30.1"], "affected": ">= 7.15.0, < 7.30.1", "ecosystem": "npm"}, {"name": "undici", "fixed": ["8.12.2"], "affected": ">= 8.0.0, < 8.12.2", "ecosystem": "npm"}, {"name": "nodejs undici", "fixed": ["7.30.1"], "affected": ">= 7.15.0, < 7.30.1", "ecosystem": "vendor"}, {"name": "nodejs undici", "fixed": ["8.12.2"], "affected": ">= 8.0.0, < 8.12.2", "ecosystem": "vendor"}]
ecosystems: ["npm", "vendor"]
tags: ["cwe-248", "http-clients", "node.js", "package", "undici"]
not_affected_if: ["default-config", "no-decompress-interceptor"]
published_at: "2026-10-15T19:17:47+00:00"
first_seen_at: "2026-10-27T19:04:56+00:00"
updated_at: "2026-10-27T19:33:18+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-55wc-3pg8-jfw6", "first_seen_at": "2026-10-27T19:04:56+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-87029", "first_seen_at": "2026-10-27T19:33:18+00:00"}]
---

# undici vulnerable to Denial of Service via unhandled exception in the decompress interceptor

undici's decompress interceptor passes decompressed data to downstream handlers from zlib callbacks without catching exceptions, so a handler that throws (such as dump with maxSize) becomes an uncaught exception. A malicious HTTP server can send a small compressed body that expands past the limit and terminate any client process that uses this combination.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- npm:undici affected >= 7.15.0, < 7.30.1 fixed 7.30.1
- npm:undici affected >= 8.0.0, < 8.12.2 fixed 8.12.2
- vendor:nodejs undici affected >= 7.15.0, < 7.30.1 fixed 7.30.1
- vendor:nodejs undici affected >= 8.0.0, < 8.12.2 fixed 8.12.2

## How to check

- Run `node -p "require('undici/package.json').version"` in the project and compare against the fixed versions.
- Search lockfiles for `undici` and check whether code composes `interceptors.decompress` with `interceptors.dump` using `maxSize`.

## Fix

- Upgrade `undici` to `7.30.1` (7.x line) or `8.12.2` (8.x line).
- Until upgrading, avoid composing the `decompress` interceptor with a response handler that throws, such as `dump` with a `maxSize`.

## Timeline

- 2026-10-27T19:04:56+00:00 ghsa https://github.com/advisories/GHSA-55wc-3pg8-jfw6
- 2026-10-27T19:33:18+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-87029

## From the sources

## 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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
