A single German character, sitting in memory since Ruby 2.4.0, now known as Ruby2Shell: upcasing ß writes two bytes where Ruby reserved one, and Veria Labs demonstrate the resulting heap overflow is reachable without authentication on default Rails and classic Sinatra configurations.
Ruby 3.3.14, 3.4.13 and 4.0.10 are out, fixing GHSA-34m4-m9fh-gqp5 — a critical, heap-based buffer overflow in string case conversion with proof-of-concept remote code execution — alongside six further advisories in Regexp and string handling. Disclosed 18–19 November 2026, now tracked as CVE-2026-132825 (CVSS 7.4 high per MITRE as CNA). If you run Rails, Sinatra, GitLab, OpenProject, Mastodon, Discourse, or anything whose Ruby survives inside a container image, read on.
Most of Ruby's single-byte encodings — ISO-8859-1, Windows-1252, and friends — have no capital ß. Upcasing it expands from one byte to two (ß → SS). The case-conversion loop bounds-checks room for exactly one output byte, then writes two (Veria Labs, fix in ruby/ruby@d582f8f):
while (*pp < end && to < to_end) { /* room for one byte */
code = *(*pp)++;
if (code == SHARP_s) {
if (flags & ONIGENC_CASE_UPCASE) {
*to++ = 'S'; /* first byte */
code = 'S';
}
/* ... */
}
/* ... */
*to++ = code; /* second byte, unchecked */
}
The output buffer is sized as input length + 20 bytes. A single ß consumes one of those 20 spare bytes; 21 of them write one byte past the end of the heap allocation. The byte written is S (0x53) when upcasing or s (0x73) when case-folding, and the attacker controls the buffer size through the input length. Copying the result out of the buffer afterwards also reads one byte out of bounds.
The same loop lives in several ISO-8859 and Windows-125x encodings and has shipped since Ruby 2.4.0. It is reached through upcase, swapcase, downcase(:fold) and casecmp?. UTF-8 takes a different code path and is not affected.
A memory bug at this depth only becomes an RCE if an attacker can feed crafted input into the vulnerable codepath. Veria Labs mapped exactly that for the two frameworks that call case conversion on request data in their default configuration:
| Framework | Status on an affected Ruby |
|---|---|
| Ruby on Rails | Affected by default |
| Sinatra (classic style) | Affected by default |
| Plain Rack / other frameworks | Not exposed by default |
Custom application code that upcases or case-folds untrusted strings in a legacy encoding is vulnerable regardless of framework — one str.upcase over a parameter named in ISO-8859-1 is the whole requirement.
| Ruby series | Affected | Fixed in | Status |
|---|---|---|---|
| 4.0 | 4.0.0 – 4.0.9 | 4.0.10 | Patched |
| 3.4 | 3.4.0 – 3.4.12 | 3.4.13 | Patched |
| 3.3 | ≤ 3.3.13 | 3.3.14 | Patched (legacy maintenance) |
| 3.2 and older | all back to 2.4.0 | — | End of life, no patch |
Ruby 3.2 and older receive no fix. With 3.3.14 the project also renamed 3.3's status from security maintenance to legacy maintenance; support ends at the end of March 2027. Plan a jump to 3.4/4.0 now regardless of this advisory.
Check bundled runtimes too — the affected code is Ruby core, so any product that ships an interpreter inherits it: GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Discourse, Chatwoot, and the runtimes embedded in Puppet and Fluentd. Update the product, not just the OS package, and redeploy container images.
The patch train is larger than one German letter. All seven disclosures (ruby-lang.org announcement), with PoCs proving code execution for several:
| Advisory | Severity | Issue |
|---|---|---|
| GHSA-34m4-m9fh-gqp5 | Critical | Heap overflow in case conversion (Ruby2Shell) |
| GHSA-7x2q-68qv-6p8x | Critical | Double free compiling crafted Regexp (&& intersection) |
| GHSA-3p8q-wmhx-vm2w | Critical | Heap overflow when compiled Regexp size overflows |
| GHSA-87fm-7w84-j2px | High | Integer overflow in case conversion (>4 GiB result) |
| GHSA-7whj-cfh7-xgm4 | High | Heap overflow in Regexp#to_s |
| GHSA-wpqw-5qxg-m68r | High | Out-of-bounds read in case-insensitive matching |
| GHSA-pvgc-g7gj-pv6h | Moderate | Out-of-bounds read in case-insensitive backreferences |
The Regexp flaws matter wherever an application compiles attacker-controlled patterns; the case-conversion pair fires on plain string munging. Ruby's own announcement confirms PoCs demonstrating remote code execution for several of these.
ruby -v # what the shell sees
rvm use 4.0.10 && ruby -v # or rbenv: rbenv global 4.0.10
bundle exec ruby -v # what your app actually runs
# Bundled runtimes (examples)
sudo gitlab-ctl status # GitLab → vendor-fixed release
sudo systemctl restart puppet fluentd # services embedding Ruby
Then restart every process that loaded the old interpreter — a running process keeps the vulnerable code in memory even after the file on disk is fixed — and rebuild containers from updated base images rather than patching layers. Finally, verify with the application's Ruby, not the system one: containers, rbenv shims and vendor-bundled interpreters drift apart quickly.
Bottom line: Ruby2Shell is one byte past the end of a buffer, reachable without authentication through code Rails and classic Sinatra run by default, with public RCE proof-of-concepts. Update to 3.3.14 / 3.4.13 / 4.0.10, redeploy images, restart services, and treat any Ruby 3.2-or-older runtime still in your fleet as an emergency migration trigger.