GHSA-9fm3-97px-rjf6: Medium severity npm/undici vulnerability

Published Oct 27, 2026
·
Updated

Impact

undici's WebSocket client (including Node.js's bundled globalThis.WebSocket) can be driven to exhaust process memory by a malicious or compromised WebSocket server. For every PING frame received, the receiver automatically writes a PONG response to the socket and ignores the false return value from socket.write(), which is a backpressure signal, so a server that streams small PING frames while never reading the client's PONGs makes the outbound write queue and heap grow without bound until the Node.js process runs out of memory and terminates. The attack is remote and unauthenticated, needs only a normal WebSocket connection, and is asymmetric: small inbound PINGs produce a much larger retained outbound queue. Availability is the only impact. undici 5.x, 6.x, 7.x, and 8.x are affected; the WebSocket client was introduced in 5.15.0.

Patches

Upgrade to 6.29.1, 7.30.1, or 8.12.2, which pause WebSocket frame parsing when the automatic PONG response hits socket backpressure and resume on drain, bounding the outbound queue.

Workarounds

None.

Affected Software

3 affected componentsFixes available
npm/undici>=8.0.0<8.12.2
8.12.2
npm/undici>=7.0.0<7.30.1
7.30.1
npm/undici>=5.15.0<6.29.1
6.29.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/undici to a version that resolves this vulnerability.

    Fixed in 8.12.2
  2. Upgrade

    Upgrade npm/undici to a version that resolves this vulnerability.

    Fixed in 7.30.1
  3. Upgrade

    Upgrade npm/undici to a version that resolves this vulnerability.

    Fixed in 6.29.1
  4. Upgrade

    Upgrade undici to a version that resolves this vulnerability.

    Fixed in 6.29.1
  5. Upgrade

    Upgrade undici to a version that resolves this vulnerability.

    Fixed in 7.30.1
  6. Upgrade

    Upgrade undici to a version that resolves this vulnerability.

    Fixed in 8.12.2

Event History

Oct 27, 2026
Advisory Published
via GitHub·07:02 PM
Data Sourced
via GitHub·07:02 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed to this denial-of-service issue?

Applications using undici's WebSocket client are affected in undici 5.x, 6.x, 7.x, and 8.x. This also includes Node.js applications using the bundled globalThis.WebSocket; the WebSocket client was introduced in undici 5.15.0.

2

What must an attacker be able to do to trigger the issue?

An attacker needs to operate or compromise a WebSocket server that the application connects to. No authentication or special protocol access is required beyond a normal WebSocket connection, and the server must send PING frames while not reading the client's automatic PONG responses.

3

What is the operational impact of successful exploitation?

The affected process can accumulate an unbounded outbound write queue and heap usage until it runs out of memory and terminates. The documented impact is limited to availability.

4

Which versions contain the fix?

Upgrade to undici 6.29.1, 7.30.1, or 8.12.2. These releases pause WebSocket frame parsing when automatic PONG writes encounter socket backpressure and resume parsing after the socket drains.

5

Is there a mitigation if an upgrade cannot be applied immediately?

No workaround is provided. The available remediation is upgrading to a fixed undici release.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203