undici vulnerable to Denial of Service via orphaned RetryHandler response body
Published 29 Sept 2026 · Updated 29 Sept 2026
Affected packages
- Affected
- >=7.11.0 <7.29.1
- Fixed in
- 7.29.1
npm install undici@7.29.1- Affected
- >=8.0.0 <8.10.2
- Fixed in
- 8.10.2
npm install undici@8.10.2Details
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.
Is GHSA-pmjh-fq2x-6v4x in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected undici, and gives you the command that fixes it.
References
- Linkgithub.com/nodejs/undici/security/advisories/GHSA-pmjh-fq2x-6v4x
- Advisorynvd.nist.gov/vuln/detail/CVE-2026-18149
- Linkgithub.com/nodejs/undici/commit/3c6726599cea8646384dde846c97d630da472a74
- Linkgithub.com/nodejs/undici/commit/e905b5b87e6953bcc542af90557b2fee5b7b5974
- Linkhackerone.com/reports/3892751
- Linkcna.openjsf.org/security-advisories.html
- Packagegithub.com/nodejs/undici
- Linkgithub.com/nodejs/undici/releases/tag/v7.29.1
- Linkgithub.com/nodejs/undici/releases/tag/v8.10.2
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.