← AUTOMATER NEWSROOM

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.

Diagram of an unauthenticated multipart form POST flowing through Rack's method override into Ruby case conversion, with the fixed Ruby releases and the announced proof-of-concept deadline.Diagram of an unauthenticated multipart form POST flowing through Rack's method override into Ruby case conversion, with the fixed Ruby releases and the announced proof-of-concept deadline.
The unauthenticated request path researchers describe for Ruby2Shell (CVE-2026-132825), from Rack::MethodOverride's upcase call into the affected case-conversion loop, alongside the fixed Ruby releases and the announced proof-of-concept date. Illustration: Automater.

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.

Sourcegraph blog post titled Ruby2Shell (CVE-2026-132825): find vulnerable Ruby across your repos before the proof of concept lands, dated November 20, 2026, with its summary recommending upgrade to Ruby 3.3.14, 3.4.13 or 4.0.10.
Sourcegraph's November 20, 2026 writeup of Ruby2Shell (CVE-2026-132825), as captured at the top of the article page. The visible headline and summary state that default Rails and classic Sinatra apps reach the bug without authentication and name the fixed Ruby versions. · Original source

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.

GitHub releases page for ruby/ruby showing the v4.0.10 release published November 18 with a security fixes section listing seven GHSA advisories including GHSA-34m4-m9fh-gqp5.
The ruby/ruby releases page on GitHub showing the v4.0.10 release published November 18, whose security fixes section lists seven GHSA advisories including the Ruby2Shell heap buffer overflow. Capture published by GitHub. · Original source

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.

Ruby language news index listing the November 18, 2026 security advisory for Regexp and String case conversion plus Ruby 4.0.10, 3.4.13 and 3.3.14 releases.
The ruby-lang.org news index showing the November 18, 2026 advisory on Regexp and String case conversion alongside the coordinated 4.0.10, 3.4.13 and 3.3.14 releases. Capture published by the Ruby language site. · Original source

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.

Response ladder for CVE-2026-132825 showing the ordered eight steps from assume exposure through hunt, with the files where a Ruby version pin can hide.Response ladder for CVE-2026-132825 showing the ordered eight steps from assume exposure through hunt, with the files where a Ruby version pin can hide.
The ordered response for Ruby2Shell, from assuming exposure on internet-facing Rails and Sinatra apps through hunting for signs of compromise, plus the files where a Ruby version pin hides. Illustration: Automater.

The upgrade sequence, in order

  1. Assume exposure. Any internet-facing Rails or Sinatra app that ran on an affected Ruby is possibly compromised until you can show otherwise.
  2. Patch the internet-facing apps first, then everything else, including background workers that process uploaded or imported text.
  3. 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.
  4. 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.
  5. Chase the bundled Ruby in packaged GitLab, GHES, Mastodon, OpenProject, Discourse and Chatwoot, and limit access until vendor fixes land.
  6. Plan migration off Ruby 3.2 and earlier, which gets no fix, and keep those apps off the public internet until it is done.
  7. Rotate what the app can read — Rails secret_key_base, database credentials, API keys and cloud credentials in the environment.
  8. Hunt: worker segfaults, unexpected child processes from the app user, new files in the app directory, and multipart POSTs whose _method field 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.

Sources

  1. Ruby2Shell (CVE-2026-132825): find vulnerable Ruby across your repos before the proof of concept lands | Sourcegraph
  2. Recent News | Ruby
  3. Download Ruby | Ruby
  4. Releases · ruby/ruby · GitHub