High impactSecurityPatch available

websocket-driver CVE-2026-140003: one request crashes Node, fix changes defaults

A pre-RFC handshake parser in websocket-driver lets one unauthenticated request kill a Node.js process; 0.8.0 fixes it but switches legacy draft support off by default.

Khalid Aboubakr Engineering DeskPublished

Automated engineering analysis by the Khalid Aboubakr Engineering Desk, from the primary sources listed below. Not reviewed by a person before publication. About the desk

Bottom line

websocket-driver below 0.8.0 can be crashed by a single unauthenticated draft76 handshake (CVE-2026-140003, CVSS 7.5); a fixed version, 0.8.0, is available. Any public-facing Node.js service that accepts WebSocket upgrades through this package, including as a transitive dependency, is exposed on Node.js v22 and below; behaviour on newer runtimes is not stated in the sources. Upgrade to 0.8.0 or later, and leave allowDrafts off unless a real legacy client needs it.

What happened

A denial-of-service flaw in the npm package websocket-driver (maintained in faye/websocket-driver-node) is tracked as CVE-2026-140003 and GHSA-c4gv-fww2-jp3r. All versions before 0.8.0 are affected; 0.8.0 is the first patched release.

The library still supports the pre-RFC draft75 and draft76 WebSocket handshakes. In the draft76 parser, values derived from the Sec-WebSocket-Key1 and Sec-WebSocket-Key2 headers are written into a buffer as unsigned 32-bit integers. A value larger than 32 bits throws a Buffer range exception that is not caught (CWE-248), and the process crashes. The sources state this crash occurs on Node.js v22 and below.

According to the GitHub advisory, an unauthenticated remote client can trigger the crash with a single HTTP request. The CVE record carries a CVSS 3.1 base score of 7.5 (High), with network attack vector, low complexity, no privileges and availability-only impact. The NVD record shows the same 7.5 score and is in "Received" status.

The fix rejects oversized values and disables draft protocol support by default. Servers that still need draft versions must pass allowDrafts: true when creating a driver instance, per the maintainer advisory. The public advisory includes proof-of-concept material, so the trigger conditions are publicly documented.

Dates differ across sources: the maintainer advisory shows Nov 17, 2026, the CVE record was published 2026-11-30, and the GitHub Advisory Database entry is dated Dec 1, 2026.

Why it matters

This is an availability bug, not a data-exposure bug, but its shape is unfavourable: no authentication, one request, and the whole Node.js process goes down — not just the offending connection. Every other request that process was serving dies with it.

The less obvious point is reach. As a protocol handler with pluggable input and output, websocket-driver may arrive as a transitive dependency of another library; the evidence does not say which ones. That means each team has to check its own lockfile rather than rely on a list of affected products.

The second point is that the patch is a behaviour change. Version 0.8.0 does not only fix the overflow; it turns draft75/draft76 support off by default. Modern clients are expected to use the standardised protocol, but any that still use the drafts will stop connecting after the upgrade.

Engineering assessment

Our assessment: treat this as a prompt-patch item for any internet-facing Node.js service that accepts WebSocket upgrades through websocket-driver. The 7.5 score is fair for availability. The real-world severity depends on your process model: a single-process service without a supervisor is fully down until someone restarts it; a clustered or containerised deployment with automatic restarts degrades instead of failing — but a repeated trigger can keep workers in a crash loop and drop every in-flight connection each time.

The "Node.js v22 and below" wording should not be read as an all-clear for newer runtimes. The sources do not say what happens on later versions — whether the exception is no longer thrown, or the case was simply not tested. Until that is clarified, the runtime version is not a reason to defer the dependency upgrade.

The main migration risk is the new default, not the fix. Upgrading to 0.8.0 will stop accepting draft75/draft76 clients unless allowDrafts: true is set. For most teams this should be a hardening win with no visible effect. For teams with old embedded devices, kiosks or legacy browser clients, it could look like an outage. Find out before you deploy, not after.

Do not reach for allowDrafts: true reflexively. The advisory says the parser now rejects oversized values, which should close this specific crash even with drafts enabled. But the opt-in deliberately re-enables a legacy, pre-standard code path that was the source of this bug, and the evidence does not describe any further hardening of it. Enable it only where a known client requires it, and plan to retire it.

The practical difficulty is likely to be transitive pinning. Under npm's semver rules for 0.x packages, a caret range on an older minor version does not move to 0.8.0 by itself. A plain npm update may therefore leave the vulnerable copy in place until the intermediate package publishes a release, or until you force the resolution yourself. (Not vendor guidance: this is general npm behaviour, not something the advisory states.)

Is this you?

  • npm ls websocket-driver (or the equivalent in your package manager) shows any version below 0.8.0 in a deployed service.
  • That service accepts WebSocket upgrade requests from untrusted networks, directly or behind a proxy that passes upgrade headers through.
  • The service runs on Node.js v22 or below — the condition the advisory states. Newer runtimes are unconfirmed, not cleared.
  • You run a single process or have weak restart supervision, so one crash means a user-visible outage.
  • You have legacy clients that may still use draft75/draft76 handshakes: these are the clients the upgrade can break.

What to do

  1. Inventory now. Run npm ls websocket-driver --all and npm explain websocket-driver in each service, and check lockfiles in CI and container images, not just developer machines.
  2. Upgrade to websocket-driver 0.8.0 or later. If it is a direct dependency, bump it. If it is transitive, first check whether the parent package has a release that pulls in 0.8.0. If it does not, force the resolution with npm overrides, Yarn resolutions or pnpm overrides, then re-run npm ls websocket-driver to confirm only patched copies remain. (Not vendor guidance: the forced-resolution route is general npm practice and needs regression testing of the parent package.)
  3. Test the default change. In staging, confirm your current clients still complete the WebSocket handshake after the upgrade. Pay particular attention to old devices or embedded browsers.
  4. Keep allowDrafts off. Pass allowDrafts: true only if a specific, identified client needs draft protocols. Record that decision with an owner and a retirement date.
  5. Reduce blast radius while you roll out. (Not vendor guidance.) Make sure crashed processes restart automatically and alert on restart frequency. Where your edge proxy or WAF allows it, consider dropping upgrade requests that carry Sec-WebSocket-Key1/Sec-WebSocket-Key2 headers if you have confirmed that no legitimate clients use draft76.
  6. Technical leads: add this package to dependency-audit gates so that any copy below 0.8.0 fails the build.

What we don't know yet

  • Whether the crash occurs on Node.js versions newer than v22; the sources only say "v22 and below".
  • Whether enabling allowDrafts: true on 0.8.0 leaves any residual risk in the legacy parser beyond the oversized-value check.
  • Which widely used frameworks and packages depend on websocket-driver, and which of their releases pull in 0.8.0.
  • Whether there are any reports of exploitation; the evidence contains no KEV entry or vendor statement either way.
  • The exact disclosure timeline, given the differing dates across sources, and whether NVD will complete its own analysis beyond "Received" status.

The desk will follow up on downstream package releases and on any clarification about newer Node.js versions. More coverage is in Engineering Desk news.

Sources

Latest engineering analysis