
Cloudflare WAF Blocks Ruby Heap Overflow Vulnerability CVE-2026-132825 Across All Plans
Cloudflare has deployed managed rules to block the critical ruby2shell vulnerability affecting Ruby string case conversion. The flaw exposes default Rails and Sinatra applications to remote code execution before authentication, which Ruby says its proofs of concept achieve only in some scenarios.
Cloudflare has added two managed rules that block the ruby2shell vulnerability (CVE-2026-132825) for all customers, including those on the Free plan. The rules give organisations that cannot upgrade Ruby straight away a way to block exploits of the critical heap buffer overflow before they reach an application; Veria Labs reports that default Rails and classic Sinatra applications reach the bug before any authentication runs.
Technical Details of the Vulnerability
The flaw exists in Ruby's handling of legacy single-byte encodings such as ISO-8859-1 and Windows-1252. When changing the case of strings in these encodings, Ruby writes two bytes for the German sharp s character (ß), which becomes SS in uppercase, but checks for room for only one byte. A string with 21 sharp s characters overflows the output buffer by one byte. The affected methods are upcase, swapcase, downcase(:fold) and casecmp?. UTF-8 strings use a different code path and are not affected. Ruby rates the vulnerability Critical and acknowledges proofs of concept that achieve remote code execution in some scenarios. Fixes shipped in Ruby 3.3.14, 3.4.13 and 4.0.10.
Default Framework Exposure
Rails and classic-style Sinatra applications expose the bug in their default configuration through the _method parameter used to simulate PUT, PATCH or DELETE requests. Rack's MethodOverride middleware converts the _method value to uppercase during request routing before any application code or authentication runs. An attacker can send a multipart POST request with a _method part declaring a legacy character set containing sharp s characters. Veria Labs reports other frameworks and plain Rack applications are not exposed by default, though application code that changes the case of attacker-controlled strings in legacy encodings may still be vulnerable.
Cloudflare WAF Protection and Limitations
Cloudflare added two rules to both the Cloudflare Free Managed Ruleset and the Cloudflare Managed Ruleset with Block as the default action. One rule covers ruby2shell (CVE-2026-132825) and the other covers GHSA-87fm-7w84-j2px, a related integer overflow in the same string case conversion code, fixed in the same releases. On the Free plan, the rules run automatically. On paid plans, they are active wherever the Cloudflare Managed Ruleset is deployed. The WAF is a compensating control, not a replacement for patching. Exploits can reach the vulnerable code through paths the WAF does not see, such as traffic bypassing Cloudflare, email file imports, message queues or background jobs.
Affected Products and Remediation Steps
As of November 19, 2026, Veria Labs lists GitLab 19.6.0, GitHub Enterprise Server 3.22.5, Mastodon 4.7.5, OpenProject 17.9.7, Discourse 2026.10.1 and Chatwoot 4.20.0 as bundling affected Ruby in their latest releases. Discourse moved its Docker base image to Ruby 4.0.10 on the disclosure date, so rebuilding a Docker install picks up the fix. Distribution packages may backport fixes without changing the Ruby version number. Cloudflare recommends checking WAF coverage, upgrading Ruby to 3.3.14, 3.4.13 or 4.0.10, restarting all Ruby processes, rebuilding container images, moving applications off Ruby 3.2 or earlier, updating self-hosted products as vendors release fixes and inventorying runtimes. Cloudflare has patched its own systems that use Ruby and found no indication of compromise.
Earlier coverage: Ruby fixes seven Regexp and String case conversion vulnerabilities
Sources: Cloudflare
SiTech — AI-powered web development
We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.