Ruby2Shell: One Byte Too Many, Three Teams That Found It and the Rubies You Don't See
On November 18, 2026 the Ruby team published seven security advisories about its regular expression engine and about case conversion in strings. The fixed versions are Ruby 4.0.10, 3.4.13 and 3.3.14.
The advisory says they know of proofs of concept that reach remote code execution in some scenarios. Ruby 3.2 and earlier are no longer supported and will not get the fix.
One of the seven already has a name and a CVE: Ruby2Shell, CVE-2026-132825, which NVD published on November 19. A later message on oss-security noted that MITRE appeared to have assigned it. It is a single-byte heap overflow.
What interests me is not just the byte. It is that at least three different teams found it, at least two of them within a few weeks and working with AI models, and that the fix lives in the interpreter, not in your code. It only reaches production when you rebuild every image and update every product that ships its own Ruby.
What exactly does that extra byte do?
The bug is in the case conversion functions of single-byte encodings, such as ISO-8859-1 or Windows-1252. The GHSA-34m4-m9fh-gqp5 advisory sums it up like this: when changing the case of certain strings in those encodings, Ruby could write one byte past the end of the output buffer.
The cause is the German letter ß. Most of these encodings have no uppercase ß, so uppercasing ß produces two letters: SS. The loop checked that there was room for one byte and wrote two.
Veria Labs explains the math. The output buffer is the input length plus 20 bytes. Each ß adds one byte to the output, so 21 of them overflow the buffer by one.
The attacker does not choose the byte written: it is an S (0x53) when uppercasing or an s (0x73) when case folding. What the attacker does control is the buffer size, through the input length.
According to Veria, that loop has existed since Ruby 2.4.0. It is reachable through upcase, swapcase, downcase(:fold) and casecmp?. UTF-8 strings, the default in Ruby, take a different path and are not affected.
The commit that fixes it, d582f8f, is short. It touches 14 encoding files, ten enc/iso_8859_*.c and four enc/windows_125*.c, to check that two bytes are free rather than one, and adds a test. Its author is Yusuke Endoh, from the Ruby team.
How does a web request reach upcase?
A one-byte overflow in a string function sounds far removed from a web application. The distance is shorter than it looks, and Moritz Sanft explains it in an article on Durendal, published on November 19.
Rack, the HTTP layer Rails runs on, lets a multipart form override the HTTP method with a special field called _method. Rails uses it to send PATCH or DELETE from HTML forms. Rack passes that value through upcase.
Rack also lets each multipart field declare its own encoding with the charset key. If the client declares ISO-8859-1 on the _method field and fills it with ß, the value reaches the vulnerable function before any authentication.
That is why Sanft writes that a freshly created rails new application is enough. Veria Labs agrees: it marks Rails and classic-style Sinatra as affected in their default configuration, and other frameworks or plain Rack as not exposed by default.
I am not reproducing the request here. Neither team has published a full exploit yet, and Veria has announced its own for November 25, or later if the major vendors have not shipped their fix.
Sanft also describes a second bug, GHSA-87fm-7w84-j2px: an integer overflow when the result of the case conversion exceeds 4 GiB. That path, according to Sanft, only works with Rack 3.2.1 or earlier, because Rack 3.2.2 added limits on the multipart data it retains.
It is a good example of how a boring limit in the framework can defuse a serious interpreter bug.
Three teams, at least two with AI models
The credits list in the Ruby advisory already tells part of the story. This table summarizes the seven advisories with the severity shown in each GitHub record.
| Advisory | Component | Type | Severity (GitHub) | Credit in the Ruby advisory |
|---|---|---|---|---|
| GHSA-34m4-m9fh-gqp5 (CVE-2026-132825) | case conversion | one-byte overflow | critical | Stephan Lipp (Ada Logics) and Anthropic |
| GHSA-7x2q-68qv-6p8x | regex compilation | double free | critical | Stephan Lipp (Ada Logics) and Anthropic |
| GHSA-3p8q-wmhx-vm2w | regex compilation | integer overflow | critical | aphantom (HackerOne) |
| GHSA-87fm-7w84-j2px | case conversion | integer overflow | high | baba__yaga (HackerOne) |
| GHSA-wpqw-5qxg-m68r | case-insensitive matching | out-of-bounds read | high | Stephan Lipp (Ada Logics) and Anthropic |
| GHSA-7whj-cfh7-xgm4 | Regexp#to_s | heap overflow | high | Stephan Lipp (Ada Logics) and Anthropic |
| GHSA-pvgc-g7gj-pv6h | case-insensitive backreferences | out-of-bounds read | medium | Hiroya Fujinami and Hiroshi SHIBATA |
Five of the seven are in the regular expression engine and, according to the advisory, four of those five require the application to compile or use patterns the attacker controls. The two case conversion bugs have no such condition.
Four of the seven carry the joint credit of Ada Logics and Anthropic, and the Ruby2Shell fix commit, with an author date of October 28, includes the line Co-Authored-By: Claude Mythos 5.1 next to Reported-by: Stephan Lipp. Anthropic in the credit and a Claude model signing as co-author of the fix are the signal, an indirect one, that this team worked with AI.
Sanft describes another route to the two case conversion bugs, one of them Ruby2Shell. On October 23, Sanft asked Codex to map the CRuby surface reachable without authentication from Rails. In less than 24 hours, according to the write-up, Codex came back with several bugs, including the two case conversion ones.
Then came the exploit. According to Sanft’s timeline, there was an end-to-end one against a toy application on October 26, and an OpenAI researcher demonstrated remote execution against an unchanged rails new app, using the jemalloc memory allocator, on November 5, Central European Time.
The next day she repeated it with the default glibc allocator. OpenAI sent the reports to the Ruby team on the evening of the 5th.
Veria Labs, for its part, says it found the bug independently and was the first to demonstrate remote execution. Its page does not say whether it used models, and it names Sanft, in collaboration with OpenAI, among the additional discoverers.
Two important caveats. The Ruby credits list includes neither Sanft nor Veria, so it is not a census of everyone who found it. And both priority claims are statements by the researchers themselves that I cannot verify from the outside.
I also do not know how much of the work the model did and how much the person did in each case. A Co-Authored-By says a model contributed to the commit, not that it found the bug on its own.
What does seem clear is the pattern. Sanft says the Ruby work started after PHP2Shell, which I wrote about in October, and after the Brotli bug. Internet-facing interpreters are being reviewed language by language, and several teams with models are reaching the same bugs within weeks.
Critical or 7.4? The scores do not agree
The Ruby team marks Ruby2Shell as critical in its GitHub advisory, GHSA-34m4-m9fh-gqp5. MITRE, which assigned the CVE, gives it 7.4 in CVSS 3.1 with the vector AV:L/AC:H, that is, local access and high complexity, according to the NVD record.
The SSVC entry CISA added on November 19 says: exploitation none, automatable no, technical impact total. The KEV catalog, in its November 20 version, does not include it.
GitLab records both figures in its notes: it shows the critical severity from the Ruby advisory and clarifies that MITRE rates it as high, with 7.4.
And there is a skeptical reading. OX Security concluded on November 19 that the case is more marketing than real risk: there is no known exploitation, no working exploit published, and turning a fixed byte into code execution typically requires grooming the heap for each target.
My reading is different. An AV:L vector does not fit with two independent teams that say they have unauthenticated remote execution against default Rails. But until the remote exploit is public, that remains a claim by the discoverers, not something I have checked.
None of the sources I have read establishes active exploitation. NVD already links a third-party repository with a local reproduction, with no remote path, but the remote exploit against Rails is still unpublished and nobody has yet publicly shown how reliable it is across deployments and memory configurations.
What I would not do is wait for the scores to agree. The proof that matters has a date, November 25 or later, and the fix is already out.
The patch is in Ruby, the problem is in the Rubies you don’t see
Updating Ruby in your Dockerfile is the easy part. The hard part is finding every Ruby running in your organization that nobody chose.
On November 20 GitLab released versions 19.6.1, 19.5.8 and 19.4.10. Its notes explain that the fix is a patch to Ruby: the official packages and images already include it, but anyone who builds GitLab from source must rebuild their Ruby with 3.3.14 or 3.4.13.
Veria maintains a table of products that ship their own Ruby, updated on November 21 at 00:28 UTC. Besides GitLab, it lists fixed versions of Chatwoot, Mastodon, OpenProject and the Discourse base image. It is their compilation; I have not verified it product by product.
There is a third group with no possible fix. Ruby 3.2 and earlier are out of support, and according to Veria the bug is in every version since 2.4.0. Any old image still in production stays exposed until someone migrates it.
What would I do this week?
- Inventory every Ruby: base images, background workers, CI runners, distribution packages and products that ship their own, such as GitLab, GitHub Enterprise Server or Discourse, with the status each vendor publishes.
- Check the version each running process reports, not the one installed on disk. A rebuilt image does no good if the old container is still alive; OX makes the same recommendation.
- Upgrade to 4.0.10, 3.4.13 or 3.3.14, rebuild and restart. For third-party products, install the vendor’s release.
- Plan the move off Ruby
3.2and earlier. There is no patch to wait for. - Review whether your application passes strings that arrive in a client-chosen encoding through
upcase,swapcase,downcase(:fold)orcasecmp?. It is a good exercise even if you have already patched. - Do all of the above before November 25, the date Veria gives, barring delays, for its proof of concept.
The lesson I take away goes beyond Ruby. A one-byte bug in the interpreter cuts across Rack, Rails and any product that bundles Ruby. And now several teams find it at once, with models that map the attack surface in hours.
Frequently asked questions
Am I affected if my application only uses UTF-8?
Ruby2Shell lives in single-byte encodings, and UTF-8 strings take a different path. But in Rails, Rack lets the client declare the encoding of a multipart field, so your default configuration does not protect you. Update anyway: according to Sanft, the integer overflow in GHSA-87fm-7w84-j2px is reachable with UTF-8, although Rack 3.2.2 or later stops it.
Is there active exploitation?
Not in the sources I have read. NVD records the CISA SSVC assessment with exploitation none, and the bug is not in KEV. Veria has announced a public proof of concept for November 25, or later if major vendors have not shipped their fix.
Is updating Ruby enough?
For your own code, yes, if you rebuild the images and restart the processes. For products that ship their own Ruby, such as GitLab, you need the vendor’s release. For Ruby 3.2 or earlier, you need to migrate.
Why is the CVSS score only 7.4?
It is MITRE’s assessment, with a local access vector and high complexity. The Ruby team considers it critical, and two research teams claim unauthenticated remote execution. I would give more weight to the proof than to the number.
Sources
- Ruby, Security advisories: multiple vulnerabilities in Regexp and String case conversion, November 18, 2026, and Ruby 4.0.10 Released.
- Ruby, advisories GHSA-34m4-m9fh-gqp5 and GHSA-87fm-7w84-j2px, and the commit d582f8f.
- NIST NVD, CVE-2026-132825, with MITRE’s assessment and the CISA SSVC entry.
- oss-security, Re: Ruby: multiple vulnerabilities in Regexp and String case conversion, November 19, 2026.
- Veria Labs, Ruby2Shell (CVE-2026-132825), updated November 21, 2026.
- Moritz Sanft, Yet another ẞug, Durendal, November 19, 2026.
- GitLab, GitLab Critical Patch Release: 19.6.1, 19.5.8, 19.4.10, November 20, 2026.
- Rack, commit 3beacfc, limit on retained data in multipart requests.
- OX Security, Ruby2Shell (CVE-2026-132825): Real RCE Risk or Just Hype?, November 19, 2026.
- CISA, KEV catalog in JSON, version 2026.11.20.