{"schema":"threatline.record/2","record":{"id":"CVE-2026-18540","aliases":["GHSA-r53p-7pc4-xj5r"],"summary":"undici vulnerable to downstream response splitting via retry interceptor","details":"### 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.","categories":["Libraries & packages"],"product":"undici","vendor":"undici","ecosystem":"npm","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-r53p-7pc4-xj5r","source_modified_at":"2026-09-29T18:22:08Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"undici"},"range":"< 6.28.1"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-r53p-7pc4-xj5r","source_modified_at":"2026-09-29T18:22:08Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"undici"},"range":">= 7.0.0, < 7.29.1"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-r53p-7pc4-xj5r","source_modified_at":"2026-09-29T18:22:08Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"undici"},"range":">= 8.0.0, < 8.10.2"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-18540","source_modified_at":"2026-09-04T17:50:13.682Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"undici","vendor":"undici","versions":[{"versionType":"semver","status":"affected","version":"0","lessThan":"6.28.1"},{"versionType":"semver","status":"unaffected","version":"6.28.1"},{"versionType":"semver","status":"affected","version":"7.0.0","lessThan":"7.29.1"},{"versionType":"semver","status":"unaffected","version":"7.29.1"},{"versionType":"semver","status":"affected","version":"8.0.0","lessThan":"8.10.2"},{"versionType":"semver","status":"unaffected","version":"8.10.2"}],"defaultStatus":"unaffected"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-r53p-7pc4-xj5r","source_modified_at":"2026-09-29T18:30:41.154532067Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"undici","purl":"pkg:npm/undici"},"ranges":[{"events":[{"introduced":"0"},{"fixed":"6.28.1"}],"type":"SEMVER"}],"versions":[]},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-r53p-7pc4-xj5r","source_modified_at":"2026-09-29T18:30:41.154532067Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"undici","purl":"pkg:npm/undici"},"ranges":[{"events":[{"introduced":"7.0.0"},{"fixed":"7.29.1"}],"type":"SEMVER"}],"versions":[]},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-r53p-7pc4-xj5r","source_modified_at":"2026-09-29T18:30:41.154532067Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"undici","purl":"pkg:npm/undici"},"ranges":[{"events":[{"introduced":"8.0.0"},{"fixed":"8.10.2"}],"type":"SEMVER"}],"versions":[]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-r53p-7pc4-xj5r","source_modified_at":"2026-09-29T18:22:08Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"undici"},"version":"6.28.1"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-r53p-7pc4-xj5r","source_modified_at":"2026-09-29T18:22:08Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"undici"},"version":"7.29.1"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-r53p-7pc4-xj5r","source_modified_at":"2026-09-29T18:22:08Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"undici"},"version":"8.10.2"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-18540","source_modified_at":"2026-09-04T17:50:13.682Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"name":"undici","ecosystem":null},"version":"6.28.1","basis":"first unaffected version stated in the CVE record"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-18540","source_modified_at":"2026-09-04T17:50:13.682Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"name":"undici","ecosystem":null},"version":"7.29.1","basis":"first unaffected version stated in the CVE record"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-18540","source_modified_at":"2026-09-04T17:50:13.682Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"name":"undici","ecosystem":null},"version":"8.10.2","basis":"first unaffected version stated in the CVE record"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-r53p-7pc4-xj5r","source_modified_at":"2026-09-29T18:30:41.154532067Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"undici","purl":"pkg:npm/undici"},"version":"6.28.1"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-r53p-7pc4-xj5r","source_modified_at":"2026-09-29T18:30:41.154532067Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"undici","purl":"pkg:npm/undici"},"version":"7.29.1"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-r53p-7pc4-xj5r","source_modified_at":"2026-09-29T18:30:41.154532067Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"undici","purl":"pkg:npm/undici"},"version":"8.10.2"}],"cvss":3.7,"severity":"Low","kev":{"listed":false},"epss":{"probability":0.00239,"percentile":0.14185,"score_date":"2026-10-23"},"published_at":"2026-09-04T17:15:50.619Z","modified_at":"2026-09-29T18:30:41.154532067Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-r53p-7pc4-xj5r","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-09-29T18:22:08Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-18540","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-09-04T17:50:13.682Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-r53p-7pc4-xj5r","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-09-29T18:30:41.154532067Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-18540","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/nodejs/undici/security/advisories/GHSA-r53p-7pc4-xj5r"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-18540","source":"GitHub Advisory Database"},{"url":"https://github.com/nodejs/undici/commit/0160a719063fb0a77f4fdf9500b9166b91e14329","source":"GitHub Advisory Database"},{"url":"https://github.com/nodejs/undici/commit/cd8af90b38ae33c2838d54a2d629774122effe95","source":"GitHub Advisory Database"},{"url":"https://github.com/nodejs/undici/commit/ce31bc824b578008faae5d3350da66c1b5f71548","source":"GitHub Advisory Database"},{"url":"https://hackerone.com/reports/3900104","source":"GitHub Advisory Database"},{"url":"https://hackerone.com/reports/3900615","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://cna.openjsf.org/security-advisories.html"},{"url":"https://github.com/nodejs/undici/releases/tag/v6.28.1","source":"GitHub Advisory Database"},{"url":"https://github.com/nodejs/undici/releases/tag/v7.29.1","source":"GitHub Advisory Database"},{"url":"https://github.com/nodejs/undici/releases/tag/v8.10.2","source":"GitHub Advisory Database"},{"url":"https://github.com/advisories/GHSA-r53p-7pc4-xj5r","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","ssvc":{"exploitation":"none","automatable":"no","technical_impact":"partial","assessed_at":"2026-09-04T17:50:05.851866Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-09-29T18:30:41.154532067Z","content_hash":"8e55f1c22064e46aea1cd7b466496dc53f5b0cb2e46676a25ef038d295437e2e"}}
