ws memory exhaustion DoS in WebSocket pong replies
Affects the ws npm package below 5.2.8, from 6.0.0 to below 6.2.7, from 7.0.0 to below 7.5.14, and from 8.0.0 to below 8.23.0. Fixed in 5.2.8, 6.2.7, 7.5.14, and 8.23.0.
- Exploited
- No known exploitation
- Fix
- Fixed in 5.2.8, 6.2.7, 7.5.14, 8.23.0
- Who is exposed
- Not reported
Summary
The ws WebSocket library for Node.js can be made to run out of memory by a remote, unauthenticated peer that sends many Ping frames while refusing to read responses, which can crash the application. The flaw comes from automatic Pong replies that are queued without any limit.
Written by a model
Original description
ws is an open source WebSocket client and server for Node.js. Prior to 5.2.8, 6.2.7, 7.5.14, and 8.23.0, a malicious WebSocket peer can send Ping frames while stopping reads, causing ws to generate and buffer automatic Pong responses without a pending-response bound. The queued Pong frames can exhaust process memory and terminate the application; disabling autoPong where available or combining rate limiting with heartbeats mitigates the issue. This issue is fixed in versions 5.2.8, 6.2.7, 7.5.14, and 8.23.0.
Who should check
Teams running Node.js services or clients that use the ws npm package (WebSocket client and server) in affected 5.x, 6.x, 7.x or 8.x versions.
“< 5.2.8, >= 6.0.0 < 6.2.7, >= 7.0.0 < 7.5.14, >= 8.0.0 < 8.23.0”
What to do
Upgrade to a fixed version: 5.2.8, 6.2.7, 7.5.14, 8.23.0.
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by CVE-2026-140009 (ws: Memory exhaustion DoS via unbounded automatic pong responses), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-140009 (entry last updated 2026-11-30):
Affected:
- websockets ws: fixed in 5.2.8; from 6.0.0, fixed in 6.2.7; from 7.0.0, fixed in 7.5.14; from 8.0.0, fixed in 8.23.0
Fixed versions: 5.2.8, 6.2.7, 7.5.14, 8.23.0.
Conditions (all must be true for the bug to be hit):
- Uses the ws npm package in an affected version range: below 5.2.8, 6.0.0 to below 6.2.7, 7.0.0 to below 7.5.14, or 8.0.0 to below 8.23.0. (source: https://github.com/websockets/ws/security/advisories/GHSA-37g9-w4hg-h9qr)
- A connected peer floods the ws endpoint with Ping frames while that endpoint has stopped reading from the socket. (source: https://github.com/websockets/ws/security/advisories/GHSA-37g9-w4hg-h9qr)
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
Attacker needs: network access, no login, no user action.
CISA KEV: CVE-2026-140009 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-140009 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.
Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/websockets/ws/security/advisories/GHSA-37g9-w4hg-h9qr
- https://github.com/websockets/ws/commit/560e071478550f1227271b09993caff97753f1a1
- https://github.com/websockets/ws/commit/718c33c8e1ca09a01403eaddea9119b02a63ccfe
- https://github.com/websockets/ws/commit/8a10a6ad25b04b6a02c56d7237792b7e4ade12b7
- https://github.com/websockets/ws/commit/ace7248f685b10a87eff882e66c5b37fbee03d63
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-140009
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-140009"}.Affected versions
- websockets wsfixed in 5.2.8; From 6.0.0 · fixed in 6.2.7; From 7.0.0 · fixed in 7.5.14; From 8.0.0 · fixed in 8.23.0
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure17/25No login or user action needed, reachable over the network without a login · Unknown: Advisories don't say whether default setups are affected
- Reach?/20Unknown. No tracked technology or package matched
- Severity7.5/10CVSS 7.5
- No patch0/5No signal
What would change the score
- Would score about 70 if added to CISA KEV
- Would score about 65 if CISA's SSVC rates exploitation active
- Would score about 30 if advisories confirm default setups are exposed
Timeline
- CVE published
- First seen by cve.now
Evidence 7
| Kind | Source |
|---|---|
| Vendor advisory 1Establishes: Affected and fixed versions. | |
| Advisory | GitHub · websockets/ws · Advisory GHSA-37g9-w4hg-h9qr |
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-140009 |
| Record | NVD · CVE-2026-140009 |
| Other links 4 | |
| Repository | GitHub · websockets/ws · Commit 560e0714 |
| Repository | GitHub · websockets/ws · Commit 718c33c8 |
| Repository | GitHub · websockets/ws · Commit 8a10a6ad |
| Repository | GitHub · websockets/ws · Commit ace7248f |
Questions about CVE-2026-140009
Is CVE-2026-140009 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.
Source: cve.now feed data
What does this mean?
A connected peer can flood a ws endpoint with Ping frames while that endpoint has stopped reading from the socket. ws buffers the automatic Pong replies in memory without a limit, which can exhaust memory and terminate the process due to out-of-memory.
Source: github.com
Which versions are affected by CVE-2026-140009?
ws: before 5.2.8; from 6.0.0 before 6.2.7; from 7.0.0 before 7.5.14; from 8.0.0 before 8.23.0.
Source: cve.now feed data
Am I affected, and how do I check?
The affected ranges are ws below 5.2.8, 6.0.0 to below 6.2.7, 7.0.0 to below 7.5.14, and 8.0.0 to below 8.23.0. To check a project, run npm ls ws to see which ws version is installed.
Source: github.com
How do I fix CVE-2026-140009?
Upgrade ws to the fixed version for its release line: 5.2.8, 6.2.7, 7.5.14, or 8.23.0.
Source: github.com
Related
No corrections so far. Something wrong on this page? Report an error.