⚠️

Disclaimer & Liability

The content provided on this website is for educational, research, and security awareness purposes only. Any unauthorized, illegal, or abusive use of the information, tools, and techniques discussed is solely the responsibility of the user. The author and publisher assume no liability for any damages, injuries, or consequences resulting from the misuse of this content.

Faye websocket-driver vulnerabilities expose WebSocket servers to message duplication and crashes | Alireza Bolbolabadi - Red Team Security
LOADING

Faye websocket-driver vulnerabilities expose WebSocket servers to message duplication and crashes

Executive summary

Faye’s websocket-driver family contains three remotely triggerable vulnerabilities affecting WebSocket protocol handling in Node.js and Ruby applications. Two address essentially the same flaw in different implementations, while a third involves unsafe pong-payload handling in the Node.js package.

The most severe issues are CVE-2026-140004 and CVE-2026-140016, both rated CVSS 9.1. A short, crafted sequence sent over a legacy draft75 or draft76 connection can cause an application message to be emitted twice or terminate the server process. CVE-2026-140005, rated CVSS 7.5, can be triggered by a single pong frame whose payload matches an inherited JavaScript object property, crashing Node.js v22 and earlier.

No authentication is required, and the affected endpoints can be reached over the network. However, the supplied intelligence records no known exploitation, no CISA Known Exploited Vulnerabilities listing, and no surfaced public proof of concept. The practical risk therefore depends heavily on deployment configuration, especially whether draft75 or draft76 negotiation remains available.

Vulnerability details

CVE-2026-140004 — websocket-driver-node message parsing flaw

The draft75 and draft76 parsers in websocket-driver-node versions before 0.8.0 can incorrectly handle a short crafted byte sequence. An unauthenticated remote client can send the sequence over a legacy WebSocket connection, resulting in either:

  • a received application message being emitted twice; or

  • termination of the server process through an uncaught exception.

The message-duplication behavior is potentially more consequential than an obvious crash because downstream logic may process the same event twice without producing a clear infrastructure failure. The advisory maps the issue to CWE-248 and CWE-456.

The flaw is fixed in websocket-driver-node 0.8.0.

CVE-2026-140016 — websocket-driver-ruby message parsing flaw

CVE-2026-140016 mirrors the draft parser weakness in the Ruby implementation. websocket-driver-ruby versions before 0.9.0 can mishandle a short crafted sequence received through a draft75 or draft76 connection. The result can be a duplicated application message or a server crash.

Version 0.9.0 contains the fix and changes the library’s default behavior: draft protocols are disabled unless an application explicitly enables them with allow_drafts: true. This reduces exposure for upgraded deployments that do not require legacy WebSocket negotiation.

The advisory maps the issue to CWE-248 and CWE-456.

CVE-2026-140005 — websocket-driver-node pong handling flaw

Versions of websocket-driver-node before 0.8.0 use pong payload strings as property names when looking up registered ping callbacks in a conventional JavaScript object. That lookup can reach inherited properties such as proto, hasOwnProperty, constructor, valueOf, or toString even when no corresponding callback was registered.

A remote, unauthenticated peer can trigger the issue with one pong frame containing a matching payload. The driver may then invoke a non-callback value or an unbound built-in method, producing an uncaught TypeError and crashing the process on Node.js v22 and earlier.

The issue is associated with CWE-248 and CWE-754 and is fixed in websocket-driver-node 0.8.0.

Affected systems

| CVE | Product | Affected versions | Fixed version | Trigger |

|---|---|---|---|---|

| CVE-2026-140004 | Faye websocket-driver-node | Before 0.8.0 | 0.8.0 | Short crafted sequence over draft75 or draft76 |

| CVE-2026-140005 | Faye websocket-driver-node | Before 0.8.0 | 0.8.0 | Crafted pong payload |

| CVE-2026-140016 | Faye websocket-driver-ruby | Before 0.9.0 | 0.9.0 | Short crafted sequence over draft75 or draft76 |

The vulnerabilities affect websocket-driver instances that process WebSocket traffic. The Node.js pong-handling issue is reported to crash processes running Node.js v22 and earlier. Direct and transitive dependencies should both be examined, including dependency trees that introduce websocket-driver through another package.

Attack conditions

All three vulnerabilities are network-reachable and require no credentials. The attacker needs an open WebSocket connection but no elevated application privileges.

For CVE-2026-140004 and CVE-2026-140016, the vulnerable parser path must be reachable through draft75 or draft76 negotiation. Most modern deployments use RFC-6455, so those legacy paths are often dormant. Risk rises when a service explicitly accepts drafts, permits protocol fallback, or exposes draft negotiation through an intermediary.

For CVE-2026-140005, the attacker needs only to send a crafted pong frame. The reported runtime impact is strongest on Node.js v22 and earlier.

Mitigation

Required remediation

  1. Upgrade websocket-driver-node to version 0.8.0 or later. This addresses both CVE-2026-140004 and CVE-2026-140005.

  1. Upgrade websocket-driver-ruby to version 0.9.0 or later. This addresses CVE-2026-140016.

  1. Regenerate dependency lockfiles, verify the resolved versions, and redeploy affected services.

Configuration hardening

  • Require RFC-6455 at the application or reverse-proxy layer where legacy draft support is unnecessary.

  • For websocket-driver-ruby 0.9.0 or later, leave draft protocols disabled by default. Enable allow_drafts: true only where an explicit legacy compatibility requirement exists.

  • Restrict WebSocket endpoint access through suitable network and origin controls to reduce the set of reachable peers.

Temporary application-level controls

Where an immediate library upgrade is not possible, rejecting draft75 and draft76 negotiation can block the vulnerable parser paths. For CVE-2026-140005, application or gateway controls that reject pong payloads matching inherited property names may reduce the trivial trigger path. These controls are defense-in-depth measures and do not replace upgrading websocket-driver-node.

Detection and incident review

For the draft parser flaws, look for:

  • uncaught exceptions associated with draft75 or draft76 frame parsing;

  • unexpected process restarts or core dumps;

  • duplicate application events or repeated message identifiers;

  • anomalous business transactions caused by the same event being handled twice.

For CVE-2026-140005, investigate Node.js TypeError stack traces associated with pong handling and suspicious pong payloads. Payload logging should follow applicable privacy and data-handling policies.

Reverse proxies and intrusion-detection systems can flag draft75 or draft76 upgrade attempts against services that are intended to accept only RFC-6455. Dependency inventories, SBOMs, and vulnerability dashboards should include all three CVE identifiers and record the verified resolved versions.

Expert insight

The severity ratings reflect the potential consequences of a successful trigger, but they do not fully describe environmental risk. The 9.1 scores are attached to flaws that can produce either process termination or duplicated application messages through unauthenticated network input. In the supplied evidence, however, there is no record of exploitation in the wild, no CISA KEV listing, and no surfaced public proof of concept.

The key exposure question is therefore not simply whether websocket-driver appears in a dependency manifest. It is whether the relevant code path is operational. Draft parser vulnerabilities depend heavily on legacy protocol support, while the Node.js pong flaw remains relevant wherever the package processes untrusted WebSocket peers.

The message-duplication primitive deserves particular attention during incident review. A crash is visible and often prompts rapid response; duplicated events may silently affect queues, accounting, authentication workflows, or state machines. Fix deployment first, then assess whether historical logs contain evidence of repeated message processing.

References

·
← News