CVE-2026-18540 is a low-severity (CVSS 3.7) CWE-444 vulnerability in undici. A fix is available for undici — see the affected versions and patch details below.
undici vulnerable to downstream response splitting via retry interceptor
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-18540.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2026-18540 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
undicinpmDescription
Impact
Undici'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).
For 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.
Patches
Patched in undici v6.28.1, v7.29.1, and v8.10.2. Upgrade to one of these or later.
Workarounds
- Disable
interceptors.retry()for untrusted upstreams, or setmaxRetries: 0. - Remove or recalculate
Content-Lengthbefore forwarding a response body assembled by Undici.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | undici | all versions | 6.28.1npm install undici@6.28.1 |
| 📦npm | undici | ≥ 7.0.0&&< 7.29.1 | 7.29.1npm install undici@7.29.1 |
| 📦npm | undici | ≥ 8.0.0&&< 8.10.2 | 8.10.2npm install undici@8.10.2 |
Affected Products
undicinodejsDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for undici, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update undici to 6.28.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-18540 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This Low impact flaw in the undici HTTP client's retry interceptor can lead to HTTP response splitting or desynchronization. Exploitation requires an attacker-controlled upstream server and an application that forwards responses without proper framing normalization.
Disable interceptors.retry() for untrusted upstreams, or set maxRetries: 0 on the retry interceptor configuration. Alternatively, remove or recalculate the Content-Length header before forwarding a response body assembled by undici to downstream HTTP/1.1 peers.Source: Red Hat security advisory for CVE-2026-18540 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Hardened Images | grafana12-4-main-12.4.10-0.2.hum1 | RHSA-2026:66008 |
| Red Hat Hardened Images | nodejs26-main-11.19.1-1.26.8.2.0.1.hum1 | RHSA-2026:66605 |
| Red Hat Hardened Images | nodejs24-main-11.19.0-1.24.21.0.1.hum1 | RHSA-2026:71017 |
Frequently Asked Questions
Is CVE-2026-18540 in your dependencies?
Find it across npm, including transitive dependencies.