Ruby2shell (CVE-2026-132825): Cloudflare blocks flaw via WAF, but Ruby needs patching
Critical Ruby flaw (CVE-2026-132825) reachable without authentication in Rails and Sinatra. Cloudflare activates WAF rules, but the patch remains Ruby 3.3.14/3.4.13/4.0.10.
UptimeMag editorial team · 20 November 2026 · 3 min read

Ruby has a critical flaw that can be exploited without authentication in a freshly installed Rails or Sinatra application. Cloudflare published a post on 20 November 2026 explaining how its WAF blocks it by default across all plans, including Free. Anyone running VPS or dedicated servers with Ruby applications still needs to update the interpreter: the WAF is a workaround, not a patch.
The bug in brief
CVE-2026-132825, dubbed ruby2shell by the community, is a one-byte heap buffer overflow in string case conversion. The output buffer receives a 20-byte margin, so a string with 21 ß characters causes it to overflow by one byte. The culprit is the German ß character, whose uppercase version (SS) occupies two bytes in 14 legacy single-byte encodings such as ISO-8859-1 and Windows-1252; the code allocates space for only one byte. The methods that trigger the bug are upcase, swapcase, downcase with the fold option, and casecmp?.
The official score is not uniform: Ruby classifies it as Critical, but the published CVE record shows a CVSS 3.1 score of 7.4, High, reflecting a more restrictive exploitability assessment.
Why Rails and Sinatra are exposed by default
Rack::MethodOverride calls upcase on the method field of POST forms, and Rails includes that middleware in its default stack, whilst Sinatra in classic style enables method override. A simple multipart POST with a _method field declaring a legacy charset and containing a sequence of ß characters triggers the conversion before authentication even starts.
Who is affected
| Product | Version with vulnerable Ruby |
|---|---|
| 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 |
Ruby released the patched versions on 18 November 2026: 3.3.14, 3.4.13 and 4.0.10. Users running Ruby 3.2 or earlier will not receive a patch, as those branches are end of life: migration to a supported series is the only option.
What Cloudflare's WAF does (and doesn't do)
Cloudflare has added two rules with Block action by default in both the Cloudflare Free Managed Ruleset and the Cloudflare Managed Ruleset (ruleset ID efb7b8c949ac4650a09736fc376e9aee): one for ruby2shell, one for the related flaw GHSA-87fm-7w84-j2px. On the Free plan the ruleset runs automatically; on paid plans you should verify that the Managed Ruleset is actually active on your zone, as it may not be everywhere.
However, the WAF cannot see traffic that bypasses Cloudflare, direct requests to the origin IP, and paths coming from email, file imports, code queues or background jobs: for those, upgrading the interpreter is the only protection.
What to do now
- Update Ruby to 3.3.14, 3.4.13 or 4.0.10 and restart every process, including background workers.
- Rebuild container images that pin an earlier version.
- Update self-hosted products as soon as the vendor releases the correct build; Discourse already moved its Docker base image to Ruby 4.0.10 on 19 November.
- On the Free plan verify that the rules are active; on Pro, Business and Enterprise check the Managed Ruleset status in the dashboard.
As of 20 November 2026, no active exploitation has been reported and the flaw does not appear in the CISA KEV catalogue, but Veria Labs has announced a public proof of concept within around ten days of disclosure: the patching window is tight.
Written with the help of artificial intelligence and checked by the editors (EU AI Act, art. 50).