--- title: "Ruby2Shell CVE-2026-132825: Rails, Sinatra RCE, Patch Ruby" url: https://playciso.com/blog/ruby2shell-cve-2026-132825 updated: 2026-11-20 section: Blog publisher: PlayCISO --- # Ruby2Shell CVE-2026-132825: Rails, Sinatra RCE, Patch Ruby > Ruby2Shell (CVE-2026-132825) is a one-byte heap overflow in Ruby case conversion that Veria says hits Rails by default. Fixed in 3.3.14, 3.4.13, 4.0.10. Source: https://playciso.com/blog/ruby2shell-cve-2026-132825 · Published: 2026-11-20 · Publisher: PlayCISO (https://playciso.com) Primary source: https://www.ruby-lang.org/en/news/2026/11/18/multiple-vulnerabilities-in-regexp-and-string/ --- **A bug in the Ruby interpreter itself, not in a gem, can let an attacker corrupt memory in Rails apps, and a public proof of concept is scheduled for next week.** On **18 November 2026** the Ruby project published [a security advisory covering seven vulnerabilities](https://www.ruby-lang.org/en/news/2026/11/18/multiple-vulnerabilities-in-regexp-and-string/) and released **Ruby 4.0.10, 3.4.13 and 3.3.14**. One of them, [GHSA-34m4-m9fh-gqp5](https://github.com/ruby/ruby/security/advisories/GHSA-34m4-m9fh-gqp5), now **CVE-2026-132825**, is a one-byte heap buffer overflow when Ruby changes the case of a string in certain legacy single-byte encodings. On **19 November** [Veria Labs named it Ruby2Shell](https://verialabs.com/ruby2shell/) and said Rails and classic-style Sinatra applications reach it in their default configuration without authentication. No exploitation is reported, and the CVE is not in CISA's Known Exploited Vulnerabilities catalog. **Who this is for:** CISOs, vulnerability-management and platform leads, and anyone who runs Rails or Sinatra apps, Ruby container images, or self-hosted products that ship their own Ruby. *Based on Ruby's advisory and release posts, the GitHub advisory, the CVE record, CISA's KEV list, FIRST EPSS, the Ubuntu, Debian and Red Hat trackers, GitLab's and Mastodon's release notes and Veria Labs' page, all read on 20 November 2026. PlayCISO is not affiliated with Veria Labs or the Ruby project. We explain the flaw class only and publish no trigger details.* Confirmed vs not yet known **Ruby confirms:** a one-byte heap-based buffer overflow in string case conversion for certain single-byte encodings such as ISO-8859-1 and Windows-1252, which "may allow remote code execution in some scenarios". Affected: Ruby 3.3.13 and earlier, 3.4.0 through 3.4.12, 4.0.0 through 4.0.9. Fixed in 4.0.10, 3.4.13 and 3.3.14. Ruby 3.2 and earlier are end of life and will not get the fix. Ruby rates the GitHub advisory Critical. **Veria Labs says:** Rails and classic-style Sinatra apps are reachable by default without authentication; plain Rack and other frameworks are not exposed by default; UTF-8 strings use an unaffected path; the code dates from Ruby 2.4.0; and it demonstrated remote code execution on stock Rails. **CISA:** its enrichment of the CVE record (19 November) says "Exploitation: none", "Automatable: no", "Technical impact: total". Not in the KEV catalog when we checked. EPSS on 19 November: 0.00174. **Not yet known:** any statement from the Rails or Sinatra projects (we found none); how reliable exploitation is across real deployments; and what happens after Veria publishes its proof of concept, which it schedules for **25 November 2026** (later if major vendors have not shipped fixes). ## Affected and fixed Ruby versions | Branch | Affected (ruby-lang.org) | Fixed release (18 Nov 2026) | | --- | --- | --- | | Ruby 4.0 | 4.0.0 through 4.0.9 | 4.0.10 | | Ruby 3.4 | 3.4.0 through 3.4.12 | 3.4.13 | | Ruby 3.3 | 3.3.13 and earlier | 3.3.14 (3.3 is in security maintenance) | | Ruby 3.2 and older | Affected; Veria says back to 2.4.0 | None: end of life, "will not receive these fixes" (Ruby) | - Where sources differ, we follow ruby-lang.org. Ruby lists the 3.3 line as "3.3.13 and earlier"; Veria writes 3.3.0 to 3.3.13 and puts older branches back to 2.4.0 in a separate row. Ruby does not state when the bug was introduced; the 2.4.0 date is Veria's. - Severity is disputed. GitHub advisory: Critical, no score. CVE record (CNA MITRE): CVSS 3.1 7.4, AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H, CWE-122. Red Hat: Critical, preliminary 9.8 with a network vector. Ubuntu: Medium priority. The local vector in the CVE record does not match Veria's claim of unauthenticated network reach in Rails; decide on your own exposure. - The same releases fix six more issues, including a second case-conversion overflow (GHSA-87fm-7w84-j2px, integer overflow) and several regular-expression memory bugs that Ruby says may allow RCE where applications compile attacker-controlled patterns. Take the whole release. - No workaround. Ruby lists none. Updating Rails or Sinatra gems does not help; the fix is in the interpreter. ## Who is exposed - Rails applications on an affected Ruby, per Veria: reachable in the default configuration, before login. - Classic-style Sinatra applications on an affected Ruby, per Veria, which names the classic style specifically. - Plain Rack and other frameworks: not exposed by default, per Veria. - Custom code anywhere that changes the case of untrusted strings in a legacy single-byte encoding (Ruby names ISO-8859-1 and Windows-1252 as examples). UTF-8 strings are not affected, per Ruby's description and Veria. Red Hat notes that exploitation depends on non-UTF-8 handling and complex memory layout manipulation, and that most default deployments use UTF-8. Veria's point is that common frameworks reach the legacy path anyway, so do not use "we are a UTF-8 shop" as a reason to wait. - Self-hosted products that bundle Ruby: a system Ruby upgrade does not fix them. See the vendor section below. ## How to check your estate - Run ruby -v on every app server, worker and job runner, and inside every container image that runs Ruby. Version managers (rbenv, rvm, asdf, chruby) can leave several Rubies on one host; check the one the app server actually uses. - Read .ruby-version, the ruby line in the Gemfile and RUBY VERSION in Gemfile.lock across repositories, and the Ruby tag in each Dockerfile base image. - List self-hosted products that run on Ruby (source control, chat and helpdesk, project management, forums, social platforms, configuration-management agents) and ask each vendor which Ruby its current build ships. - Distribution packages carry their own version strings. On 20 November Debian listed its ruby3.1 and ruby3.3 packages as unfixed, Ubuntu listed its Ruby packages as "needs evaluation", and Red Hat's page listed no errata yet. Track your vendor's advisory rather than the upstream number. ## Products that ship their own Ruby | Product | Status | Source | | --- | --- | --- | | GitLab (self-managed) | Fixed 20 Nov 2026 in 19.6.1, 19.5.8 and 19.4.10 by updating the bundled Ruby; self-compiled installs should rebuild with Ruby 3.3.14 or 3.4.13 | GitLab patch release | | Mastodon | 4.7.6 updates the Ruby in the Docker images; non-Docker installs should use Ruby 4.0.10, 3.4.13, 3.3.14 or newer | Mastodon v4.7.6 release | | GitHub Enterprise Server | 3.22.5 and earlier listed as unpatched, no fixed release yet | Veria Labs (not confirmed by GitHub in what we read) | | Chatwoot, OpenProject, Discourse | Veria lists fixed releases (Chatwoot 4.20.1; OpenProject 17.9.8 and 17.8.3; Discourse base image 2.0.20261119-0203) | Veria Labs (we did not confirm these at the vendors) | This is not a complete list. Any appliance or agent that embeds a Ruby runtime needs its vendor's fixed build. ## How the flaw works, in plain terms When Ruby converts a string to upper or lower case, some characters in some encodings become longer than they were. Ruby allocates a buffer for the result, and for certain single-byte encodings the bounds check did not account for that growth, so the conversion could write one byte past the end of the buffer. A single byte sounds small, but heap metadata and neighbouring objects sit right there, and a controlled one-byte overwrite is a well-known starting point for code execution in memory-unsafe code. Veria's finding is that common web frameworks perform this conversion on request data before the application's own code runs. We do not describe which inputs or encodings reach it. ## Timeline | Date | Event | Source | | --- | --- | --- | | 18 Nov 2026 | Ruby publishes its advisory on seven Regexp and string case-conversion vulnerabilities and releases 4.0.10, 3.4.13 and 3.3.14; CVE IDs "requested but not yet assigned" | ruby-lang.org | | 19 Nov 2026 | GitHub advisory GHSA-34m4-m9fh-gqp5 published (Critical); credits Stephan Lipp (Ada Logics) and Anthropic | GitHub (ruby/ruby) | | 19 Nov 2026 | CVE-2026-132825 published by MITRE as CNA (CVSS 3.1 7.4); CISA enrichment: exploitation none | CVE record | | 19 Nov 2026 | Veria Labs publishes Ruby2Shell, says Rails and classic Sinatra are reachable by default; Mastodon 4.7.6 updates Ruby in its images | Veria Labs, Mastodon | | 20 Nov 2026 | GitLab ships 19.6.1, 19.5.8 and 19.4.10 with an updated bundled Ruby; Veria updates its page | GitLab, Veria Labs | | 25 Nov 2026 (planned) | Veria Labs' scheduled proof-of-concept release, later if major vendors have not shipped fixes | Veria Labs | ## What security leaders should do this week - Upgrade Ruby before 25 November. Move to 4.0.10, 3.4.13 or 3.3.14 (or your distribution's fixed package once it ships), then restart Puma, Unicorn, Passenger, Sidekiq and every other Ruby process so no old workers keep running. - Rebuild and redeploy container images. An image built on an old ruby: base keeps the vulnerable interpreter until it is rebuilt with a fixed base and redeployed. Pin the patched tag in CI. - Get fixed builds from vendors that bundle Ruby. GitLab and Mastodon have shipped. For anything without a fix, such as GitHub Enterprise Server per Veria, restrict who can reach it until the vendor releases one. - Plan off Ruby 3.2 and older. Ruby will not fix them. If an upgrade cannot happen this week, record the exception with an owner and a date in your [risk register](/tools/risk-register) and limit network exposure in the meantime. - Do not stop at "we use UTF-8". Veria says the default framework path reaches the legacy encoding code. Audit custom code that case-converts input from other encodings, but patch regardless. - Prioritise with data and re-check during the week. It is not in KEV today and EPSS is low, but a public proof of concept usually changes both. Use the [SSVC calculator](/tools/ssvc-calculator), the [EPSS lookup](/tools/epss-lookup) and the [vulnerability prioritizer](/tools/vulnerability-prioritizer) to set the deadline. This is the same pattern as [phpAfterShell](/blog/phpaftershell-cve-2026-126714), [PHP2Shell](/blog/php2shell-ai-agent-credential-harvesting) and [Java4Shell](/blog/java4shell-cve-2026-114938-java-patch): a flaw in the language runtime that every application on it inherits, fixed only by upgrading the runtime itself. PHP2Shell went from fix to mass exploitation within days. For the Ruby project's entry, see [Ruby in the Breach Index](/breach-index/ruby). Ruby2Shell is a vulnerability in Ruby, not a breach of the Ruby project. ## Frequently asked questions ### What is Ruby2Shell? Ruby2Shell is the name Veria Labs gave to CVE-2026-132825 (GitHub advisory GHSA-34m4-m9fh-gqp5), a one-byte heap buffer overflow in the Ruby interpreter's string case conversion. Ruby says it affects certain single-byte encodings such as ISO-8859-1 and Windows-1252 and "may allow remote code execution in some scenarios". Ruby fixed it on 18 November 2026 in Ruby 4.0.10, 3.4.13 and 3.3.14. ### Which Ruby versions are affected by CVE-2026-132825? Per ruby-lang.org: Ruby 3.3.13 and earlier, 3.4.0 through 3.4.12, and 4.0.0 through 4.0.9. Ruby 3.2 and earlier are end of life and will not receive the fix. Veria Labs says the flawed code has been present since Ruby 2.4.0. ### Which Ruby versions fix Ruby2Shell? Ruby 4.0.10, 3.4.13 and 3.3.14, released on 18 November 2026. Ruby lists no workaround. Updating the Rails or Sinatra gems does not fix it, because the bug is in the interpreter. ### Are Rails and Sinatra apps affected by Ruby2Shell? Veria Labs says Rails and classic-style Sinatra applications reach the vulnerable code in their default configuration, without authentication, when they run on an affected Ruby. It says plain Rack and other frameworks are not exposed by default, but any code that changes the case of untrusted strings in a legacy single-byte encoding may be. We found no statement from the Rails or Sinatra projects. Red Hat notes most default deployments use UTF-8, which Veria and Ruby say takes an unaffected code path. Treat any Rails or classic Sinatra app on an affected Ruby as exposed and upgrade. ### Is Ruby2Shell being exploited? No exploitation has been reported. On 19 November 2026 CISA's enrichment of the CVE record said "Exploitation: none", "Automatable: no" and "Technical impact: total", and the CVE was not in CISA's Known Exploited Vulnerabilities catalog when we checked. Veria Labs says it will publish a proof of concept against stock Rails on 25 November 2026, or later if major vendors have not shipped fixes, so plan to be patched before then. ### How severe is CVE-2026-132825? Sources disagree. Ruby's GitHub advisory rates it Critical without a CVSS score. The CVE record (CNA MITRE) scores it CVSS 3.1 7.4 with a local attack vector and high complexity. Red Hat rates it Critical with a preliminary 9.8 network vector, and Ubuntu gives it Medium priority. Rate it on your own exposure: an internet-facing Rails app on an affected Ruby is the high end. ### Do products that bundle Ruby need their own fix? Yes. Self-hosted products that ship their own Ruby are only fixed when the vendor ships a release with a patched Ruby. GitLab did so on 20 November 2026 in 19.6.1, 19.5.8 and 19.4.10, and Mastodon 4.7.6 updated the Ruby in its Docker images. Veria Labs lists GitHub Enterprise Server 3.22.5 and earlier as still unpatched when it last updated its page. Ask every vendor whose product runs Ruby for its fixed build. ### Was Ruby hacked? No. Ruby2Shell is a vulnerability in the Ruby interpreter, not a breach of ruby-lang.org or the Ruby project. The exposure is to organisations running an unpatched Ruby. ## Sources - [ruby-lang.org: Security advisories: multiple vulnerabilities in Regexp and String case conversion, 18 November 2026](https://www.ruby-lang.org/en/news/2026/11/18/multiple-vulnerabilities-in-regexp-and-string/) - [ruby-lang.org news 2026: Ruby 4.0.10, 3.4.13 and 3.3.14 released, 18 November 2026](https://www.ruby-lang.org/en/news/2026/) - [GitHub advisory GHSA-34m4-m9fh-gqp5: Heap buffer overflow in case conversion of strings (ruby/ruby)](https://github.com/ruby/ruby/security/advisories/GHSA-34m4-m9fh-gqp5) - [CVE.org: CVE-2026-132825](https://www.cve.org/CVERecord?id=CVE-2026-132825) (CNA MITRE; CVSS 3.1 7.4; CWE-122; CISA enrichment) - [CISA Known Exploited Vulnerabilities catalog](https://www.cisa.gov/known-exploited-vulnerabilities-catalog) (not listed, catalog version 2026.11.18) - [Ubuntu: CVE-2026-132825](https://ubuntu.com/security/CVE-2026-132825), [Debian security tracker](https://security-tracker.debian.org/tracker/CVE-2026-132825) and [Red Hat: CVE-2026-132825](https://access.redhat.com/security/cve/CVE-2026-132825) - [GitLab Patch Release 19.6.1, 19.5.8, 19.4.10, 20 November 2026](https://docs.gitlab.com/releases/patches/patch-release-gitlab-19-6-1-released/) - [Mastodon v4.7.6 release notes](https://github.com/mastodon/mastodon/releases/tag/v4.7.6) - [Veria Labs: Ruby2Shell, 19 November 2026 (updated 20 November)](https://verialabs.com/ruby2shell/)