Oriel — AI & technology worth noticing, every day.

How Cloudflare WAF protects against ruby2shell (CVE-2026-132825)

Web page · https://blog.cloudflare.com/ruby2shell-waf-protection

ruby2shell lets attackers corrupt memory in default Rails and Sinatra apps without logging in. Cloudflare WAF blocks it for every customer, including Free plans. Upgrade Ruby now, and use the WAF to cover the gap.

First seen by Oriel on .

AI summary

Cloudflare describes ruby2shell (CVE-2026-132825), a critical Ruby heap overflow, and explains how its WAF rules provide temporary protection while customers patch.

  • Ruby 3.3.13 and earlier, 3.4.0 through 3.4.12, and 4.0.0 through 4.0.9 are affected; fixes are in Ruby 3.3.14, 3.4.13, and 4.0.10.
  • Legacy single-byte encodings mishandle uppercase sharp s characters, allowing a one-byte heap overflow through upcase, swapcase, downcase(:fold), and casecmp?.
  • Default Rails and classic-style Sinatra configurations can process a malicious multipart POST before authentication through Rack's _method override.
  • Cloudflare added blocking rules for ruby2shell and GHSA-87fm-7w84-j2px to Free and paid managed rulesets, including Free-plan customers.
  • The WAF cannot protect direct-origin, internal, email, file, queue, or background-job paths, so Cloudflare recommends upgrading every Ruby runtime and rebuilding containers.

#ruby #cloudflare waf #ruby on rails #memory safety

Generated by gpt-5.6-sol. Check the original for details.

Aliases

SourceExternal IDURL
Cloudflare Blog01M7X91JJQ5CWGQ65DZBAHW4Q9https://blog.cloudflare.com/ruby2shell-waf-protection/ Read discussion