A single character has been breaking Ruby’s heap for eight years. Veria Labs disclosed today that CVE-2026-132825 — named Ruby2Shell — is a pre-authentication heap overflow in Ruby’s string case-conversion code. It affects default Rails and Sinatra apps without any authentication, and it ships bundled inside GitLab, GitHub Enterprise Server, Mastodon, Discourse, Chatwoot, and OpenProject. A proof-of-concept exploit exists. Patches are available. Upgrade the Ruby interpreter now.
What to Do Right Now
The fix lives in the Ruby interpreter itself — not in Rails, not in Sinatra, not in any gem. Running bundle update or deploying application code will not protect you. You need to replace the runtime.
Upgrade to one of the fixed Ruby versions and restart your application processes:
- Ruby 4.0.10
- Ruby 3.4.13
- Ruby 3.3.14
If you are running containers, rebuild your images with the updated base and redeploy. Confirm the upgrade:
ruby --version
# Should show: ruby 4.0.10, 3.4.13, or 3.3.14
If you run self-hosted GitLab, Discourse, Mastodon, or any other platform in the list below, restrict access immediately — put the server behind a VPN or IP allowlist — and wait for the vendor’s patched release before re-exposing it.
Who Is Affected
The vulnerability reaches stock Rails and classic-style Sinatra applications without any authentication. No special configuration is required. Rails and Sinatra can call the affected case-conversion methods on strings from HTTP request parameters, headers, and uploaded content — without the developer doing anything unusual.
Veria Labs identified these self-hosted platforms as shipping a vulnerable Ruby runtime:
- 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
GitLab shipped version 19.6.0 during the disclosure embargo window, meaning it went out already vulnerable and without a simultaneous fix. At time of publication, there is no patch for older GitLab releases.
The Bug: One Character, Eight Years
Ruby’s upcase implementation for legacy single-byte encodings — ISO-8859-1, ISO-8859-2, Windows-1252, and several others — has a bounds-check error. The German character ß (0xDF in ISO-8859-1) upcases to two characters: "SS". But the conversion loop only checks whether the output buffer has room for one more byte before writing two. A string with 21 ß characters overflows the heap buffer by exactly one byte.
That is the entire bug. The overflow has existed since Ruby 2.4.0, released in December 2016. The affected methods are upcase, swapcase, downcase(:fold), and casecmp?. UTF-8 strings go through a completely different code path and are not affected.
No Fix for End-of-Life Ruby
Ruby 3.2 and all earlier releases are end-of-life and will not receive a backport for this vulnerability. If your application runs Ruby 3.2 or older, upgrading the interpreter series is the only path to a fix. There is no workaround, no gem-level mitigation, and no WAF rule that reliably catches the attack inside multipart request bodies. Restricting network access buys time — it is not a fix.
On the CVSS Score
MITRE’s CNA scored Ruby2Shell at 7.4 (High) with a local attack vector and high complexity. Ruby’s own advisory and Veria Labs’ original disclosure both describe network-accessible, pre-authentication exploitation on default Rails configurations. Those two framings are not compatible. Until MITRE reconciles the discrepancy, treat this as a network-accessible pre-auth flaw — because that is what the researchers who discovered it say it is.
Exploitation Timeline
No confirmed in-the-wild exploitation had been reported as of the November 19, 2026 disclosure. A proof-of-concept is already circulating, and Veria Labs plans to publish full exploit details approximately one week from disclosure. The Ruby team released fixed interpreter versions on November 18 — the day before this was made public. The window between "PoC circulating" and "active exploitation" is typically measured in days, not weeks. Orca Security’s breakdown covers what heap grooming at this level looks like in practice.
Also Check: NGINX2Root
If you operate any of the affected self-hosted platforms, verify whether you also need to address NGINX2Root (CVE-2026-123007). F5 disclosed five critical NGINX vulnerabilities on November 18 — the day before Ruby2Shell went public. Installations of GitLab and Discourse running NGINX may be dealing with both issues simultaneously. The Discourse team acknowledged both in a single advisory.

