Summary: On November 19, 2026, the Ruby team disclosed ruby2shell (CVE-2026-132825), a Critical-rated heap buffer overflow in Ruby’s string case conversion, and Cloudflare shipped managed WAF rules the next day that block the known exploit path for every customer, Free plan included. The rules only cover traffic that passes through Cloudflare, so upgrading Ruby remains the complete fix.
How one byte breaks the heap
Ruby strings carry an encoding, and Ruby still supports legacy single-byte encodings such as ISO-8859-1 and Windows-1252 alongside UTF-8. In those encodings, changing case normally produces output of the same length. The German sharp s (ß) breaks that: its uppercase form is the two characters SS. According to the Cloudflare post, in 14 ISO-8859 and Windows-125x encodings Ruby writes those two bytes but checks for room for only one, and Veria Labs found that a string of 21 sharp s characters overflows the output buffer by one byte. The affected methods are upcase, swapcase, downcase(:fold) and casecmp?. UTF-8 strings take a different code path and are not affected.
A single byte past a heap buffer sounds harmless, but it can corrupt an adjacent object or allocator metadata. Ruby says it is aware of proofs of concept that turn this into remote code execution in some scenarios, and Veria Labs plans to publish its own proof of concept about a week after disclosure.
Why default Rails and Sinatra apps are reachable pre-auth
HTML forms can only send GET and POST, so many frameworks accept a _method parameter in a POST to simulate PUT, PATCH or DELETE. Rack’s MethodOverride middleware upcases that value. Rails includes the middleware by default and classic-style Sinatra applications enable it, so an attacker can send a multipart POST whose _method part declares a legacy character set and carries a run of sharp s characters — and the framework upcases it while routing, before any application code or authentication check runs.
Veria Labs reports other frameworks and plain Rack apps are not exposed by default. Any code that case-converts attacker-controlled strings in a legacy encoding is still at risk, whatever the entry point.
What Cloudflare shipped, and who got it
Two rules went into both the Cloudflare Free Managed Ruleset and the Cloudflare Managed Ruleset (Ruleset ID efb7b8c949ac4650a09736fc376e9aee), with Block as the default action: one for CVE-2026-132825 and one for GHSA-87fm-7w84-j2px, a related integer overflow in the same code fixed in the same releases. On the Free plan the ruleset runs automatically, nothing to enable. On paid plans the managed ruleset may not be active on every zone, so Cloudflare recommends checking its deployment status. For defense in depth, Enterprise customers can block requests with cf.waf.score.rce le 20 and Business customers with cf.waf.score.class eq “attack” via WAF attack score.
For another example of this emergency-rules pattern, see Cloudflare WAF Java4Shell Rules Ship in Log Mode.
Who is exposed beyond your own code
Affected versions are Ruby 3.3.13 and earlier, 3.4.0 through 3.4.12, and 4.0.0 through 4.0.9. Veria Labs reports the bug has existed since Ruby 2.4.0, and Ruby 3.2 and earlier are end of life with no fix coming. As of November 19, 2026, Veria Labs lists GitLab 19.6.0, GitHub Enterprise Server 3.22.5, Mastodon 4.7.5, OpenProject 17.9.7, Discourse 2026.10.1 and Chatwoot 4.20.0 as bundling an affected Ruby in their latest releases. Discourse moved its Docker base image to Ruby 4.0.10 on November 19, so rebuilding a Docker install picks up the fix. Note that distribution packages can backport fixes without changing the Ruby version number — check your distribution’s advisory.
The same releases also fix six other memory safety flaws, several of which Ruby says can lead to code execution. Five are in the regular expression engine and mostly need the app to compile or match an attacker-supplied pattern — uncommon in web apps, but it happens in search and admin features.
What the WAF cannot see
Cloudflare itself calls the WAF a compensating control, not a replacement for patching. It cannot see requests sent directly to your origin IP, traffic between internal services, or non-HTTP entry points: Ruby code that case-converts strings from email, file imports, message queues or background jobs reaches the same bug without an HTTP request ever crossing the WAF. Cloudflare says it has patched its own Ruby systems and found no indication of compromise.
Our take: Treat this as same-day patching if Ruby exists anywhere in your stack, including bundled tools and container images — don’t lean on the WAF alone. The reasoning: the exploit path in default Rails and Sinatra is unauthenticated, Ruby already holds working proof-of-concept code, and a public PoC lands within roughly a week of the November 19 disclosure — that assumption of reliable RCE is what drives the urgency. The announcement’s own patch advice is right, and we would emphasize two things it understates: background workers run the same vulnerable Ruby even when the WAF guards your front door, and upgrading is a cheap, reversible afternoon of work for a small team. Shops with no Ruby anywhere can ignore this entirely. If the public PoC ships without reliable code execution, or your attacker-facing strings are all UTF-8, a routine patch cycle is a defensible pace.
