Cloudflare WAF blocks ruby2shell (CVE-2026-132825) for all customers

·2026.11.21 05:24

Key point

The vulnerability, a heap buffer overflow triggered by the German sharp s in legacy encodings, affects Ruby versions prior to 3.3.14, 3.4.13, and 4.0.10.

Details

  • Cloudflare WAF now blocks ruby2shell (CVE-2026-132825) and a related integer overflow (GHSA-87fm-7w84-j2px) for all customers, including the Free plan, via new managed rules with Block as the default action.
  • The flaw is a heap buffer overflow in Ruby string case conversion methods (upcase, swapcase, downcase(:fold), casecmp?) when processing the German sharp s (ß) in legacy single-byte encodings like ISO-8859-1, allowing pre-authentication remote code execution in default Rails and classic-style Sinatra applications.
  • Fixes are available in Ruby 3.3.14, 3.4.13, and 4.0.10; self-hosted products such as GitLab 19.6.0, GitHub Enterprise Server 3.22.5, Mastodon 4.7.5, OpenProject 17.9.7, and Chatwoot 4.20.0 shipped affected versions at disclosure, while Discourse updated its Docker base image to Ruby 4.0.10 on November 19, 2026.
  • The WAF serves as a compensating control for traffic passing through Cloudflare but does not protect against direct origin access, internal service traffic, or non-HTTP entry points like email or file imports, making patching the only complete fix.

Technical Mechanism

  • Ruby writes two bytes for the uppercase form of ß but checks for room for only one byte in 14 ISO-8859 and Windows-125x encodings, causing a one-byte overflow with a string of 21 sharp s characters.
  • Rack's MethodOverride middleware converts the _method parameter to uppercase during routing before authentication, exposing default Rails and Sinatra apps to the bug via multipart POST requests.

Mitigation and Scope

  • WAF attack score uses machine learning to detect second-stage payloads and post-exploitation traffic that signature rules may miss, with custom rules available on Enterprise and Business plans.
  • Cloudflare has patched its own Ruby systems and reports no indication of compromise, while Veria Labs expects to publish a proof of concept approximately one week after disclosure.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.