CVE-2026-137987: undici vulnerable to Denial of Service via unbounded HTTP/2 reconnection of held requests
undici is an HTTP client for Node.js. In versions 7.17.0 through 7.30.3 and 8.0.0 through 8.14.0, a malicious or compromised HTTP/2 origin can hold a request open without ever opening a stream, either by advertising a maximum of zero concurrent streams or while an extended CONNECT request such as a WebSocket handshake waits for the peer's settings, and then repeatedly send GOAWAY or close the connection. Each time, undici immediately reconnects and replays the held request without charging it against the existing replay budget, so the request never settles while the connection churn consumes CPU, and in one reproduction a single request opened thousands of sessions in under half a second. With undici 8.x defaults a plain WebSocket connection can negotiate HTTP/2 and reach this path, while on 7.x the WebSocket path requires the allowH2 option, and the impact is limited to the availability of the client process. The issue is fixed in undici 7.30.4 and 8.14.1, and users should upgrade to one of those versions or later. As a workaround, set allowH2 to false on the affected dispatcher to disable HTTP/2.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
undicito a version that resolves this vulnerability.Fixed in 7.30.4 - Upgrade
Upgrade
undicito a version that resolves this vulnerability.Fixed in 8.14.1 - Configuration
Set allowH2 to false on the affected dispatcher to disable HTTP/2.
undici dispatcher allowH2 = false
Event History
Frequently Asked Questions
Which deployments are most exposed to this issue?
Applications using undici versions 7.17.0 through 7.30.3 or 8.0.0 through 8.14.0 are affected when they connect to a malicious or compromised HTTP/2 origin. In undici 8.x, a plain WebSocket connection can negotiate HTTP/2 under the default configuration; in 7.x, the WebSocket path requires allowH2 to be enabled.
What does an attacker need to do to trigger the denial of service?
The attacker needs to control or compromise an HTTP/2 origin contacted by the client. The origin can hold a request without opening a stream, then repeatedly send GOAWAY frames or close connections, causing undici to reconnect and replay the request indefinitely.
What can be done if upgrading is not immediately possible?
Set allowH2 to false on the affected undici dispatcher to disable HTTP/2. This prevents the HTTP/2 reconnection and replay path described by the issue.
How can I determine whether my application is affected?
Check whether your dependency uses undici 7.17.0 through 7.30.3 or 8.0.0 through 8.14.0, and whether its dispatcher permits HTTP/2 connections. Affected behavior may appear as a request that never settles alongside rapid connection or session churn and elevated CPU use.
Which versions contain the fix?
The issue is fixed in undici 7.30.4 and 8.14.1. Upgrade to one of those versions or a later version.