Cloudflare WAF Blocks Ruby ruby2shell (CVE-2026-132825) by Default on All Plans, Including Free; Upgrading to 3.3.14, 3.4.13 or 4.0.10 Is Still Required

Cloudflare says it has added two default-Block WAF rules protecting against the critical Ruby vulnerability ruby2shell, covering Free through Enterprise plans; it stresses the WAF is only a compensating control and Ruby must still be upgraded.

News date: About 6 min read

Contents
  1. 1. What is ruby2shell, and which systems are affected?
  2. 2. What does Cloudflare WAF cover, and how do plans differ?
  3. 3. What should you do now, and how can you reduce risk before upgrading?

In a blog post dated November 20, 2026, Cloudflare says the Ruby team disclosed ruby2shell (CVE-2026-132825) on November 19. The Cloudflare WAF (web application firewall, which filters malicious traffic before requests reach your server) now blocks related attack requests by default for all customers. The rules are live: they run automatically on the Free plan, while paid plans need to confirm the ruleset is deployed. For teams running Rails, Sinatra, or self-hosted products that bundle Ruby, such as GitLab, this reduces exposure during the upgrade but does not replace patching.

What is ruby2shell, and which systems are affected?

Cloudflare explains that ruby2shell is a heap buffer overflow in Ruby's string case conversion, meaning the program writes more data than the memory it allocated can hold. Ruby supports many legacy single-byte encodings (one byte per character). The German ß becomes two characters, SS, when uppercased. In 14 ISO-8859 and Windows-125x encodings, Ruby writes two bytes but checks for space for only one. Veria Labs notes that a string containing 21 instances of ß is enough to overflow the buffer by one byte. UTF-8 strings take a different code path and are not affected.

The methods that can reach the bug include upcase, swapcase, downcase(:fold) and casecmp?. Ruby says it is aware of proofs of concept (demonstration programs showing the attack works) that achieve remote code execution in some scenarios. Veria Labs says it will publish its own proof of concept about a week after disclosure, and Cloudflare expects scanning to start soon afterward.

Cloudflare says Rack's MethodOverride middleware uppercases the _method parameter. Rails includes this middleware by default and classic-style Sinatra enables it, so the framework may handle the relevant strings during routing, before any authentication check. Veria Labs says other frameworks and plain Rack applications are not affected by default, but any application code that changes the case of strings in legacy encodings may still be affected.

Summary of ruby2shell impact (per Cloudflare's citation of Ruby and Veria Labs)
ItemWhat Cloudflare says
Affected Ruby versions3.3.13 and earlier, 3.4.0 through 3.4.12, 4.0.0 through 4.0.9; Veria Labs says it has existed since 2.4.0
Fixed versionsRuby 3.3.14, 3.4.13, 4.0.10
End of lifeRuby 3.2 and earlier will not receive a patch
Frameworks exposed by defaultRails, classic-style Sinatra (per Veria Labs)
Products bundling an affected Ruby (as of November 19)GitLab 19.6.0, GitHub Enterprise Server 3.22.5, Mastodon 4.7.5, OpenProject 17.9.7, Discourse 2026.10.1, Chatwoot 4.20.0

What does Cloudflare WAF cover, and how do plans differ?

Cloudflare says it has added two rules each to the Cloudflare Free Managed Ruleset and the Cloudflare Managed Ruleset (the managed rulesets maintained by Cloudflare), both with a default action of Block. One targets ruby2shell, and the other targets the related integer overflow GHSA-87fm-7w84-j2px, which was fixed in the same set of releases.

Rule deployment differences as described by Cloudflare
PlanRulesetManual enablement needed?
FreeCloudflare Free Managed RulesetNo, runs automatically
Pro, Business, EnterpriseCloudflare Managed RulesetThe rules take effect where the ruleset is deployed, but it may not be enabled on every zone (a domain configuration in Cloudflare); Cloudflare recommends checking the status

What should you do now, and how can you reduce risk before upgrading?

  1. Confirm WAF coverage: the Free plan rules already block automatically; on paid plans, confirm the Cloudflare Managed Ruleset is deployed and the rules have not been overridden.
  2. Upgrade Ruby to 3.3.14, 3.4.13 or 4.0.10, restart all Ruby processes (including background workers), and rebuild container images; applications still on Ruby 3.2 or earlier need to move to a supported series.
  3. For self-hosted products that bundle Ruby, update once each vendor releases a fix; Discourse has switched to a Docker base image with Ruby 4.0.10, so rebuilding a Docker installation picks up the fix.
  4. Inventory every Ruby runtime in your infrastructure; distribution packages may backport fixes without changing the version number, so check the full package version against the distribution's advisory.

For defense in depth (multiple layers of protection), Cloudflare recommends using the WAF attack score. Enterprise plans can create a custom rule to block or challenge requests matching cf.waf.score.rce le 20, while Business plans use cf.waf.score.class eq "attack". Cloudflare also recommends having origin servers accept only traffic from Cloudflare, for example using Cloudflare Tunnel or Authenticated Origin Pulls.

The same Ruby releases also fix six other memory-safety vulnerabilities, several of which Ruby says could lead to code execution. Apart from GHSA-87fm-7w84-j2px, the other five are in the regular expression engine and mostly require an application to process attacker-supplied patterns to be triggered.

Frequently asked questions

Do Free plan sites need to enable the protection themselves?

According to Cloudflare, the Cloudflare Free Managed Ruleset on the Free plan runs automatically, and no configuration is needed.

Do I still need to upgrade Ruby if Cloudflare WAF is enabled?

Yes. Cloudflare calls the WAF a compensating control, and attacks may reach the vulnerability through paths the WAF cannot see. The only complete fix is upgrading Ruby.

Are applications using UTF-8 strings affected?

According to Cloudflare, UTF-8 strings take a different code path and are not affected by this vulnerability; the affected strings are those in specific legacy single-byte encodings.

Were Cloudflare's own systems affected?

Cloudflare says it has patched its own systems that use Ruby, has found no sign of compromise, and will keep monitoring.

Browse the latest news in this topic

Found this guide helpful? Share it with someone who needs it

Sources

Compiled from the references and verification dates listed above; fares, schedules, product features, and terms can change, so please confirm the latest details on the relevant official website before travelling, booking, or purchasing.

Lifestyle