CriticalVulnerabilityMonitoring

Ruby2Shell: critical Ruby RCE flaws fixed in 4.0.10, 3.4.13, 3.3.14

Ruby fixed seven memory flaws, including critical Ruby2Shell (CVE-2026-132825); upgrade Ruby to 4.0.10, 3.4.13 or 3.3.14.

Published
Updated
Fixed in
Ruby 4.0.10, Ruby 3.4.13, Ruby 3.3.14
Exploitation
No, no in-the-wild exploitation reported in the sources; Ruby maintainers know of private proof-of-concept exploits and Veria Labs plans to publish one

Live scores

CVE-2026-132825
EPSS
0.020
some chance of attack soon
VEDAS
0.059
little exploit evidence
On CISA KEV
Not listed
Detection rule
Out of scope (local)

What happened

On 18 November 2026 the Ruby project announced seven vulnerabilities in its regular expression engine and in string case conversion, and released Ruby 4.0.10, 3.4.13 and 3.3.14 to fix them. The maintainers say they are aware of proof-of-concept exploits showing that some of the flaws can trigger remote code execution. ruby-lang.org CVE identifiers had not been assigned at that point, so the advisory used GitHub Security Advisory (GHSA) IDs. ruby-lang.org

The most serious is GHSA-34m4-m9fh-gqp5, which Veria Labs and The Hacker News report as tracked under CVE-2026-132825 and named Ruby2Shell. Veria Labs The Hacker News reports it is the only one of the seven with a CVE number so far; the other six are not confirmed as having one. The Hacker News Orca Security notes the NVD score was still pending when it wrote. Orca Security The CVE link above is an identifier link only; NVD record contents are not confirmed here.

Ruby2Shell. Veria Labs describes it as a one-byte heap overflow in Ruby’s string case conversion. Most single-byte encodings have no capital ß. Upcasing it writes two bytes (“SS”), but the loop checks for room for only one. An input with 21 of them overflows the output buffer by one byte. Veria Labs

  • The code is in several ISO-8859 and Windows-125x encodings and has been present since Ruby 2.4.0. It is reached through upcase, swapcase, downcase(:fold) and casecmp?. UTF-8 strings take a different code path and are not affected. Veria Labs
  • Veria Labs says it is reachable over the network without authentication in the default configuration of Rails and classic-style Sinatra. Other frameworks and plain Rack are not exposed by default, though application code that upcases strings received in a legacy encoding may also be vulnerable. Veria Labs
  • The Hacker News reports an analysis by Moritz Sanft tracing the path through Rack: it changes the case of one request field while processing a crafted form submission, so a new Rails app reaches the flaw before any of its own code runs. The Hacker News

The other six flaws, per the Ruby advisory:

  • GHSA-7x2q-68qv-6p8x: double free in regular expression compilation, with an RCE proof of concept. ruby-lang.org
  • GHSA-3p8q-wmhx-vm2w: heap overflow in regular expression compilation, with an RCE proof of concept. ruby-lang.org
  • GHSA-87fm-7w84-j2px: integer overflow in case conversion causing a heap overflow, with an RCE proof of concept. The Hacker News adds that the required size (over 4 GiB) puts it out of reach for most requests. The Hacker News
  • GHSA-7whj-cfh7-xgm4: heap overflow in Regexp#to_s, with an RCE proof of concept. ruby-lang.org
  • GHSA-wpqw-5qxg-m68r: out-of-bounds read in case-insensitive matching; the proof of concept shows attacker-controlled memory corruption. ruby-lang.org
  • GHSA-pvgc-g7gj-pv6h: out-of-bounds read in case-insensitive backreference matching that may disclose memory or crash the process. ruby-lang.org

The regex flaws matter chiefly where an application compiles attacker-controlled patterns. ruby-lang.org

Exploitation status. Aikido and Orca Security report no attacks so far. Aikido Orca Security Veria Labs says it will publish a proof of concept for remote code execution on stock Rails on 25 November 2026, or later if major vendors have not shipped a fix by then. Veria Labs

Am I affected?

You are affected if your Ruby is in these ranges. ruby-lang.org

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.13 and earlier3.3.14
3.2 and olderRuby2Shell affects all releases back to 2.4.0End of life, no fix

The flaws are in the interpreter, so updating gems or the framework does not replace a vulnerable Ruby. The version that matters is the one on application servers, background workers and container images. The Hacker News

Whether a given app can be reached depends on its input handling. For Ruby2Shell specifically, Rails and classic-style Sinatra are exposed by default. Veria Labs Aikido says exposure requires an app changing the case of untrusted strings in ISO-8859-x or Windows-125x encodings, which those frameworks do in their default setup. Aikido

Self-hosted software that bundles its own Ruby needs a vendor fix. Sources differ because they were written at different times:

  • Aikido, as of 19 November 2026, found the latest releases of GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot still bundled an affected Ruby. Aikido
  • Veria Labs, updated 21 November 2026, lists fixes for Chatwoot (4.20.1), GitLab (19.6.1, 19.5.8, 19.4.10), Mastodon (4.7.6, 4.6.12, 4.5.22, 4.4.29), OpenProject (17.9.8, 17.8.3) and the Discourse base image (2.0.20261119-0203). It lists GitHub Enterprise Server 3.22.5 and earlier as having no fixed release yet. Veria Labs

Orca Security notes that Linux distributions may ship the fix as a patched package without changing the Ruby version number, so check the distribution advisory. Orca Security

What to do now

  1. Inventory every Ruby runtime: OS packages, version managers, tarball installs, Ruby bundled in self-hosted apps, and container images. Orca Security
  2. Upgrade Ruby to 3.3.14, 3.4.13 or 4.0.10, then restart app servers and rebuild container images. Update anything that pins a Ruby version, such as Dockerfiles and .ruby-version files. Aikido Upgrading covers all seven flaws. Orca Security
  3. If you run Ruby 3.2 or older, move to a supported series; these releases will not get the fixes. ruby-lang.org
  4. For self-hosted products, install the vendor’s fixed release (see the versions above). Where no fixed release exists yet, Aikido suggests making the server private, for example behind a VPN or an IP allowlist, until it ships. Aikido
  5. Prioritise internet-facing Rails and Sinatra applications. Orca Security
  6. Track the six flaws without CVEs by their GHSA IDs in scanners and inventories until CVEs are assigned. The Hacker News

Aikido states that Ruby lists no workaround. Aikido

Update, 25 November 2026

  • SecurityWeek reports that CVE-2026-132825 (Ruby2Shell) has a CVSS score of 7.4. (securityweek.com)
  • Imperva says research by OpenAI’s security researchers using OpenAI Codex showed the flaws could be exploited through unauthenticated HTTP requests against Ruby on Rails applications, and that OpenAI also contributed to exploit validation, coordinated disclosure and remediation. (imperva.com)
  • Imperva says published research reached the Ruby2Shell flaw through Rack’s multipart form processing, with the _method parameter (used to override HTTP methods in HTML forms) as the unauthenticated entry point, and that researchers demonstrated remote code execution against vulnerable Rails apps without authentication. (imperva.com)
  • WatchTowr’s Yordan Ganchev told SecurityWeek that exploiting Ruby2Shell in production is likely to be challenging, because attackers would need the right non-glibc memory allocator, runtime configuration and application logic preconditions and would have to defeat ASLR. He said malformed requests would most likely cause denial of service. (securityweek.com)

Sources