Ruby2Shell (CVE-2026-132825, GHSA-34m4-m9fh-gqp5, also written ruby2ßhell) is a one-byte heap overflow in Ruby’s string case conversion. After PHP2Shell and Java4Shell, it’s Ruby’s turn: Veria Labs, which published the write-up, says it lets the bad guys run code without logging in on default Rails and classic Sinatra apps, and on self-hosted products such as GitLab. The fix is a Ruby upgrade to 4.0.10, 3.4.13, or 3.3.14. Until you get there, our free rule crowdsecurity/vpatch-CVE-2026-132825 blocks the exploit request on the path default Rails apps expose before login: a stopgap while you upgrade, not a fix.
The Ruby team shipped the fix on 18 November 2026 and says it knows of proofs of concept that reach code execution “in some scenarios”. NVD scores it 7.4 (CVSS 3.1), and Veria Labs rates it critical. The good news: as of 19 November 2026, no exploitation has been reported, and the CVE is not in the CISA KEV catalog. The less good news: Veria Labs plans to publish its proof of concept about a week after disclosure, so the clock is ticking.
What is Ruby2Shell, and am I affected?
Ruby2Shell is a one-byte heap overflow in the way Ruby changes the case of text in legacy single-byte encodings. The root cause is almost funny: some of these encodings, such as ISO-8859-1 and Windows-1252, have a lowercase ß (yes, the German “sharp s”) with no uppercase form, so Ruby writes it as SS when it upcases text. Two bytes go out, but the loop only checked there was room for one, so a crafted string writes one byte past the end of a heap buffer. UTF-8 strings take a different code path and are safe from this one.
You are affected if you run one of the versions below and legacy-encoded text reaches upcase, swapcase, downcase(:fold) or casecmp?. According to Veria Labs, Rails and classic Sinatra do exactly that in their default configuration; other frameworks only get there if your own code does.
| Ruby series | Affected | Fixed in |
|---|---|---|
| 4.0 | 4.0.0 to 4.0.9 | 4.0.10 |
| 3.4 | 3.4.0 to 3.4.12 | 3.4.13 |
| 3.3 | 3.3.13 and earlier | 3.3.14 |
| 3.2 and older | back to 2.4.0 | no fix (end of life) |
Self-hosted products bring their own Ruby, so they need a vendor release. On 19 November, Veria Labs listed the latest GitLab (19.6.0), GitHub Enterprise Server (3.22.5) and Chatwoot (4.20.0) as affected, while Mastodon, OpenProject and Discourse had already shipped fixed releases.
Can a WAF stop Ruby2Shell?
On the path, default Rails apps expose before login: yes. How does it work? There, the whole attack fits in one POST request. Rails’ default middleware changes the case of one form field on every POST, and a multipart part declared as ISO-8859-1 carries the crafted value straight into the vulnerable code, before your application code even runs. Our AppSec rule crowdsecurity/vpatch-CVE-2026-132825 watches that field and blocks the request when it carries the pattern that triggers the overflow. Legitimate traffic has no business putting that pattern there, so false positives are not expected.
Does it cover everything? No. Your own code that changes the case of other legacy-encoded input is out of its reach, and so is GHSA-87fm-7w84-j2px, a related flaw fixed in the same release. Upgrading Ruby takes care of both.
How do I protect Rails and GitLab before I can upgrade?
| Option | What it does | Limits |
|---|---|---|
| Upgrade Ruby and restart every Ruby process | Removes the bug and six related flaws | Rebuild container images bundle update does not change the interpreter |
| VPN or IP allowlist for GitLab and other self-hosted products | Takes them off the internet until the vendor ships a fix | Remote users need the VPN too |
| CrowdSec virtual patch | Blocks the pre-login Rails exploit request; no app restart | Default Rails path only; not a fix |
Already running the CrowdSec WAF? Install the rule, then reload CrowdSec:
cscli appsec-rules install crowdsecurity/vpatch-CVE-2026-132825
New to it? The AppSec quickstart guide gets you set up first.
Ruby2Shell FAQ
Is there a WAF rule or virtual patch for Ruby2Shell?
Yes. CrowdSec’s free AppSec rule crowdsecurity/vpatch-CVE-2026-132825 blocks the Ruby2Shell exploit request on the path default Rails apps expose before login. It is a stopgap while you upgrade Ruby, not a fix.
Is Ruby2Shell exploited in the wild?
No exploitation of Ruby2Shell had been reported as of 19 November 2026, and CVE-2026-132825 is not in the CISA KEV catalog. Veria Labs plans to publish a proof of concept about a week after disclosure, so don’t count on that lasting.
Can a WAF stop Ruby2Shell?
A WAF can block the Ruby2Shell exploit request on the default Rails path before login. It can’t protect your own code that upcases other legacy-encoded input, so treat it as a stopgap until you upgrade Ruby.
Does updating Rails or running bundle update fix Ruby2Shell?
No. Ruby2Shell lives in the Ruby interpreter, so only a new Ruby release (4.0.10, 3.4.13 or 3.3.14) fixes it.
Is GitLab affected by Ruby2Shell?
Yes. GitLab 19.6.0 bundles Ruby 3.3.13, which is affected, per Veria Labs on 19 November 2026. Keep GitLab off the public internet until it ships a fixed release.
References
- CrowdSec Hub: crowdsecurity/vpatch-CVE-2026-132825 and AppSec documentation
- Ruby security advisories, 18 November 2026
- CVE-2026-132825 on NVD
- Ruby2Shell, Veria Labs
- CISA Known Exploited Vulnerabilities catalog
Related: Java4Shell virtual patch and PHP2Shell virtual patching.


