Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. undici
  4. ›
  5. CVE-2026-18540

CVE-2026-18540: undici vulnerable to downstream response splitting via retry interceptor

September 29, 2026

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.

References

  • cna.openjsf.org/security-advisories.html
  • github.com/advisories/GHSA-r53p-7pc4-xj5r
  • github.com/nodejs/undici/commit/0160a719063fb0a77f4fdf9500b9166b91e14329
  • github.com/nodejs/undici/commit/cd8af90b38ae33c2838d54a2d629774122effe95
  • github.com/nodejs/undici/commit/ce31bc824b578008faae5d3350da66c1b5f71548
  • github.com/nodejs/undici/releases/tag/v6.28.1
  • github.com/nodejs/undici/releases/tag/v7.29.1
  • github.com/nodejs/undici/releases/tag/v8.10.2
  • github.com/nodejs/undici/security/advisories/GHSA-r53p-7pc4-xj5r
  • hackerone.com/reports/3900104
  • hackerone.com/reports/3900615
  • nvd.nist.gov/vuln/detail/CVE-2026-18540

Code Behaviors & Features

Detect and mitigate CVE-2026-18540 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 6.28.1, all versions starting from 7.0.0 before 7.29.1, all versions starting from 8.0.0 before 8.10.2

Fixed versions

  • 6.28.1
  • 7.29.1
  • 8.10.2

Solution

Upgrade to versions 6.28.1, 7.29.1, 8.10.2 or above.

Impact 3.7 LOW

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')

Source file

npm/undici/CVE-2026-18540.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 30 Sep 2026 12:18:20 +0000.