Key facts
- The Ruby team disclosed ruby2shell, tracked as CVE-2026-132825, on November 19, 2026.
- Ruby rates the heap buffer overflow in string case conversion as Critical.
- Patched releases are Ruby 3.3.14, 3.4.13, and 4.0.10.
- Veria Labs says default Ruby on Rails and classic-style Sinatra apps reach the flaw before authentication.
The Ruby team disclosed ruby2shell, tracked as CVE-2026-132825, on Nov. 19, 2026, and Cloudflare says its web application firewall blocks the flaw in default Ruby on Rails and Sinatra applications for every customer, including users on the Free plan.
Veria Labs says the flaw sits in Ruby’s string case conversion across 14 ISO-8859 and Windows-125x encodings, because Ruby emits two bytes for an uppercase German sharp s while allocating space for one, and that 21 sharp s characters in a string cause a one-byte output buffer overflow. Cloudflare’s advisory lists affected methods including upcase, swapcase, downcase(:fold) and casecmp?; UTF-8 strings use a separate code path and remain safe.
Default Ruby on Rails and classic-style Sinatra applications reach the flaw before authentication, Veria Labs says, and a multipart POST request whose _method part declares a legacy character set and contains sharp s characters can trigger the overflow through routing. Plain Rack applications and other frameworks avoid default exposure, though custom application code that handles legacy-encoded strings remains at risk. GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot bundled an affected Ruby in their most recent release.
Ruby says the same patched releases also address six additional memory safety flaws, several of which can lead to code execution. Five of those flaws sit in Ruby’s regular expression engine, and most require an app to compile or match attacker-controlled patterns.
It is aware of proofs of concept achieving remote code execution in some scenarios, Ruby says. Veria Labs plans to publish its own proof of concept roughly one week after the Nov. 19 disclosure, and Cloudflare expects scanning activity to begin soon after a public proof of concept surfaces.
Cloudflare’s WAF blocks ruby2shell through two new rules set to Block by default in managed ruleset efb7b8c949ac4650a09736fc376e9aee, and the rules also target GHSA-87fm-7w84-j2px, an integer overflow in Ruby’s string case conversion fixed in the same updates. Cloudflare calls the WAF a compensating control rather than a substitute for patching. Some exploit paths never reach it: requests to an origin IP, traffic between internal services, and case conversion in background jobs, message queues, file imports or e-mail.
After updating its own Ruby-using systems, Cloudflare found no sign of compromise. Cyberoly reports that software distributors have started releasing updates or backporting fixes for the vulnerability as of Nov. 20, 2026.
Administrators should upgrade Ruby to 3.3.14, 3.4.13 or 4.0.10 and restart every Ruby process, including background jobs, Cloudflare says. Cloudflare’s Zero Wire briefing offers an AI-agent prompt for finding every affected Ruby runtime in an organization’s infrastructure.
Container images should be rebuilt and self-hosted products including GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot updated when vendors issue fixes, with Discourse Docker installations rebuilt immediately, Cloudflare says. Applications running Ruby 3.2 or earlier should move to a supported series, and operating-system packages that backport fixes while keeping the Ruby version unchanged must be checked against the relevant distribution advisory.
Free plan customers receive the Cloudflare Free Managed Ruleset automatically, while paid plan customers should confirm the Cloudflare Managed Ruleset is active on their zones, Cloudflare says. Enterprise customers can block or challenge requests using cf.waf.score.rce le 20, and Business customers can use cf.waf.score.class. Cloudflare’s WAF attack score uses machine learning to rate requests carrying remote-code-execution payloads and catches variants signature rules miss, and its team will keep watching attack traffic and revise rules as techniques emerge. Upgrading Ruby remains the sole complete remediation.

Join the discussion