undici vulnerable to Denial of Service via WebSocketStream unclean close
Published 29 Sept 2026 · Updated 29 Sept 2026
Affected packages
- Affected
- >=7.0.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 WebSocketStream crashes the client process when a WebSocket connection is closed abruptly without a close handshake. On such an unclean close, the internal socket-close handler calls abort() on the writable stream even when the application holds a writer lock. Per the WHATWG Streams standard, aborting a locked stream returns a promise that rejects with a TypeError, and the handler discards that promise. The unobserved rejection surfaces as an unhandledRejection and, under Node.js's default behavior, terminates the process.
A malicious or compromised WebSocket server can crash a client with a single connection teardown (a TCP reset, a proxy teardown, or a protocol-violating frame). Affected applications are those using the WebSocketStream API and writing through a writer, which is the standard way to write.
All releases from undici 7.0.0 are affected. WebSocketStream was introduced in 7.0.0.
Patches
Upgrade to undici v7.29.1 or v8.10.2.
Workarounds
No workaround is available.
Is GHSA-rx4f-c7p8-82vq 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-rx4f-c7p8-82vq
- Advisorynvd.nist.gov/vuln/detail/CVE-2026-85014
- Linkgithub.com/nodejs/undici/commit/1858656ebb1e919311c1f31613dfd581b7214349
- Linkgithub.com/nodejs/undici/commit/662d0ea671fe64139e79533c913fce412765e1d7
- 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.