CVE-2026-140001: websocket-driver Memory Exhaustion Triggered By Buffering Vulnerability

HIGH
Advisory Identifier: GHSA-7487-9gcw-9w8w
CVSS 7.5
CWE-400 CWE-770
Published
Advisory Summary

CVE-2026-140001 is a HIGH (CVSS 7.5) memory exhaustion triggered by buffering vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting websocket-driver libraries in the npm ecosystem. The issue involves memory exhaustion triggered by buffering of zero-length fragmented frames. Remediation is available by upgrading affected packages to version 0.8.1.

CVE-2026-140001 at a Glance

CVE Identifier CVE-2026-140001
GHSA Identifier GHSA-7487-9gcw-9w8w
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product websocket-driver
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-140001

To remediate this vulnerability, upgrade all affected websocket-driver dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

websocket-driver fixed: 0.8.1
npm install websocket-driver@0.8.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls websocket-driver

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-140001, inspect your project dependencies using npm:

npm ls websocket-driver

Analyze the terminal output to locate any version of websocket-driver in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.1), your application is affected.

Note: The npm ls websocket-driver command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In websocket-driver, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary A server accepting WebSocket connections using `websocket-driver` can be made to run out of memory by a client sending an indefinite stream of zero-length fragmented message frames. ### Details The WebSocket protocol allows messages to be delivered as a series of "fragment" frames. `websocket-driver` buffers all the individual fragments it receives and then concatenates them all when the final fragment is received. By sending a stream of zero-length fragment frames, a client can make the driver store a growing array of zero-length `Buffer` objects in memory, eventually causing it to run out of heap space. This has been mitigated by discarding zero-length fragments when buffering, and by concatenating all received buffers when the number received reaches a certain amount, specifically 1,000,000. websocket-driver does not concatenate buffers on every received frame as this would result in O(n²) time to process a series of frame fragments, as all the data received so far would need to be copied for each new fragment. websocket-driver now compacts the buffer _only if it hits a certain size_ to avoid the buffer array becoming too large. ### Impact A WebSocket server can be made to run out of memory and crash by an unauthenticated remote attacker opening a single connection and sending an indefinite stream of message fragments over it.

CVE-2026-140001 Affected websocket-driver Versions

1 component(s)
Fixed Versions:
0.8.1
Product / Package Ecosystem Affected Versions Fixed Version
websocket-driver
npm
< 0.8.1
0.8.1

References

Frequently Asked Questions

What is CVE-2026-140001?
CVE-2026-140001 is a security vulnerability in websocket-driver involving Memory exhaustion triggered by buffering of zero-length fragmented frames under CWE-400: Uncontrolled Resource Consumption.
Which websocket-driver versions are affected?
Affected versions include releases prior to 0.8.1 across affected packages: websocket-driver.
What version fixes CVE-2026-140001?
Upgrading to 0.8.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is websocket-driver affected?
Yes, websocket-driver is affected in releases prior to 0.8.1. Upgrade your dependency to 0.8.1 or later.
What is the CVSS score of CVE-2026-140001?
CVE-2026-140001 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-140001?
CVE-2026-140001 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for CVE-2026-140001?
Run the dependency tree command: 'npm ls websocket-driver'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7487-9gcw-9w8w",
  "modified" : "2026-12-01T19:12:33Z",
  "published" : "2026-12-01T19:12:33Z",
  "aliases" : [ "CVE-2026-140001" ],
  "summary" : "websocket-driver: Memory exhaustion triggered by buffering of zero-length fragmented frames",
  "details" : "### Summary\n\nA server accepting WebSocket connections using `websocket-driver` can be made to run out of memory by a client sending an indefinite stream of zero-length fragmented message frames.\n\n### Details\n\nThe WebSocket protocol allows messages to be delivered as a series of \"fragment\" frames. `websocket-driver` buffers all the individual fragments it receives and then concatenates them all when the final fragment is received. By sending a stream of zero-length fragment frames, a client can make the driver store a growing array of zero-length `Buffer` objects in memory, eventually causing it to run out of heap space.\n\nThis has been mitigated by discarding zero-length fragments when buffering, and by concatenating all received buffers when the number received reaches a certain amount, specifically 1,000,000. websocket-driver does not concatenate buffers on every received frame as this would result in O(n²) time to process a series of frame fragments, as all the data received so far would need to be copied for each new fragment. websocket-driver now compacts the buffer _only if it hits a certain size_ to avoid the buffer array becoming too large.\n\n### Impact\n\nA WebSocket server can be made to run out of memory and crash by an unauthenticated remote attacker opening a single connection and sending an indefinite stream of message fragments over it.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "websocket-driver"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.8.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/faye/websocket-driver-node/security/advisories/GHSA-7487-9gcw-9w8w"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-140001"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/faye/websocket-driver-node/commit/b1dc2c7d70965bff9349351b856168eeec63b280"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/faye/websocket-driver-node"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-770" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-12-01T19:12:33Z",
    "nvd_published_at" : "2026-11-30T22:17:29Z"
  }
}