undici vulnerable to downstream response desynchronization via retry interceptor (CVE-2026-16728)
Undici versions prior to 6.28.0, 7.29.0, and 8.9.0 contain a vulnerability in the interceptors.retry() feature where the response body length may not match the Content-Length header after retrying or resuming a partial response. This mismatch can cause downstream response desynchronization, connection hangs, or response corruption in clients or intermediaries that rely on the Content-Length header for framing. The issue arises when an upstream server returns a partial content response with incorrect Content-Length, and the retry interceptor retries the request, resulting in a stale Content-Length header being forwarded. The vulnerability is patched in undici versions 6.28.0, 7.29.0, and 8.9.0 and later.
AI Analysis
Technical Summary
The vulnerability in undici's interceptors.retry() allows an attacker or faulty upstream server to cause downstream response desynchronization by delivering a response body whose length does not match the Content-Length header after retrying or resuming partial responses. Specifically, if an upstream returns a 206 Partial Content response with a Content-Length header larger than the actual bytes sent, undici may retry the request and deliver a correctly sized body but with the stale, larger Content-Length header. This can cause downstream proxies or clients that forward or rely on this header to experience connection hangs or response corruption. The vulnerability requires the retry interceptor to be enabled, an upstream that returns mismatched framing headers, and a downstream forwarder that does not recalculate or remove Content-Length. The issue is tracked as CVE-2026-16728 and CWE-444 (Improper Resource Shutdown or Release).
Potential Impact
Applications using undici with interceptors.retry() enabled and forwarding upstream response headers and bodies downstream may emit invalid HTTP responses with stale Content-Length headers. This can lead to downstream response desynchronization, connection hangs, or response corruption in clients or intermediaries that rely on the forwarded framing metadata. The vulnerability does not allow direct code execution or data disclosure but can disrupt HTTP communication reliability and integrity.
Mitigation Recommendations
A fix is available in undici versions 6.28.0, 7.29.0, and 8.9.0 and later; users should upgrade to these versions or newer. As workarounds, disable interceptors.retry() when dealing with untrusted upstream servers, or ensure that Content-Length headers are removed or recalculated before forwarding responses assembled or transformed by undici.
undici vulnerable to downstream response desynchronization via retry interceptor (CVE-2026-16728)
Description
Undici versions prior to 6.28.0, 7.29.0, and 8.9.0 contain a vulnerability in the interceptors.retry() feature where the response body length may not match the Content-Length header after retrying or resuming a partial response. This mismatch can cause downstream response desynchronization, connection hangs, or response corruption in clients or intermediaries that rely on the Content-Length header for framing. The issue arises when an upstream server returns a partial content response with incorrect Content-Length, and the retry interceptor retries the request, resulting in a stale Content-Length header being forwarded. The vulnerability is patched in undici versions 6.28.0, 7.29.0, and 8.9.0 and later.
CVSS v3.1
Score 4.8medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in undici's interceptors.retry() allows an attacker or faulty upstream server to cause downstream response desynchronization by delivering a response body whose length does not match the Content-Length header after retrying or resuming partial responses. Specifically, if an upstream returns a 206 Partial Content response with a Content-Length header larger than the actual bytes sent, undici may retry the request and deliver a correctly sized body but with the stale, larger Content-Length header. This can cause downstream proxies or clients that forward or rely on this header to experience connection hangs or response corruption. The vulnerability requires the retry interceptor to be enabled, an upstream that returns mismatched framing headers, and a downstream forwarder that does not recalculate or remove Content-Length. The issue is tracked as CVE-2026-16728 and CWE-444 (Improper Resource Shutdown or Release).
Potential Impact
Applications using undici with interceptors.retry() enabled and forwarding upstream response headers and bodies downstream may emit invalid HTTP responses with stale Content-Length headers. This can lead to downstream response desynchronization, connection hangs, or response corruption in clients or intermediaries that rely on the forwarded framing metadata. The vulnerability does not allow direct code execution or data disclosure but can disrupt HTTP communication reliability and integrity.
Mitigation Recommendations
A fix is available in undici versions 6.28.0, 7.29.0, and 8.9.0 and later; users should upgrade to these versions or newer. As workarounds, disable interceptors.retry() when dealing with untrusted upstream servers, or ensure that Content-Length headers are removed or recalculated before forwarding responses assembled or transformed by undici.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-8xcm-r25x-g524
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-16728"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a710654bf32cb7a343931b0
Added to database: 08/03/2026, 21:21:24 UTC
Last enriched: 08/03/2026, 21:25:07 UTC
Last updated: 08/04/2026, 00:58:24 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.