# CVE-2026-18149: undici retry handler response body leak

Source: https://junglewise.ai/threats/cve-2026-18149-undici-retry-handler-response-body-leak  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-04. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-18149 · Severity: medium · CVSS 5.9 · Published 2026-09-04

undici is a popular HTTP client library for Node.js used in many web applications. A flaw in its retry mechanism can cause response bodies to hang indefinitely when a server returns truncated data followed by an error status, preventing the application from closing those connections and exhausting available resources. An attacker controlling a server can exploit this to cause a denial of service by accumulating pending promises and memory leaks.

Technologies: [undici (npm)](https://junglewise.ai/threats/technologies/undici). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-18149 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-18149 being exploited in the wild.

**How severe is CVE-2026-18149?** Medium severity, with a CVSS score of 5.9, published 4 September 2026.

**Which products and versions are affected?** undici (npm) SEMVER:introduced=7.11.0,fixed=7.29.1.

**Is there a fix for CVE-2026-18149?** Yes. undici (npm): upgrade to 7.29.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-18149 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-18149?** Check whether you run undici (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- undici (npm): upgrade to 7.29.1 or later

  ```sh
  npm install undici@7.29.1
  ```


## Technical details

The vulnerability is a resource leak (CWE-772) in undici's RetryHandler. When a retried HTTP request receives a successful response with Content-Length but only partial body data followed by connection close, the retry logic fetches a new request. If that retry returns a non-retryable status (e.g., 400), the handler forwards the new response and replaces its internal stream, but the original partial response body held by the application is never ended or destroyed. This leaves read operations like response.body.text() hanging indefinitely; the configured bodyTimeout does not fire because its timer is tied to the connection parser, not the orphaned body. A remote attacker can repeatedly trigger this by controlling a server that sends two short responses without keeping connections open, accumulating pending promises and streams that exhaust application concurrency or memory. The issue affects undici 7.11.0–7.29.0 and 8.0.0–8.10.1; patches are available in 7.29.1 and 8.10.2.

## Affected products

- OpenJS Foundation undici 7.11.0 to 7.29.0, 8.0.0 to 8.10.1

## Identifiers

- CVE-2026-18149
- GHSA-pmjh-fq2x-6v4x

## Timeline

- 2026-09-04: disclosed
- 2026-09-04: patched: undici 7.29.1 and 8.10.2

## References

- [https://cna.openjsf.org/security-advisories.html](https://cna.openjsf.org/security-advisories.html)
- [https://github.com/nodejs/undici/security/advisories/GHSA-pmjh-fq2x-6v4x](https://github.com/nodejs/undici/security/advisories/GHSA-pmjh-fq2x-6v4x)

## Related threats

- [undici HTTP client denial of service in decompress interceptor](https://junglewise.ai/threats/cve-2026-87029-undici-is-an-http-client-library-for-node-js-in-versions-7-15-0)
- [undici denial of service via TLS 1.2 certificate renegotiation](https://junglewise.ai/threats/cve-2026-87018-undici-is-an-http-client-library-for-node-js-in-versions-4-2-1)
- [undici WebSocket client denial of service via unbounded PONG buffering](https://junglewise.ai/threats/cve-2026-109932-undici-is-an-http-client-library-for-node-js-in-versions-5-15-0)
- [undici EventSource memory exhaustion denial of service](https://junglewise.ai/threats/cve-2026-109924-undici-is-an-http-client-library-for-node-js-in-versions-6-5-0)
- [undici HTTP client denial of service via excessive content-encodings](https://junglewise.ai/threats/cve-2026-109869-undici-is-an-http-client-library-for-node-js-in-versions-6-23-0)
