---
title: "How Cloudflare WAF protects against ruby2shell (CVE-2026-132825)"
description: "ruby2shell (CVE-2026-132825) is a heap buffer overflow in Ruby's string case conversion: in 14 legacy single-byte encodings, uppercasing the German ß writes two bytes (SS) but reserves room for one, so 21 sharp s characters overflow by a byte, with proofs of concept reaching remote code execution."
url: "https://swe.quest/articles/how-cloudflare-waf-protects-against-ruby2shell-cve-2026-132825-7727483822350470"
canonical: "https://blog.cloudflare.com/ruby2shell-waf-protection/"
source: "Cloudflare"
published: "2026-11-20"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 6
tags: ["vulnerability-research","ruby","appsec","memory-safety"]
---

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

A post on [Cloudflare](https://swe.quest/sources/cloudflare.md), published 2026-11-20, 6 min read, Announcement. Original: [https://blog.cloudflare.com/ruby2shell-waf-protection/](https://blog.cloudflare.com/ruby2shell-waf-protection/)

## Summary

ruby2shell (CVE-2026-132825) is a heap buffer overflow in Ruby's string case conversion: in 14 legacy single-byte encodings, uppercasing the German ß writes two bytes (SS) but reserves room for one, so 21 sharp s characters overflow by a byte, with proofs of concept reaching remote code execution. Default Rails and classic Sinatra apps are exposed before authentication because Rack's MethodOverride middleware upcases the \`\_method\` parameter, which an attacker can send in a legacy charset via a multipart POST. Cloudflare added Block-by-default managed rules for this CVE and the related integer overflow GHSA-87fm-7w84-j2px on all plans, and suggests attack-score custom rules as extra defense. It stresses that the WAF cannot see direct-to-origin, internal or non-HTTP paths, so upgrading to Ruby 3.3.14, 3.4.13 or 4.0.10 and restarting all processes is the real fix.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Vulnerability research](https://swe.quest/tags/vulnerability-research.md) (Security)
- [Ruby](https://swe.quest/tags/ruby.md) (Languages)
- [Application security](https://swe.quest/tags/appsec.md) (Security)
- [Memory safety](https://swe.quest/tags/memory-safety.md) (Security)

## Prerequisites

- Ruby string encodings ([easy posts on Ruby](https://swe.quest/tags/ruby.md?difficulty=easy))
- Rack middleware
- heap buffer overflows
- web application firewalls

## Keywords

ruby2shell, CVE-2026-132825, Cloudflare WAF, Rack MethodOverride, Ruby on Rails, Sinatra, GHSA-87fm-7w84-j2px, Veria Labs

## Related posts

- [Ruby2Shell (CVE-2026-132825): find vulnerable Ruby across your repos](https://swe.quest/articles/ruby2shell-cve-2026-132825-find-vulnerable-ruby-across-your-repos-943808a4d97a4f48.md): Sourcegraph · 2026-11-20 · Medium · 5 min read · Ruby, Vulnerability research, Supply chain security, Developer tools
  Ruby2Shell (CVE-2026-132825) is a critical heap overflow in Ruby's string case conversion that researchers say default Rails and classic Sinatra apps expose without authentication, with remote code execution proofs of concept known.
- [How Cloudflare WAF helps protect against Java4Shell (CVE-2026-114938)](https://swe.quest/articles/how-cloudflare-waf-helps-protect-against-java4shell-cve-2026-114938-001767259b988fdd.md): Cloudflare · 2026-11-18 · Medium · 9 min read · Vulnerability research, Memory safety, Java & JVM, Application security
  Java4Shell (CVE-2026-114938, CVSS 9.2) is a memory-corruption bug in OpenJDK's AVX-512 Base64 decoder intrinsic.
- [Docker patches Java4Shell and the NGINX HTTP/2 with Docker Hardened Images](https://swe.quest/articles/docker-patches-java4shell-and-the-nginx-http-2-with-docker-hardened-images-8ddbd959f327792f.md): Docker · 2026-11-19 · Medium · 15 min read · Vulnerability research, Java & JVM, Containers, Supply chain security
  Java4Shell (CVE-2026-114938) is a HotSpot memory-corruption bug in the AVX-512 VBMI Base64 decoding intrinsic that writes up to 62 bytes past a heap buffer, enabling heap disclosure and pre-auth RCE in apps like Keycloak and Jenkins on Java 17.0.6+ running on affected x86-64 CPUs.
- [How Cloudflare WAF helps protect against phpAfterShell and other critical PHP flaws](https://swe.quest/articles/how-cloudflare-waf-helps-protect-against-phpaftershell-and-other-critical-php-3843ce810931b50e.md): Cloudflare · 2026-11-20 · Medium · 9 min read · PHP, Application security, Vulnerability research, Security
  phpAfterShell (CVE-2026-126714, CVSS 9.2) lets an interrupted write in PHP's default file-based session handler leave a mixed session file.
- [Making Open Source Safer for Everyone with Shopify’s Bug Bounty Program](https://swe.quest/articles/making-open-source-safer-for-everyone-with-shopify-s-bug-bounty-program-48c56c4f3d09ee13.md): Shopify Engineering · 2022-06-15 · Medium · 5 min read · Application security, Ruby, Open source
  A Shopify bug bounty report showed that a leaked Rails development secret could be escalated to remote code execution because ActiveSupport's MessageEncryptor deserialized data with Marshal by default.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
