Ruby2Shell: a critical Ruby flaw reaches Rails apps before anyone logs in
Ruby2Shell flaw lets outsiders run code on Rails apps; update Ruby to 4.0.10, 3.4.13 or 3.3.14
A flaw in Ruby, the programming language under Rails and many self-hosted tools, lets an outsider run code on a server without logging in. Ruby rates it critical, and its maintainers say they know of proof-of-concept exploits that can run code in some cases. No attacks have been reported yet, and Veria Labs plans to publish its proof-of-concept on 25 November or later.
Does this affect your devices? HARD for Mac and iPhone matches what you have installed against these stories, privately on your device, and explains why you need to update, while the free browser extension stops scams and fake sites before they load.
What to do this week
- Find every Ruby install.Run ruby -v on each server, container and build machine, or ask your developers for the list. Any version below the fixed release for its branch needs the update.
- Update Ruby to the fixed release for your branch.That is 4.0.10, 3.4.13 or 3.3.14. Then restart the app servers and background workers, rebuild container images, and change any pinned Ruby version in Dockerfiles or .ruby-version files.
- Plan a move off Ruby 3.2 or older.Those releases will not get this fix. Ask your developers which supported Ruby series the app can run on.
- Ask each vendor and host for its fixed release.Ask about GitLab, Mastodon, Chatwoot, OpenProject, GitHub Enterprise Server and your hosting company.
- Keep the firewall on, but do not rely on it.If you use Cloudflare, check that its ruleset covers each site. It is a stopgap while you patch.
What happened
Ruby, the programming language behind Rails and a number of self-hosted tools, has a critical flaw that lets an outsider run code on a server without logging in. Ruby's maintainers released fixes on 18 November. Veria Labs, which published the research, calls the flaw Ruby2Shell.
The bug is in how Ruby changes the case of text, for example turning lower case letters into capitals. Most Ruby text uses a modern encoding where this works safely. Some older single-byte encodings, used for legacy European text, are affected. In those, a German letter (ß) becomes two capitals, but Ruby reserves room for only one, so the write runs past its space in memory. Corrupted memory of that kind can let an attacker take control of the program.
On 18 November Ruby published the fixes. On 19 November Veria Labs published its research, and AWS and The Hacker News published their own notes. On 20 November Cloudflare explained how its firewall blocks the flaw. Veria Labs says it will publish a working proof-of-concept on 25 November, or later if major vendors have not shipped fixes by then.
- Severity
- Critical Rated critical by Ruby's maintainers.
- Who it reaches
- Ruby 4.0.0 to 4.0.9, 3.4.0 to 3.4.12 and 3.3.0 to 3.3.13. Default Rails and classic Sinatra apps can be reached without a login.
- Fixed in
- Ruby 4.0.10, 3.4.13 and 3.3.14. Ruby 3.2 and older get no fix.
- Attacks
- None reported yet. Veria Labs plans to publish its proof-of-concept on 25 November or later.
The full story3 more sections
What an attacker could do
In the default setup of Rails and classic-style Sinatra, the affected code can be reached before anyone signs in. Someone outside can send a crafted request to the website. If the attack works, they can run their own code on the server behind it, which means control of that machine and whatever it holds. Ruby's notes also list flaws that can expose memory or crash a process.
No attacks had been reported in the sources we read. Cloudflare expects scanning to start soon after the proof-of-concept is public.
Who is affected
Ruby on your servers and laptops
Ruby 4.0.0 to 4.0.9, 3.4.0 to 3.4.12 and 3.3.0 to 3.3.13 are affected. Ruby 3.2 and older are out of support and will not get the fix. If your developers build or host apps in Ruby, the same versions count on their laptops and build machines. Veria Labs says the bug dates back to Ruby 2.4.0, so very old installs are exposed too, but they have no fix.
According to Veria Labs, plain Rack apps and other frameworks are not exposed by default. Application code that changes the case of text in the older encodings could still be exposed. Text in UTF-8, the encoding most websites use, is not affected.
Products that bundle their own Ruby
Some products ship a copy of Ruby inside them, so they need their vendor's update rather than yours. Veria Labs lists GitLab 19.6.0 and earlier, Mastodon 4.7.5 and earlier, Chatwoot 4.20.0 and earlier, OpenProject 17.9.7 and earlier, and GitHub Enterprise Server 3.22.5 and earlier. For GitHub Enterprise Server, there was no fixed release when Veria wrote.
Hosting services are patching too. AWS says its Elastic Beanstalk platform version 4.15.4 includes the fixed Ruby. Its Lambda Ruby runtimes are being updated, and functions on manual update or in container images need their owners to act.
The fix sits in Ruby itself, so the Ruby version is the number to check.
How much the firewall covers
Cloudflare has added firewall rules that block attempts at this flaw. They are on by default for Free plans and part of the Managed Ruleset on paid plans. On paid plans, check that the ruleset is deployed on each site and that the rules have not been switched off. AWS WAF has three matching rules in its Known Bad Inputs group, which run in count mode until someone switches them to block.
Cloudflare calls its firewall a stopgap, and says patching is the only complete fix. It cannot see traffic that goes straight to a server's address instead of through Cloudflare, or input that arrives by email, file import or a background job. Cloudflare says it has patched its own Ruby systems and found no sign of compromise.
Timeline
-
HARD publishes its article, at High.
Written by Mitchell Flindell, founder of HARD. How we check our stories. Spotted a mistake? Tell us.
Latest from HARD
- Fake Meta Ads Manager apps were built to take over Facebook accounts; Apple has removed 19 4 Dec 2026
- Bank application forms sent applicants' Social Security numbers to Reddit and X ad tools 4 Dec 2026
- EU says Meta likely broke the law by letting scam ads run on Facebook and Instagram 4 Dec 2026
- Character.AI's bankruptcy sale would pass adult users' chat histories to a new owner 4 Dec 2026
- 818 fake bank sites target customers of more than 170 US banks and credit unions 3 Dec 2026
- Every situation, in the Situation Room
After the news
- How to update every device phones, computers, browsers, TVs and routers
References6
- Ruby maintainers (). “Multiple vulnerabilities in Regexp and String case conversion”. Vendor advisory: seven flaws, affected Ruby versions, fixed versions 4.0.10, 3.4.13 and 3.3.14; Ruby 3.2 and older end-of-life with no fix; no workaround listed.
- Cloudflare (). “How Cloudflare WAF protects against ruby2shell (CVE-2026-132825)”. CVE id, Critical rating, WAF managed rules and plan coverage, WAF as a stopgap, Cloudflare's own patching and no sign of compromise.
- Amazon Web Services (). “CVE-2026-132825 and related issues: Ruby regular expression engine and string case conversion”. CVE id, fixed Ruby versions, AWS service status (Elastic Beanstalk 4.15.4, Lambda rollout, Amazon Linux), and AWS WAF Known Bad Inputs rules in Count mode.
- Veria Labs (). “Ruby2Shell (CVE-2026-132825, GHSA-34m4-m9fh-gqp5)”. Root cause, affected encodings, Rails and Sinatra default exposure, bundling products and fixes, no public proof-of-concept yet and planned 25 November date.
- Aikido (). “Ruby2Shell: critical Ruby RCE, affected versions and how to fix it (GHSA-34m4-m9fh-gqp5)”. Affected and fixed versions by branch, Rails and Sinatra exposed by default, no attacks reported yet, upgrade steps.
- The Hacker News (). “Ruby Releases Fixes for 7 Regex and String Flaws, Warns 5 Have Proof-of-Concept RCE”. Seven flaws in the regex engine and case conversion; maintainers say five have proof-of-concept exploits.
Situation Room articles are updated as events develop: updates are added to the timeline, and never edited away. Follow them by email or RSS.

