undici vulnerable to Denial of Service via orphaned RetryHandler response body
What fixes it
- 7.29.1undici, npmGitHub
npm install undici@7.29.1 - 8.10.2undici, npmGitHub
npm install undici@8.10.2 - 7.29.1undiciCVE List
- 8.10.2undiciCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
Impact
undici's RetryHandler can leave a response body pending indefinitely. When a retried request receives a non-retryable response after a truncated one, the original response.body held by the application is never settled, so reads such as response.body.text() hang and bodyTimeout does not fire. A malicious server can repeat this to accumulate pending promises and streams, leading to denial of service.
Patches
Patched in undici v7.29.1 and v8.10.2.
Workarounds
Impose an independent request deadline and destroy the response body when it expires. bodyTimeout alone does not prevent this.
Text from GitHub Advisory Database
Affected versions 8
- undici, npm>= 7.11.0, < 7.29.1GitHub
- undici, npm>= 8.0.0, < 8.10.2GitHub
- undiciaffected: 7.11.0 before 7.29.1CVE List
- undiciunaffected: 7.29.1CVE List
- undiciaffected: 8.0.0 before 8.10.2CVE List
- undiciunaffected: 8.10.2CVE List
- undici, npmfrom 7.11.0, fixed in 7.29.1OSV
- undici, npmfrom 8.0.0, fixed in 8.10.2OSV
References 9
- github.com/nodejs/undici/commit/3c6726599cea8646384dde846c97d630da472a74Fixvia GitHub
- github.com/nodejs/undici/commit/e905b5b87e6953bcc542af90557b2fee5b7b5974Fixvia GitHub
- github.com/nodejs/undici/releases/tag/v7.29.1Fixvia GitHub
- github.com/nodejs/undici/releases/tag/v8.10.2Fixvia GitHub
- github.com/nodejs/undici/security/advisories/GHSA-pmjh-fq2x-6v4xAdvisoryvia CVE List
- cna.openjsf.org/security-advisories.htmlAdvisoryvia CVE List
- github.com/advisories/GHSA-pmjh-fq2x-6v4xAdvisoryvia GitHub
- nvd.nist.gov/vuln/detail/CVE-2026-18149Referencevia GitHub
- hackerone.com/reports/3892751Referencevia GitHub