Junglewise Threat Intelligence

CVE-2026-18540: Node.js undici downstream response splitting via retry interceptor

CVE-2026-18540 · Severity: low · CVSS 3.7 · Published 2026-09-04

Executive brief

undici is a popular HTTP client library for Node.js used in web servers and proxy applications. A flaw in its automatic retry logic can cause it to combine bytes from multiple server responses into a single response body while maintaining the original response's headers, allowing attackers to inject malicious content that appears to be part of a legitimate response. Applications forwarding this malformed response downstream without recalculating content framing can emit HTTP smuggling attacks that breach security boundaries between requests.

Technical details

A response splitting vulnerability exists in undici's retry interceptor when retrying partial responses. When an upstream server delivers a partial response (e.g., 404 or 206 Partial Content) and then closes, undici may retry the request with a Range header. The interceptor incorrectly appends bytes from the resumed response to the already-delivered partial body while preserving the original response's status, headers, and Content-Length. An attacker controlling the upstream server can deliver a response with mismatched Content-Length and actual body size, causing downstream proxies or gateways to interpret excess bytes as a new HTTP response, enabling HTTP request/response smuggling (CWE-444). Exploitation requires the retry interceptor to be enabled, an attacker-controlled upstream server, and a downstream application that forwards responses without normalizing content framing. Patches are available in undici 6.28.1, 7.29.1, and 8.10.2.

Affected products

  • OpenJS Foundation undici before 6.28.1, 7.0.0 through 7.29.0, 8.0.0 through 8.10.1

Timeline

  • 2026-09-04: disclosed
  • 2026-09-04: patched: undici 6.28.1, 7.29.1, and 8.10.2 released

References