Ruby2Shell (CVE-2026-132825): Default Rails and Sinatra Apps Are Reachable Without a Login, and the PoC Has a Date
A one-byte heap overflow in Ruby's case conversion is reachable from an unauthenticated Rails or Sinatra form post, and a public proof of concept is expected as early as November 25. The inventory-and-upgrade runbook for teams running Ruby.
Researchers published the details of Ruby2Shell (CVE-2026-132825, GHSA-34m4-m9fh-gqp5) on November 20 with a countdown attached: Veria Labs says it will release a proof of concept as early as November 25. Ruby already rates the bug critical and says it knows of proofs of concept that reach remote code execution in some scenarios. Fixed interpreters shipped on November 18. The window between “patch available” and “exploit available” is now measured in days, and the work that eats most of it is not patching — it is finding every place your Ruby runtime is pinned.

What is broken, and why your app code does not matter
The bug is a one-byte heap overflow in Ruby’s string case conversion. Most single-byte encodings have no capital form of the German sharp s, so when Ruby upcases ß it writes two bytes, SS. The case-mapping loop in 14 ISO-8859 and Windows-125x encodings, including ISO-8859-1 and Windows-1252, reserved room for only one byte. The fix is a one-line bound check per encoding, and the vulnerable loop has been reachable through upcase, swapcase, downcase(:fold) and casecmp? since Ruby 2.4.0.
That sounds like it requires an app that deliberately handles Latin-1 text. It does not. Rack’s multipart parser lets a client declare the charset of a text/plain form field, and Rack::MethodOverride calls upcase on the _method field of form POSTs. Rails includes that middleware in its default stack and classic Sinatra enables method override, which is why Veria Labs reports that default apps reach the bug without authentication. Sourcegraph, whose writeup traces these source paths, notes it did not independently reproduce code execution through this route.
MITRE scored the CVE 7.4 with a local attack vector. Ruby, which has working proofs of concept, rates it critical, and Veria Labs lists the access needed as “network, no authentication.” Trust the vendor’s severity here. This is also why treating a CVE as a triage problem — not a dashboard entry — matters, a pattern Cloudflare’s Zero Wire briefing workflow for CVE triage makes explicit for agent operators (see Cloudflare Zero Wire Turns a Critical CVE Into a Triage Briefing and a Read-Only Agent Check).
The affected versions
| Ruby series | Affected | Fixed release |
|---|---|---|
| 2.4 through 3.2 | Yes | None — 3.2 is EOL |
| 3.3.x | 3.3.0–3.3.13 | 3.3.14 |
| 3.4.x | 3.4.0–3.4.12 | 3.4.13 |
| 4.0.x | 4.0.0–4.0.9 | 4.0.10 |
The same releases fix six other memory safety bugs in the regexp engine and case conversion; upgrading fixes all seven. Ruby’s downloads page lists 4.0.10 as the current stable release, with 3.3.14 in legacy maintenance and 3.2.11 explicitly EOL.

Why finding Ruby is the hard part
A Ruby version is written down in half a dozen places per repo, and they disagree: .ruby-version says one thing, the Dockerfile’s ARG RUBY_VERSION another, CI pins a third, and Gemfile.lock records whatever the last developer had installed. The version that matters — the interpreter in the production image — is frequently the least obvious of them.
Then there is the Ruby you did not write. Packaged GitLab, GitHub Enterprise Server, Mastodon, Discourse, OpenProject and Chatwoot can ship their own runtime, and upgrading the host Ruby does nothing for a bundled one. As of Veria Labs’ November 19 update, Mastodon 4.7.6, OpenProject 17.9.8 and the Discourse Docker base had moved to Ruby 4.0.10, while GitLab 19.6.0 (Ruby 3.3.13), GitHub Enterprise Server 3.22.5 (Ruby 4.0.9) and Chatwoot 4.20.0 (Ruby 3.4.4) were listed as affected.

Sourcegraph’s writeup includes Code Search queries that inventory pinned base images, version files, lockfiles, distribution packages, bundled product images and legacy-encoding application code — with the caveat that the version-specific regexes match old pins, not installed interpreters, and that floating tags like ruby:3.4-slim pick up the fix on the next rebuild only if nothing caches the old image. Its Deep Search prompt reconciles build stages, floating versions and fixtures that a regex cannot, and an Agentic Batch Changes prompt proposes one upgrade PR per repo. Both outputs still need human review: builder stages, internal image tags and repo-specific configuration do not resolve themselves. If your agents install any package or base image their output suggests, treat the sweep the same way you would gate suspicious installs — the slopsquatting defense for Claude Code and Codex applies directly to the registry checks this CVE demands.
The upgrade sequence, in order
- Assume exposure. Any internet-facing Rails or Sinatra app that ran on an affected Ruby is possibly compromised until you can show otherwise.
- Patch the internet-facing apps first, then everything else, including background workers that process uploaded or imported text.
- Rebuild, don’t redeploy. Bump pinned tags to 3.3.14, 3.4.13 or 4.0.10 and pull fresh base images so CI cannot ship the old interpreter tomorrow.
- Restart every Ruby process. Puma, Unicorn, Passenger, Sidekiq and anything else that loaded the old libruby. Check the version each running process reports, not the one on PATH.
- Chase the bundled Ruby in packaged GitLab, GHES, Mastodon, OpenProject, Discourse and Chatwoot, and limit access until vendor fixes land.
- Plan migration off Ruby 3.2 and earlier, which gets no fix, and keep those apps off the public internet until it is done.
- Rotate what the app can read — Rails
secret_key_base, database credentials, API keys and cloud credentials in the environment. - Hunt: worker segfaults, unexpected child processes from the app user, new files in the app directory, and multipart POSTs whose
_methodfield declares a single-byte charset and carries a long run of ß characters.
What this means for agent-run fleets
Two things make this story bigger than one CVE. First, coding agents now routinely scaffold, run and deploy Rails and Sinatra services, so the vulnerable runtime may live in an agent-managed workspace nobody inventoried. If your agents pin Ruby, check whether their scaffolds generate ARG RUBY_VERSION lines with affected versions — and whether the images they deploy were rebuilt after November 18.
Second, the pattern is repeating. Sourcegraph’s series covers php2shell, Java4Shell and now Ruby2Shell, and its closing observation is the operational lesson: the time between patch available and exploit available keeps shrinking, and the bottleneck is still finding every place the runtime is pinned. Teams that keep a runtime inventory — the same discipline as an allowlist or patch clock for agent gateways — turn this from an emergency into a two-day PR sweep. Those that don’t get to find out what a public proof of concept does to unpatched apps on November 25.
Sources: Sourcegraph’s Ruby2Shell writeup, Ruby’s security advisories, Ruby downloads, and ruby/ruby releases.