{"id":"CVE-2026-18540","aliases":["CVE-2026-18540","GHSA-r53p-7pc4-xj5r"],"related":[],"kind":"vulnerability","state":"published","title":"undici vulnerable to downstream response splitting via retry interceptor","summary":"undici's retry interceptor can append the body of a ranged retry response to bytes already delivered from an earlier partial response while still presenting the original response's status and headers. This happens when an upstream server delivers part of a body without a trustworthy resume checkpoint, for example a non-success response whose headers were already sent or a partial-content response with an unusable content range, then closes the connection and answers the resumed range request with more bytes. As a result the response body can be longer than the Content-Length that the application observes. An application that relays such a response to a downstream HTTP/1.1 peer without normalizing the framing can emit a body that exceeds the forwarded Content-Length, and the excess bytes can be interpreted as the start of a following response, which enables downstream response splitting or desynchronization. Exploitation requires an attacker-controlled upstream server and an application that forwards the response through a framing-sensitive path. This affects undici versions before 6.28.1, from 7.0.0 up to 7.29.1, and from 8.0.0 up to 8.10.2. Users should upgrade to undici 6.28.1, 7.29.1, or 8.10.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"undici's retry interceptor can append the body of a ranged retry response to bytes already delivered from an earlier partial response while still presenting the original response's status and headers. This happens when an upstream server delivers part of a body without a trustworthy resume checkpoint, for example a non-success response whose headers were already sent or a partial-content response with an unusable content range, then closes the connection and answers the resumed range request with more bytes. As a result the response body can be longer than the Content-Length that the application observes. An application that relays such a response to a downstream HTTP/1.1 peer without normalizing the framing can emit a body that exceeds the forwarded Content-Length, and the excess bytes can be interpreted as the start of a following response, which enables downstream response splitting or desynchronization. Exploitation requires an attacker-controlled upstream server and an application that forwards the response through a framing-sensitive path. This affects undici versions before 6.28.1, from 7.0.0 up to 7.29.1, and from 8.0.0 up to 8.10.2. Users should upgrade to undici 6.28.1, 7.29.1, or 8.10.2.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nUndici's `interceptors.retry()` can resume a request after a partial response and append the resumed bytes to an already partially delivered body, while the application still receives the original response's status and headers. When that response carried a `Content-Length`, the application can receive a longer body. Applications that forward Undici's status, headers, and body downstream without recalculating framing, for example proxy or gateway applications, may emit a response whose body exceeds the forwarded `Content-Length`, and the excess bytes can be read as the start of a subsequent HTTP response (downstream response splitting or desynchronization).\n\nFor example, a `404 Not Found` with `Content-Length: 2` that sends one byte then closes can be resumed with an open-ended `Range` request, and the resumed `206 Partial Content` bytes are appended, so the application receives more than two body bytes while still seeing `Content-Length: 2`. The bug requires `interceptors.retry()` enabled, an attacker-controlled or faulty upstream, and a downstream forwarder that does not recalculate `Content-Length`.\n\n### Patches\n\nPatched in undici v6.28.1, v7.29.1, and v8.10.2. Upgrade to one of these or later.\n\n### Workarounds\n\n- Disable `interceptors.retry()` for untrusted upstreams, or set `maxRetries: 0`.\n- Remove or recalculate `Content-Length` before forwarding a response body assembled by Undici.","format":"markdown","source":"ghsa"}],"published":"2026-09-04T17:15:50.619Z","modified":"2026-09-29T18:30:41.154Z","severity":{"scorer":"openjs","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","score":3.7,"rating":"LOW"},"severities":[{"scorer":"openjs","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","score":3.7,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","score":3.7,"rating":"LOW"}],"cwes":["CWE-444"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"6.28.1","status":"affected"},{"type":"semver","version":"6.28.1","status":"unaffected"},{"type":"semver","introduced":"7.0.0","fixed":"7.29.1","status":"affected"},{"type":"semver","version":"7.29.1","status":"unaffected"},{"type":"semver","introduced":"8.0.0","fixed":"8.10.2","status":"affected"},{"type":"semver","version":"8.10.2","status":"unaffected"}],"vendor":"undici","product":"undici","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"6.28.1"}],"ecosystem":"npm","package":"undici","purl":"pkg:npm/undici","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"7.0.0","status":"affected","fixed":"7.29.1"}],"ecosystem":"npm","package":"undici","purl":"pkg:npm/undici","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"8.0.0","status":"affected","fixed":"8.10.2"}],"ecosystem":"npm","package":"undici","purl":"pkg:npm/undici","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"6.28.1"},{"status":"affected","introduced":"7.0.0","fixed":"7.29.1"},{"status":"affected","introduced":"8.0.0","fixed":"8.10.2"}],"vendor":"nodejs","product":"undici","cpe":"cpe:2.3:a:nodejs:undici:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/nodejs/undici/security/advisories/GHSA-r53p-7pc4-xj5r","tags":["mitigation","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://cna.openjsf.org/security-advisories.html","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-18540","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nodejs/undici/commit/0160a719063fb0a77f4fdf9500b9166b91e14329","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/nodejs/undici/commit/cd8af90b38ae33c2838d54a2d629774122effe95","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/nodejs/undici/commit/ce31bc824b578008faae5d3350da66c1b5f71548","tags":["web"],"sources":["ghsa"]},{"url":"https://hackerone.com/reports/3900104","tags":["web"],"sources":["ghsa"]},{"url":"https://hackerone.com/reports/3900615","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/nodejs/undici","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/nodejs/undici/releases/tag/v6.28.1","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/nodejs/undici/releases/tag/v7.29.1","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/nodejs/undici/releases/tag/v8.10.2","tags":["web"],"sources":["ghsa"]}],"credits":["samuel871211","mcollina","UlisesGascon"],"assigner":"openjs","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-09-04T17:50:05.851Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-18540","url":"https://www.cve.org/CVERecord?id=CVE-2026-18540","licence":"CVE Terms of Use","modified":"2026-09-04T17:50:13.682Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-r53p-7pc4-xj5r","url":"https://github.com/advisories/GHSA-r53p-7pc4-xj5r","licence":"CC-BY-4.0","modified":"2026-09-29T18:30:41.154Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-18540","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-18540","licence":"Public domain","modified":"2026-09-16T20:41:17.627Z"}],"updatedAt":"2026-11-25T22:59:36.376Z","epss":{"score":0.00239,"percentile":0.16088,"date":"2026-12-01T12:00:22.000Z"}}