THE CRUNCH
Cloudflare has added two managed WAF rules that block ruby2shell (CVE-2026-132825), a critical heap buffer overflow in Ruby's string case-changing code, for every customer including those on the Free plan. The Ruby team disclosed the flaw on 19 November 2026 and shipped fixes in Ruby 3.3.14, 3.4.13 and 4.0.10, saying it knows of proofs of concept that can achieve remote code execution in some situations. A second rule covers GHSA-87fm-7w84-j2px, a related integer overflow in the same code fixed in the same releases.
The bug sits in how Ruby handles legacy single-byte encodings such as ISO-8859-1 and Windows-1252. The German sharp s (ß) uppercases to two characters, SS, and in 14 of those encodings Ruby writes two bytes while checking for room for only one. Veria Labs reports that a string containing 21 sharp s characters pushes one byte past the end of the output buffer, reachable through the upcase, swapcase, downcase(:fold) and casecmp? methods. UTF-8 strings take a different code path and are unaffected.
The reach is unusually wide for a runtime bug. Veria Labs reports that Rails and classic-style Sinatra setups trigger the flaw with their out-of-the-box configuration, before any login check, because Rack's MethodOverride middleware, which Rails enables by default, upcases the _method parameter while routing a request. Veria Labs also found that self-hosted products, among them GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot, were still bundling a vulnerable Ruby in the newest release available when the flaw was announced, though Discourse moved its Docker base image to Ruby 4.0.10 on 19 November.
Cloudflare stresses that its WAF rules are a stopgap rather than a substitute for updating Ruby: attack traffic can reach the flaw along routes a WAF never inspects, and only upgrading Ruby fully closes the hole. The same releases also fix six other memory safety flaws, several of which Ruby says can lead to code execution, mostly in the regular expression engine where an attacker-supplied pattern is compiled or matched.


