Systems that use WebSocket on Node.js, such as for chat, notifications or real-time displays in admin interfaces, may be using a library called ws. Even if you do not remember installing it directly, the server foundation of socket.io (engine.io) and NestJS's WebSocket components depend on ws.
On November 12, 2026, ws released 8.23.0, 7.5.14, 6.2.7 and 5.2.8. All of them include a fix titled “[security] Limit automatically sent pending pongs,” and on the same day the advisory GHSA-37g9-w4hg-h9qr (severity High, 7.5 under CVSS 3.1) was published in the ws repository. The issue is that if a malicious peer keeps sending pings without reading the replies (pongs), the server keeps accumulating replies until the process eventually crashes from running out of memory. In this article, we summarize what the fix does, the results of comparing versions before and after the fix in a test environment, and how to upgrade when you use socket.io.
What was fixed
The description of the fix commit (ace7248 for the 8.x line, November 10, 2026) is as follows.
A malicious peer could flood the other peer with pings while stopping reads, forcing it to buffer response pongs until the process crashes due to OOM.
When ws receives a ping from a peer, it automatically replies with a pong (autoPong defaults to true). If the peer stops receiving, the pongs it sends do not reach their destination and pile up in the server's send queue. After the fix, there is a limit on the number of automatic pongs that have not finished sending, and the connection is forcibly closed when the limit is exceeded. The limit can be changed with the new option maxPendingAutoPongs.
- The default is 60. It was added to both
WebSocketServerand the client-sideWebSocket - Setting it to 0 means no limit (the same behavior as before the fix)
- When the limit is exceeded, the connection is closed with
terminate()
According to the advisory, the affected versions are below 5.2.8, 6.0.0 or later but below 6.2.7, 7.0.0 or later but below 7.5.14, and 8.0.0 or later but below 8.23.0. There is no fixed version for 4.x and earlier, so you need to upgrade to 5.2.8 or later. As workarounds when you cannot upgrade right away, the advisory lists “rate limiting combined with a heartbeat (periodic liveness checks)” or, on versions where it is available, setting autoPong to false. A “12 Nov 2026” entry was also added to the ws SECURITY.md history.
However, as of November 20, 2026, this advisory cannot be found in GitHub's overall Advisory Database (gh api /advisories/GHSA-37g9-w4hg-h9qr), and no CVE number has been assigned. npm audit uses this database, so it may not detect it. Check by version.
Comparing before and after the fix in a test environment
In a test environment with Node.js 22.23.5 (Linux 6.18.44), we created, within the same process, a ws server and a peer that stops receiving and sends 200,000 pings (127.0.0.1 only), and observed the state after 8 seconds. The ping payload was 125 bytes, the maximum for control frames. The server settings were left at their defaults.
| Version and settings | Pings processed | Server send queue (maximum) | Connection |
|---|---|---|---|
| 8.22.2 (before the fix) | 200,000 | About 21.4MB | Not closed |
| 8.23.0 (default) | 500 | — | Closed in about 30 milliseconds |
8.23.0、maxPendingAutoPongs: 1000 | 33,098 | About 0.13MB | Closed in about 0.12 seconds |
8.23.0、maxPendingAutoPongs: 0 | 200,000 | About 21.4MB | Not closed |
The time until closing is the elapsed time from the start of the script. We ran 8.22.2 and 8.23.0 (default) three times each and got the same results. Before the fix, most of the 200,000 pongs (about 25MB worth) remained in the server's memory from a single connection, and the connection was not closed. We did not test behavior with multiple connections. After the fix, the connection was closed at the 500th ping. The limit is 60, but pongs that have been handed off to the OS send buffer count as “finished sending,” so the count likely does not increase until the buffer fills up. The number of pings processed before closing may vary by environment.

socket.io does not automatically use the fixed version of ws
We checked how major dependents specify ws in their npm registry metadata as of November 20, 2026.
| Package (latest version) | ws specifier | Gets 8.23.0? |
|---|---|---|
| engine.io 6.6.12 (the server foundation of socket.io, published November 19) | ~8.21.0 | No (up to 8.21.x) |
@nestjs/platform-ws 12.5.1 (8.21.2 in 11.2.11 for the 11.x line) | 8.22.1 | No (pinned) |
| puppeteer-core 25.18.1 | ^8.22.1 | Yes |
| webpack-dev-server 6.1.0 | ^8.20.0 | Yes |
A fresh install of socket.io 4.8.4 resolved ws to 8.21.3. When we connected to a socket.io server in this state over WebSocket and sent pings the same way, the send queue held about 21.1 MB after 8 seconds and the connection was not closed. engine.io published 6.6.12 on November 19, after the fixed ws was released, but its ws specifier remains ~8.21.0.
If you specify ws in the overrides of package.json, the ws under socket.io also becomes 8.23.0.
{
"overrides": {
"ws": "8.23.0"
}
}
After reinstalling with this setting, every npm ls ws was 8.23.0. In the same test, the socket.io connection was closed with transport close within 0.1 seconds of starting to send pings (334 milliseconds from the start of the script, which waits 0.3 seconds before sending pings). Normal exchanges with socket.io-client (100 send-and-receive round trips over WebSocket with acknowledgment checks) succeeded in all 100 cases. Because this uses a version outside the range engine.io specifies (8.21.x), run your own application's tests before shipping to production. In yarn, resolutions serves the same purpose, and in pnpm, pnpm.overrides does.
Order of checks (editorial suggestion)
- Check which versions are installed.
npm ls ws --alllists every version of ws, direct and indirect. The fixed versions are 8.23.0 or later for 8.x, 7.5.14 or later for 7.x, 6.2.7 or later for 6.x, and 5.2.8 or later for 5.x. There is no fixed version for 4.x and earlier, so upgrade to 5.2.8 or later. - Check whether connections come from outside. Upgrade WebSocket servers that users' browsers or external services connect to first. ws inside development tools (test browser automation or development servers) can wait if it is used in a way that does not accept outside connections.
- Replace it where the range is pinned. Where the range is pinned, as with socket.io and NestJS, use the
overridesabove and remove it once a new version of the parent package is released. - Do not set the limit to 0. Even if you have legitimate peers that send large numbers of pings, start by raising the limit and observing.
- Apply a workaround if you cannot upgrade right away. Consider the advisory's workarounds (limiting the number of sends in combination with a heartbeat, or
autoPong: false) as a stopgap until you upgrade.
We covered how to prioritize dependency vulnerabilities in our article on GTIG's statistics, and a record of rolling out a Node.js update across multiple repositories at once in our article on Node.js 22.23.4.
On November 18, 2026, we checked the websockets/ws repository (commits ace7248, 718c33c, 8a10a6a, and 560e071, and doc/ws.md), the npm publication timestamps, and each package's dependency specifiers. On November 20, we rechecked the ws advisory GHSA-37g9-w4hg-h9qr,
SECURITY.md, the GitHub Advisory Database, and the dependency specifiers of the latest versions on npm. We tested the behavior before and after the fix under the conditions above in a test environment (Node.js 22.23.5, Linux) (hands-on testing). We did not test in production environments, on other operating systems, or under heavy load.
GleamHub's development, AI, and automation consultations cover maintaining systems that use WebSocket and planning dependency updates. Please reach out via our contact form.
References
- GitHub — websockets/ws Security Advisory「Memory exhaustion DoS via unbounded automatic pong responses」(GHSA-37g9-w4hg-h9qr)
- GitHub — websockets/ws "[security] Limit automatically sent pending pongs" (8.x, ace7248)
- GitHub — websockets/ws "[security] Limit automatically sent pending pongs" (7.x, 718c33c)
- GitHub — websockets/ws documentation (doc/ws.md, 8.23.0)
- npm — ws
- npm — engine.io









