Ruby vulnerability CVE-2026-132825 (Ruby2Shell): one German letter, one byte, and the 3-step check
Capitalizing the German ß in some legacy encodings made Ruby write one byte past a buffer, for almost ten years. Researchers say it reaches stock Rails apps before login. Fixed in Ruby 3.3.14, 3.4.13 and 4.0.10; Ruby 3.2 and older get no fix. Here is who is affected, the 3-step check and what to do.
On 18 November 2026 Ruby released 4.0.10, 3.4.13 and 3.3.14 to fix seven vulnerabilities in its regular expression engine and in the case conversion of strings. One of them now has a name and a number: Ruby2Shell, CVE-2026-132825 (GitHub advisory GHSA-34m4-m9fh-gqp5). Ruby’s advisory calls it “a one-byte heap-based buffer overflow in the case conversion of strings” and says the Ruby team is “aware of PoCs that prove this flaw can be used to trigger RCE in some scenarios”.
The researchers who named it, Veria Labs, go further: they report that it is reachable without authentication in the default configuration of Rails and classic-style Sinatra. And the whole thing comes down to one letter of the German alphabet.
This post is defence only: one plain line on the mechanism, then who is affected and what to do. Nothing here was tested or scanned; every fact comes from the sources linked at the end. Vendor status is as of 20 November 2026, so check the vendor pages again before you act.
One letter that grows when you capitalize it
German has the letter ß (Eszett, a “sharp s”). Write Straße (street) in capitals and the customary result is STRASSE: six letters become seven. Unicode’s case rules say exactly that. Its SpecialCasing.txt maps ß to the two letters “SS”, and notes that the stability policy forbids changing that default to the newer capital ẞ (U+1E9E). That capital was added in Unicode 5.1 in 2008, and the German spelling council allowed it in official spelling on 29 June 2017, next to “SS”.
Old single-byte encodings such as ISO-8859-1 (Latin-1) and Windows-1252 use one byte per letter. They contain ß but no capital ß, so upper-casing it has to produce two bytes.
The bug in one line
Ruby’s case-mapping code for these encodings checked that there was room for one more byte in the output buffer, then wrote two. The fix commit says it plainly: the functions “map the sharp s (0xDF) to two bytes but checked for only one byte of room in the output buffer, so they wrote one byte past the buffer. Check for two bytes.”
- UTF-8 strings are not affected: they take a different code path (Veria Labs).
- The same loop sat in 14 legacy encodings: ISO-8859-1, -2, -3, -4, -9, -10, -13, -14, -15 and -16, and Windows-1250, -1252, -1254 and -1257 (the files changed by fix commit
d582f8f). - It has been there since Ruby 2.4.0, released on 25 December 2016 (Veria Labs). That is the same release whose NEWS says
upcase,downcaseand friends started working beyond ASCII, including for “ISO-8859-1~16”.
How that one byte becomes code execution, and how a request reaches it, is deliberately not covered here.
How bad is it? Three sources, three answers
| Source | What it says |
|---|---|
| CVE record (MITRE as CNA) | CVSS 3.1 7.4 High, attack vector local, attack complexity high |
| Ruby’s GitHub advisory | severity critical |
| Veria Labs | critical, network, no authentication; pre-auth RCE on stock Rails (as reported) |
| CISA’s assessment on the CVE record (19 Nov) | Exploitation: none; Automatable: no; Technical impact: total |
No primary source reports attacks in the wild. One date matters, though: Veria Labs says it will publish a proof of concept “demonstrating remote code execution on stock Rails on 25 November 2026, or later if major vendors have not shipped a fix by then.” Plan to be patched before the details are public.
Who is affected
Think of it as rings around the interpreter:
- Ruby itself: every release before 3.3.14, 3.4.13 and 4.0.10, back to 2.4.0.
- Frameworks in their default setup (Veria Labs): Rails and Sinatra (classic style) are affected. “Other frameworks and plain Rack” are not exposed by default.
- Your own code: Veria adds that “application code that upcases strings received in a legacy encoding may also be vulnerable”. That is a reason to patch, not a reason to wait.
- Products that bundle their own Ruby. Here your system Ruby does not matter; the vendor’s does.
| Product | Affected | Fixed in | Status on 20 Nov 2026 |
|---|---|---|---|
| Mastodon | 4.7.5 and earlier | 4.7.6, 4.6.12, 4.5.22, 4.4.29 | fixed (released 19 Nov) |
| OpenProject | 17.9.7 and earlier | 17.9.8, 17.8.3 | fixed (19 Nov) |
| Discourse base image | before 2.0.20261119-0203 | 2.0.20261119-0203 | fixed |
| GitLab | 19.6.0 and earlier | none yet | Ruby bump merged in omnibus-gitlab on 18 Nov, no patch release yet |
| GitHub Enterprise Server | 3.22.5 and earlier | none yet | newest release 3.22.5 |
| Chatwoot | 4.20.0 and earlier | none yet | newest release 4.20.0 (18 Nov) |
Sources: Veria Labs’ table (updated 20 Nov 05:29 UTC), cross-checked against each project’s release page and tags around 05:45 UTC the same day.
The 3-step check
1. Ask the Ruby that actually runs your app. Run ruby -v on the server, or inside the container (docker exec <container> ruby -v). Not on your laptop: the version that matters is the one your app processes loaded. Fixed means 4.0.10, 3.4.13, 3.3.14 or newer.
2. Find every place the version is pinned. The .ruby-version file, the ruby line in your Gemfile, and the FROM line in your Dockerfile. On Docker Hub, the official image’s floating tags (ruby:3.4, ruby:3.3, ruby:4.0-slim, …) moved to the fixed releases on 19 November, about two hours after the advisory, so a rebuild with a fresh pull picks them up. A pinned patch tag such as ruby:3.4.12 never changes. And ruby:3.2 was last updated on 14 April 2026: it is frozen.
3. List the software that brings its own Ruby. Use the table above and each vendor’s release page. On an Omnibus GitLab install, sudo gitlab-rake gitlab:env:info prints the “Ruby Version” it runs.
Why “end of life” Rubies stay vulnerable
Ruby 3.2 reached end of life on 1 April 2026, seven and a half months before this advisory. The advisory is explicit: “Ruby 3.2 and earlier have reached their end of life and will not receive these fixes.” Every release from 2.4.0 to 3.2 is affected, and none of them will get an upstream patch.
There is one exception to “no fix”: distributions that ship an older Ruby and backport security fixes themselves. Ubuntu 24.04, for example, ships ruby3.2. On 20 November Ubuntu’s tracker listed every Ruby package, that one included, as needs-triage, and Debian’s tracker had no package status yet. Watch your distro’s tracker, and compare full package versions rather than the upstream number.
What to do
- Upgrade Ruby to 3.3.14, 3.4.13 or 4.0.10 (rbenv users: ruby-build added them on 19 November).
- Rebuild every image that contains Ruby, and redeploy.
- Restart the app processes, so they actually load the new interpreter.
- On Ruby 3.2 or older, the real fix is moving to 3.3 or newer. Ruby 3.3 is supported until the end of March 2027.
- For bundled Ruby, install the vendor’s fixed release as soon as it ships.
Neither Ruby nor Veria Labs lists a workaround or a setting you can switch off. The patch is the plan.
Three teams, two AI labs, one letter
Ruby’s advisory credits Stephan Lipp (Ada Logics) and Anthropic for this bug (and three of the other six). Veria Labs says it found the bug independently and was the first to demonstrate code execution, and lists Moritz Sanft, in collaboration with OpenAI, as another discoverer. The fix commit is dated 28 October 2026, three weeks before the public release.
Sources
- Ruby: Security advisories: multiple vulnerabilities in Regexp and String case conversion (18 Nov 2026); release posts for 4.0.10, 3.4.13 and 3.3.14; branches and EOL dates
- GHSA-34m4-m9fh-gqp5 and fix commit ruby/ruby@d582f8f; Ruby 2.4.0 NEWS
- CVE-2026-132825 on cve.org (MITRE’s CVSS 3.1 score and CISA’s SSVC assessment); oss-security, 19 Nov 2026
- Veria Labs, Ruby2Shell (updated 20 Nov 2026 05:29 UTC): frameworks, bundled software, proof-of-concept date, credits. Read for its advisory-level facts; no exploit detail is reproduced here.
- Vendor releases: Mastodon, OpenProject, Chatwoot, GitLab patch releases, omnibus-gitlab commit 8fcf9d63, GitHub Enterprise Server 3.22 release notes; GitLab docs for
gitlab:env:info - Docker Hub official ruby image (tag dates via the Hub API, 20 Nov 2026); rbenv/ruby-build v20261119
- Ubuntu CVE tracker, Debian security tracker
- Unicode SpecialCasing.txt and DerivedAge.txt; Rat für deutsche Rechtschreibung, press release of 29 June 2017