Ruby team discloses critical flaw as Cloudflare enables blocking rules for all customers

  • Ruby
  • Cloudflare
  • ruby2shell
  • web application firewall

The vulnerability can allow remote code execution and affects several Ruby release lines

Fixes are available in Ruby 3.3.14, 3.4.13 and 4.0.10

Cloudflare says its WAF rules do not replace upgrading Ruby

The Ruby team disclosed ruby2shell (CVE-2026-132825) on November 19, 2026, describing a heap buffer overflow in Ruby string case conversion. The vulnerability can enable remote code execution; Cloudflare says its web application firewall (WAF), which filters web traffic, now blocks exploitation attempts for all customers.

The flaw affects Ruby 3.3.13 and earlier, versions 3.4.0 through 3.4.12, and versions 4.0.0 through 4.0.9. Ruby on Rails and classic-style Sinatra applications can reach the vulnerable code in their default configurations, before authentication. The affected string methods are upcase, swapcase, downcase(:fold) and casecmp? when they process legacy single-byte encodings; UTF-8 strings use a different, unaffected code path.

The Ruby team released fixes in versions 3.3.14, 3.4.13 and 4.0.10. Cloudflare says it added two managed WAF rules, with blocking as the default action, to cover ruby2shell and a related integer overflow, GHSA-87fm-7w84-j2px. The rules are available in Cloudflare’s Free Managed Ruleset and Cloudflare Managed Ruleset. The Free plan runs its ruleset automatically; on paid plans, customers must ensure the Cloudflare Managed Ruleset is deployed on the relevant zone.

Cloudflare says the WAF is a temporary protective measure, not a substitute for upgrading Ruby. It only filters requests that pass through Cloudflare, so it cannot cover traffic that bypasses the service or other routes, such as background jobs, that reach vulnerable code. Cloudflare says it has patched its own Ruby systems and has found no indication of compromise.