Close Menu
  • Home
  • Hardware & Leaks
  • Mobile & Gadgets
  • AI & Software
  • Gaming & Consoles
  • Cybersecurity
  • Industry
  • Web & SEO
  • Guides
What's Hot

ASP.NET library flaw scores 9.3 and is already exploited

November 23, 2026

GTA 6 Jason’s quiet streak was designed, Rockstar explains

November 22, 2026

Google StarSearch job listing targets breaking news within minutes

November 22, 2026
Instagram
Instagram
ByteLeaks
Follow Us
  • Home
  • Hardware & Leaks
  • Mobile & Gadgets
  • AI & Software
  • Gaming & Consoles
  • Cybersecurity
  • Industry
  • Web & SEO
  • Guides
ByteLeaks
Home»Cybersecurity»Ruby2shell flaw rated critical reaches default Rails apps
Cybersecurity

Ruby2shell flaw rated critical reaches default Rails apps

Kayra DemirBy Kayra DemirNovember 20, 2026006 Mins Read
Share Facebook Twitter Pinterest Copy Link LinkedIn Tumblr Email Telegram WhatsApp
Ruby2shell flaw graphic with a Ruby gem inside a shield
Cloudflare-branded header art showing a Ruby gem inside a shield, illustrating protection against the ruby2shell flaw.
Share
Facebook Twitter LinkedIn Pinterest Email Copy Link

The ruby2shell flaw, tracked as CVE-2026-132825, is a heap buffer overflow in the way Ruby changes the case of strings. The Ruby team disclosed it on November 19, 2026, and rated it Critical. Cloudflare said its web application firewall (WAF) now blocks the flaw for all customers, including those on the Free plan.

How the ruby2shell flaw works

Ruby strings carry an encoding. Ruby still supports many legacy single-byte encodings, such as ISO-8859-1 (Latin-1) and Windows-1252, alongside UTF-8. In a single-byte encoding, each character takes one byte, so changing the case of a string usually produces output of the same length.

The German sharp s (ß) breaks that assumption. Its uppercase form is two characters, SS. In 14 ISO-8859 and Windows-125x encodings, Ruby writes those two bytes but checks for room for only one. According to Veria Labs, a string with 21 sharp s characters overflows the output buffer by one byte. The methods that reach the bug are upcase, swapcase, downcase(:fold) and casecmp?. UTF-8 strings take a different code path and are not affected.

A one-byte overflow can look harmless. In a memory-corruption exploit, though, a single byte written past the end of a heap buffer can be enough to corrupt an adjacent object or allocator metadata. Ruby said it is aware of proofs of concept that turn the flaw into code execution in some scenarios. Veria Labs said it will publish its own proof of concept about a week after disclosure, and Cloudflare expects scanning to start soon after.

A Ruby gem inside a glowing shield over a waveform, illustrating Cloudflare's WAF protection
A Ruby gem inside a glowing shield over a waveform, illustrating Cloudflare's WAF protection against the ruby2shell flaw.

Why default Rails and Sinatra apps are exposed

HTML forms can only send GET and POST requests. To simulate PUT, PATCH or DELETE, many web frameworks accept a _method parameter in a POST request. Rack, the interface most Ruby web frameworks build on, handles this in its MethodOverride middleware, which converts the value of _method to uppercase. Rails includes this middleware by default, and classic-style Sinatra applications enable it.

An attacker can send a multipart POST request whose _method part declares a legacy character set and contains a run of sharp s characters. The framework upcases the value while it is still routing the request, before any application code or authentication check runs. That is why Veria Labs describes the flaw as reachable before authentication in Rails and classic-style Sinatra applications in their default configuration.

Veria Labs reports that other frameworks and plain Rack applications are not exposed by default. Application code that changes the case of strings received in a legacy encoding may still be affected, wherever the string comes from.

Affected versions and products

The flaw affects Ruby 3.3.13 and earlier, 3.4.0 through 3.4.12, and 4.0.0 through 4.0.9. Veria Labs reports the bug has been present since Ruby 2.4.0. Ruby 3.2 and earlier have reached end of life and will not receive a fix.

Several self-hosted products bundle Ruby, and they inherit the exposure. As of November 19, 2026, Veria Labs lists the following latest releases as bundling an affected 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

Discourse moved its Docker base image to Ruby 4.0.10 on November 19, so rebuilding a Docker install picks up the fix. Distribution packages can backport fixes without changing the Ruby version number, so administrators should check the full package version against their distribution’s advisory.

Five more memory safety flaws in the same release

Ruby 3.3.14, 3.4.13 and 4.0.10 also fix six other memory safety flaws, and Ruby says several of them can lead to code execution. One of them, GHSA-87fm-7w84-j2px, is an integer overflow in the same string case conversion code. Cloudflare added a second WAF rule for it.

The other five flaws are in Ruby’s regular expression engine. Most require an application to compile or match a regular expression pattern supplied by the attacker. That is uncommon in web applications, but it does happen in search features, filtering rules and admin tools. Administrators running those features should treat the regex fixes as part of the same upgrade.

How Cloudflare WAF rules respond

Upgrading every Ruby runtime takes time, especially when Ruby is bundled inside self-hosted products and container images. Cloudflare said its WAF reduces exposure while customers patch. It added two rules to both the Cloudflare Free Managed Ruleset and the Cloudflare Managed Ruleset, with Block as the default action. One rule covers the ruby2shell flaw, and the other covers GHSA-87fm-7w84-j2px.

On the Free plan, the Cloudflare Free Managed Ruleset runs automatically, so there is nothing to turn on. On paid plans, the rules are active wherever the Cloudflare Managed Ruleset is deployed. Because paid plans offer more control over ruleset deployment, the managed ruleset may not be active on every zone, so Cloudflare recommends checking its status.

Cloudflare also stressed that the WAF is a compensating control, not a replacement for patching. A WAF can block an exploit when malicious input arrives in an HTTP request that passes through Cloudflare. It cannot block every path to the vulnerable code. Requests sent directly to an origin IP address, and traffic between internal services, never reach the WAF. Ruby code that changes the case of strings from email, file imports, message queues or background jobs can also reach the flaw without an HTTP request.

Defense in depth and what administrators should do

Memory corruption is usually only the first step. To run commands, an attacker still has to deliver a second-stage payload, such as shell commands or a reverse shell. Cloudflare’s WAF attack score uses machine learning to score each request for remote code execution payloads, which can catch exploit variations and post-exploitation traffic that signature rules miss. Enterprise customers can block or challenge requests with cf.waf.score.rce le 20, and Business customers can use cf.waf.score.class eq “attack”.

Cloudflare said it has patched its own systems that use Ruby and has found no indication of compromise. For other organizations, the recommended steps are to confirm WAF coverage, upgrade Ruby to 3.3.14, 3.4.13 or 4.0.10 and restart every Ruby process, including background workers, and move applications on Ruby 3.2 or earlier to a supported series. Self-hosted products should be updated as each vendor releases a fix. Cloudflare said it will keep updating its rules and will post changes in the WAF changelog. Veria Labs’ proof of concept, expected about a week after disclosure, will show how far the public exploit path goes.

Cloudflare CVE-2026-132825 Ruby Ruby on Rails Web Security
Add as Preferred on Google
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Copy Link
Kayra Demir
  • Website

Founder and editor of ByteLeaks and a freelance investigative technology journalist. Kayra studied software engineering at Yıldız Technical University (bachelor's and master's) and journalism at Istanbul University, and covers hardware, mobile, AI and cybersecurity.

Related Posts

ASP.NET library flaw scores 9.3 and is already exploited

November 23, 2026

Cleverbridge data breach exposed card numbers and CVV codes

November 22, 2026

Rackspace Spot breach exposed customer Kubernetes secrets

November 21, 2026
Top Posts

Ichorous demo offers gore, curses and two early levels to try

November 8, 202622 Views

Netflix plans in 2026: top tier costs $10 more than in 2007

November 8, 202614 Views

Terafab chips target 1 million wafers per month by 2032

November 8, 20269 Views
Most Popular

Ichorous demo offers gore, curses and two early levels to try

November 8, 202622 Views

Netflix plans in 2026: top tier costs $10 more than in 2007

November 8, 202614 Views

Terafab chips target 1 million wafers per month by 2032

November 8, 20269 Views
Our Picks

ASP.NET library flaw scores 9.3 and is already exploited

November 23, 2026

GTA 6 Jason’s quiet streak was designed, Rockstar explains

November 22, 2026

Google StarSearch job listing targets breaking news within minutes

November 22, 2026
About ByteLeaks

ByteLeaks is an independent, English-language technology news site covering hardware, AI, mobile, gaming and cybersecurity.

About us · Editorial policy · Contact
info@byteleaks.com

Instagram
  • About Us
  • Editorial Guidelines
  • Privacy Policy
  • Terms of Use
  • Contact Us
  • Disclaimer
© 2026 ByteLeaks. All rights reserved.

Type above and press Enter to search. Press Esc to cancel.