websocket-driver CVE-2026-140016: upgrade to 0.9.2
Upgrade the Ruby gem websocket-driver to 0.9.2. Versions before 0.9.0 have a bug in the parser for the old draft-75 / draft-76 WebSocket protocols. An unauthenticated client that opens a draft connection can make the server duplicate a message or crash. GitHub rates it critical (CVSS 9.1). Details and the maintainer’s write-up: GHSA-pf93-24xc-xgxc.
As of 2 December 2026, from the advisory, the gem’s changelog and rubygems.org.
The advisory
| Field | Value |
|---|---|
| Ids | GHSA-pf93-24xc-xgxc · CVE-2026-140016 |
| Severity | critical · CVSS 3.1 9.1 · vector AV:N/AC:L/PR:N/UI:N · integrity and availability high |
| Affected | websocket-driver < 0.9.0 |
| Fixed in | 0.9.0 (16 Nov 2026); advisory published 1 Dec 2026 |
| Where | the draft-75 / draft-76 frame parser, server side |
| Effect | duplicated messages, or a crash, from a brief byte sequence after a draft handshake |
| Mitigation | upgrading; the advisory knows no other |
What 0.9.0 changed
- The parser bug is fixed.
- Draft-75 and draft-76 are off by default. A request without
Sec-WebSocket-Versionnow gets400 Bad Request. Every current browser speaks RFC 6455 (version 13), so most apps lose nothing. To keep the drafts, passallow_drafts: truewhen creating the driver. - 0.9.x needs
websocket-extensions >= 0.2.0(current: 0.3.0). Bundler updates it with the driver.
Go to 0.9.2, not 0.9.0
Two more releases followed by 1 December. 0.9.1 fixes a second advisory published the same day:
| Release | Fixes |
|---|---|
| 0.9.0 · 16 Nov | GHSA-pf93-24xc-xgxc · CVE-2026-140016 · critical 9.1 · < 0.9.0 (this post) |
| 0.9.1 · 26 Nov | GHSA-7c6x-34q5-4g2j · CVE-2026-140015 · high 7.5 · < 0.9.1: memory exhaustion from data buffered after the socket closed |
| 0.9.2 · 1 Dec | max_length enforced on draft input and on the stream reader; data written before start handled for all versions |
A third advisory, GHSA-5qm2-87xf-x3ff (CVE-2026-140011, high 7.5, memory exhaustion from message decompression), spans three gems: websocket-driver 0.5.0 – 0.8.x, websocket-extensions < 0.2.0 and permessage_deflate < 0.2.0. Driver 0.9.2 with extensions ≥ 0.2.0 covers the first two. If your bundle has permessage_deflate, move it to 0.2.0 as well.
Who pulls it in
You rarely list websocket-driver in a Gemfile yourself. It arrives through:
| Gem (current version) | Requirement → can it reach 0.9.2? |
|---|---|
actioncable 8.1.4.1 (Rails) | >= 0.6.1 → yes |
faye-websocket 0.13.1 | >= 0.9.0 → yes (0.12.x: >= 0.8.0, also yes) |
ferrum 0.22.0 (Cuprite) | ~> 0.7 → yes |
mailcatcher 0.11.0 | ~> 0.8.2 → no, blocks the upgrade |
~> 0.8.2 means “at least 0.8.2, below 0.9”. While mailcatcher is in the bundle, Bundler cannot resolve 0.9.x for anything else in it either. Its gemspec on main still pins 0.8.2 (checked 2 December 2026).
mailcatcher: take it out of the Gemfile
mailcatcher’s own README says: “Please don’t put mailcatcher into your Gemfile.” Install it on its own instead, outside the app’s bundle:
gem install mailcatcher
# SMTP on 127.0.0.1:1025
# web UI on 127.0.0.1:1080
mailcatcher
Your app’s bundle can then move to 0.9.2. The standalone mailcatcher still runs the old driver, so keep it on 127.0.0.1 on a development machine and never expose its port.
Check and upgrade
# which version the bundle uses
bundle info websocket-driver
# also permessage_deflate, if used
bundle update --conservative \
websocket-driver websocket-extensions
# expect 0.9.2
bundle info websocket-driver
--conservative updates only the named gems. If Bundler refuses, read the conflict: it names the gem that pins websocket-driver (most often mailcatcher). bundler-audit flags the vulnerable version: bundle audit check --update. The advisory is in ruby-advisory-db.
After deploying, check the running server, not only the lockfile. A long-running process keeps the old gem in memory until it restarts.
Sources: GitHub advisory GHSA-pf93-24xc-xgxc · websocket-driver changelog · 0.9.0 release · gem requirements from rubygems.org · mailcatcher README.