Arnica named High Performer, Easiest to Use, and Easiest Setup in G2's Winter 2027 Report.
blog
ATTACK

Ruby2Shell: Affected Versions, Fixes, and Where to Look First (CVE-2026-132825)

Posted 
December 3, 2026
|
0
 min
terminal view of "ruby2shell" text on it

Ruby2Shell (CVE-2026-132825) is a one-byte heap overflow in how Ruby changes the case of strings in some legacy single-byte encodings. The researchers who reported it say it can lead to code execution. Ruby fixed it in 3.3.14, 3.4.13 and 4.0.10.

Like Java4Shell and the NGINX HTTP/2 flaws earlier this week, it sits in the layer underneath your application. No Gemfile will ever list it, so a clean dependency scan tells you very little. The first question is not which gem is vulnerable. It is which Ruby runs where, and who owns it.

What happened

Ruby released 3.3.14, 3.4.13 and 4.0.10 on November 18, 2026, and published the advisory (GHSA-34m4-m9fh-gqp5) on November 19. The release fixes seven memory-safety issues in regular expression handling and string case conversion. Only the first has a CVE so far, CVE-2026-132825. The other six are waiting for CVE assignment.

The bug is an off-by-one error in the case conversion loop for several ISO-8859 and Windows-125x encodings. It has been in Ruby since 2.4.0. In most of these encodings the German character ß has no capital form. Upcasing it produces two bytes (SS), but the loop only checks for room for one. A crafted string with enough of these characters writes one byte past the end of the buffer.

The overflow is reached through case conversion methods such as upcase, swapcase, downcase(:fold) and casecmp?. UTF-8 strings take a different code path and are not affected by this flaw.

This is also the second Ruby security release in under a month. The October 23 release (4.0.9, 3.4.12 and 3.3.13) fixed regular expression compiler bugs behind a set of GitLab CVEs. If you patched then, you need to patch again.
‍

‍
How serious is it?

Two different severity pictures are in circulation, so it helps to separate them.

How the severity of Ruby2Shell is described
SourceWhat it says
CVE record (MITRE CNA, published November 19)CVSS 3.1 score of 7.4 (High). Local attack vector, high attack complexity, no privileges or user interaction required.
Ruby's advisory, as reportedRated Critical. Maintainers know of proof-of-concept exploits that achieve code execution in some scenarios. The researchers plan to publish theirs about a week after disclosure.
The reporting researchersReachable without authentication over the network in the default configuration of Rails and Sinatra (classic style). Other frameworks and plain Rack are not exposed by default, but application code that changes the case of legacy-encoded strings may be.

Our read: the CVE score describes the bug in isolation, while the advisory describes what the researchers say a real application exposes. Your exposure depends on which of your applications convert case on untrusted, legacy-encoded input, and that is hard to rule out from outside the code. Treat it as urgent and patch, rather than spending days trying to prove you are not exposed.

As of this writing, none of the sources we reviewed report exploitation in the wild, and the CVE is not in CISA's Known Exploited Vulnerabilities catalog. With a public proof of concept expected within about a week, that is a reason to move now, not a reason to wait.

Affected versions and fixes

Ruby versions affected by Ruby2Shell and fixed releases
Ruby seriesAffectedFixed in
4.04.0.0 to 4.0.94.0.10
3.43.4.0 to 3.4.123.4.13
3.33.3.0 to 3.3.133.3.14
3.2 and olderAll releases back to 2.4.0No fix. Ruby 3.2 reached end of life on April 1, 2026.

Upgrading to a fixed release covers all seven issues in the release. Ruby 3.3 is in its security maintenance phase, which runs until the end of March 2027, so a move to 3.4 or 4.0 is worth planning now.

Several widely used self-hosted products ship their own copy of Ruby, including GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot. As of November 19, the latest releases of these were reported to still bundle an affected Ruby. Check each vendor's release notes for a fixed version.

Why a clean dependency scan does not clear you

Ruby is the interpreter your application runs on, not a package it depends on. A Gemfile.lock lists gems. It records a Ruby version only if the Gemfile declares one, and then it records the version you asked for, not the one the container actually runs.

The real answer lives in Dockerfiles, .ruby-version and .tool-versions files, CI images, buildpacks, OS packages, and inside products that bundle their own Ruby. It is the same shape as Java4Shell and NGINX: a flaw in the runtime or server below your code never shows up in a dependency scan.

Where to look first

  1. Internet-facing Rails and Sinatra apps. These are the applications the researchers say are reachable in a default setup. Start with whatever an attacker can reach.
  2. Base images and Dockerfiles. Anything built FROM a Ruby image, or that installs Ruby from OS packages. Shared platform images matter most, because every service that inherits them inherits the exposure.
  3. Version pins and CI. Check .ruby-version, .tool-versions, the ruby line in your Gemfile, and the images and runners your pipelines build on.
  4. Self-hosted products that bundle Ruby. If you run one of the products above, restrict access with a VPN or an IP allowlist until the vendor ships a fixed release.
  5. Ruby 3.2 and older. These get no patch. Inventory them now and put a migration date on each.
  6. Application code, last. Search for case conversion on non-UTF-8 strings to help you prioritize. Do not use it as a reason to delay the upgrade.

What to do now

  1. Upgrade Ruby to 3.3.14, 3.4.13 or 4.0.10.
  2. Rebuild container images from a fixed base image and update anything that pins a Ruby version.
  3. Restart your application processes. A process that is already running keeps the old interpreter in memory until it restarts.
  4. Move off Ruby 3.2 and older.
  5. For self-hosted products, install the vendor's fixed release as soon as it ships.
  6. If you cannot upgrade yet, reduce exposure. The sources we reviewed list no official workaround, so limit internet access to affected systems and take non-essential Ruby applications offline until they are patched.

How Arnica helps

This is an inventory problem before it is a scanning problem. The question that decides how fast you can respond is where Ruby runs and who owns it.

With Arnica, you can find where Ruby is used across Dockerfiles, IaC and container images, and route each fix to the right owner. Arnica maps running images back to the repositories that build them and shows who owns each one, so a base image fix reaches every service that inherits it.

Frequently asked questions

Is Ruby2Shell being exploited?

As of November 19, none of the sources we reviewed report exploitation in the wild, and the CVE is not in CISA's Known Exploited Vulnerabilities catalog. Ruby's maintainers know of working proofs of concept, and the researchers plan to publish theirs in about a week.

Is Rails affected?

The researchers say Rails and Sinatra (classic style) apps are reachable without authentication in their default configuration. Other frameworks and plain Rack are not exposed by default, though application code that changes the case of legacy-encoded strings may be. Check Ruby's advisory for the current wording.

Am I safe if my app only uses UTF-8?

UTF-8 strings take a different code path and are not affected by this flaw. It is hard to prove from the outside that your application never handles ISO-8859 or Windows-125x strings, and the same release carries six other fixes, so plan to upgrade either way.

Does upgrading cover the other six issues?

Yes. Ruby 3.3.14, 3.4.13 and 4.0.10 contain the fixes for all seven.

I patched Ruby last month for the GitLab regular expression CVEs. Am I covered?

No. The October 23 releases (4.0.9, 3.4.12 and 3.3.13) came before the fix for this flaw. You need one of the November 18 releases.

Is there a workaround?

No official workaround is documented in the sources we reviewed. Upgrading is the fix. Until you can, restrict internet access to affected systems.

Does a clean Gemfile.lock mean I am not affected?

No. The flaw is in the Ruby interpreter, not in a gem, and a Gemfile.lock does not reliably record the Ruby version your containers run.

‍

Find every Ruby your team runs, and who owns it.

Map images and Dockerfiles back to the repositories that build them.

Book a Demo