CVE-2026-109855: undici WebSocket client vulnerable to Denial of Service via failed HTTP/2 handshake
undici 8.11.0 and 8.11.1 can crash the whole Node.js process when their WebSocket client connects over HTTP/2 to a malicious server. A bad handshake response leaves an HTTP/2 stream open with no error listener, and the next error kills the process. Any client that opens a WebSocket to an untrusted server is exposed. Fixed in 8.11.2.
Published Oct 27, 2026 · Analysis Nov 1, 2026
What an attacker can do
undici's experimental WebSocket client uses HTTP/2 by default (allowH2: true). If the server answers the upgrade with a response that fails handshake validation, undici tries to abort the request. The abort does nothing because the request is already marked completed, so the underlying ClientHttp2Stream stays open and has no error listener.
When the server then destroys the connection, the orphaned stream emits an error event that nothing handles. Node.js treats that as an uncaught exception and exits the process.
The attacker is a server, not a user: they need the victim's code to open a WebSocket to a host they control, or a host they can impersonate. No authentication or interaction is needed beyond that connection (CVSS PR:N/UI:N). The impact is availability only, but it takes down the entire process, including any unrelated work it was doing. Services that connect to user-supplied WebSocket URLs, such as webhooks, proxies and agent tooling, are the likeliest targets. The regression was introduced in 8.11.0, so older lines are not affected.
Who is affected
undici 8.11.0 and 8.11.1 only. Versions before 8.11.0 and from 8.11.2 are not affected. Check:
npm ls undiciThen look for code that opens WebSockets with undici's WebSocket to hosts you do not control. Exposure depends on allowH2 being true, which is the default.
undici
- Ecosystem
- npm
- Affected
- >= 8.11.0, < 8.11.2
- Fixed in
- 8.11.2
- Check
npm ls undici
How to fix it
Upgrade to undici 8.11.2:
npm install [email protected]The fix (pull request 5873, in lib/web/websocket/connection.js) closes the streams of rejected HTTP/2 WebSocket handshakes. Workarounds from the advisory until you upgrade: set allowH2: false to turn off HTTP/2 for WebSocket connections, or avoid opening WebSocket connections to untrusted servers.
How to tell if you were hit
Look for unexplained Node.js process exits or restarts right after outbound WebSocket connections, with an unhandled error event from an HTTP/2 stream in the crash output. Correlate the crash time with the destination host of the WebSocket. Check lockfiles and images for undici 8.11.0 or 8.11.1.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Impact
undici's experimental WebSocket client (enabled by default via allowH2: true) crashes the Node.js process when it connects to a malicious server over HTTP/2. If the server answers the WebSocket upgrade with a response that fails handshake validation, undici aborts the request, but the abort is a no-op because the request is already marked completed, so the underlying ClientHttp2Stream is left open with no error listener. When the server then destroys the connection, the orphaned stream emits an unhandled error and the process exits. A remote, unauthenticated server can therefore deny service to any client that opens a WebSocket to it over HTTP/2. undici 8.11.0 and 8.11.1 are affected; the regression was introduced in 8.11.0.
Patches
Upgrade to 8.11.2.
Workarounds
Set allowH2: false to disable HTTP/2 for WebSocket connections, or avoid opening WebSocket connections to untrusted servers, until upgrading.
Credited to kjsik11, mcollina, jasnell, metcoder95, UlisesGascon.
Questions
- Which undici versions are affected by CVE-2026-109855?
Only 8.11.0 and 8.11.1. The regression was introduced in 8.11.0, and 8.11.2 fixes it.
- Is there a workaround?
Yes. Set
allowH2: falseto disable HTTP/2 for WebSocket connections, or do not open WebSocket connections to untrusted servers, until you upgrade.- Can an attacker reach me without my connecting out?
No. The attack comes from the server side. Your process must open a WebSocket to the malicious host over HTTP/2 first.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-109383
undici vulnerable to TLS certificate validation bypass via dropped tls options in Agent
high7.4Oct 27, 2026CVE-2026-109829
undici vulnerable to cache poisoning and cross-user disclosure via cross-origin redirects
high7.4Oct 27, 2026CVE-2026-109932
undici WebSocket client vulnerable to Denial of Service via unbounded automatic PONG buffering
medium5.9Oct 27, 2026CVE-2026-87018
undici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiation
high7.5Oct 27, 2026CVE-2026-87029
undici vulnerable to Denial of Service via unhandled exception in the decompress interceptor
medium5.9Oct 27, 2026CVE-2026-109841
undici vulnerable to Subresource Integrity bypass via non-lowercase algorithm tokens
medium5.9Oct 23, 2026
