A heap-based buffer overflow in Ruby’s string case conversion, tracked as CVE-2026-132825 and dubbed “ruby2ßhell”, has been disclosed. The Ruby core team rates the issue critical and states that changing the case of a crafted string may allow remote code execution, adding that it is aware of proof-of-concept exploits that can trigger code execution in some scenarios. Fixed versions, Ruby 3.3.14, 3.4.13 and 4.0.10, were released on November 18, 2026.
Ruby powers a large number of web applications and widely used self-hosted platforms. According to the researchers who published the ruby2ßhell write-up, the flaw is reachable without authentication in default Ruby on Rails and classic-style Sinatra applications, as well as in self-hosted software such as GitLab, GitHub Enterprise Server, Mastodon and Discourse. The vulnerable code has been present since Ruby 2.4.0. The same Ruby release also fixes six additional memory-safety vulnerabilities in Ruby’s regular expression engine and string case conversion.
ruby2ßhell (CVE-2026-132825): key facts
| Fact | Detail |
| CVE | CVE-2026-132825 (GitHub advisory GHSA-34m4-m9fh-gqp5) |
| Type | One-byte heap-based buffer overflow (CWE-122 / CWE-193) in string case conversion |
| Severity | Rated critical by the Ruby core team; NVD score pending |
| Trigger | Changing the case (e.g., upcase) of a crafted string in certain single-byte encodings, such as ISO-8859-1 or Windows-1252; UTF-8 strings are not affected |
| Affected Ruby versions | 3.3.13 and earlier; 3.4.0 to 3.4.12; 4.0.0 to 4.0.9 (end-of-life versions back to 2.4.0, according to the researchers) |
| Fixed Ruby versions | 3.3.14, 3.4.13, 4.0.10 (released November 18, 2026) |
| Exposure | According to the researchers: reachable without authentication in default Rails and classic-style Sinatra apps, and in GitLab, GitHub Enterprise Server, Mastodon, Discourse and other self-hosted software |
| Workaround | None published; upgrade Ruby (and self-hosted software that bundles Ruby) |
| Exploitation | No known in-the-wild exploitation; the Ruby team is aware of non-public PoCs, and the researchers plan to publish a PoC about a week after disclosure |
What is ruby2ßhell (CVE-2026-132825)?
The flaw is in how Ruby converts the case of strings in several single-byte encodings, including ISO-8859-1, ISO-8859-2 and other ISO-8859 variants, and Windows-1250, Windows-1252, Windows-1254 and Windows-1257. In these encodings, the German sharp s (“ß”, byte 0xDF) becomes two characters (“SS”) when upper-cased, but Ruby checked for only one byte of room in the output buffer. A crafted string containing enough of these characters makes Ruby write one byte past the end of a heap buffer. The researchers note that the issue can be reached through upcase, swapcase, downcase(:fold) and casecmp?, while UTF-8 strings take a different code path and are not affected.
Although the overflow is only a single byte, heap memory corruption of this kind can be leveraged for code execution. The Ruby core team states that it is aware of PoCs that use the flaw to trigger remote code execution in some scenarios. The Ruby team rates the advisory critical, and the researchers describe unauthenticated remote exposure in common frameworks; organizations should treat internet-facing Ruby applications as at risk.
Which Ruby versions are affected?
| Ruby branch | Affected versions | Fixed version |
| Ruby 4.0 | 4.0.0 to 4.0.9 | 4.0.10 |
| Ruby 3.4 | 3.4.0 to 3.4.12 | 3.4.13 |
| Ruby 3.3 | 3.3.13 and earlier | 3.3.14 |
| Ruby 3.2 and earlier | Affected (back to 2.4.0, according to the researchers) | No fix: end of life, upgrade to a supported branch |
Ruby 3.2 and earlier have reached end of life and will not receive these fixes. Ruby is often bundled inside applications and container images, so self-hosted platforms (such as GitLab, GitHub Enterprise Server, Mastodon, Discourse, OpenProject and Chatwoot, which the researchers list as affected in their latest versions at the time of disclosure) need their own vendor updates. Linux distributions may ship the fix as a patched package without changing the Ruby version number, so check the relevant distribution advisory.
Additional Ruby vulnerabilities fixed in the same release
Ruby 3.3.14, 3.4.13 and 4.0.10 fix seven vulnerabilities in total. Besides ruby2ßhell, the release addresses six other memory-safety flaws. The Ruby team says it is aware of proof-of-concept exploits proving remote code execution for five of the seven vulnerabilities, including CVE-2026-132825. At the time of writing, these are tracked by GitHub advisory IDs, as CVE identifiers had not yet been assigned:
- GHSA-87fm-7w84-j2px (high): integer overflow in string case conversion leading to a heap buffer overflow.
- GHSA-7x2q-68qv-6p8x (critical): double free in regular expression compilation, relevant to applications that compile attacker-controlled patterns.
- GHSA-3p8q-wmhx-vm2w (critical): heap buffer overflow in regular expression compilation.
- GHSA-7whj-cfh7-xgm4 (high): heap buffer overflow in Regexp#to_s.
- GHSA-wpqw-5qxg-m68r (high): out-of-bounds read in case-insensitive regular expression matching.
- GHSA-pvgc-g7gj-pv6h (medium): out-of-bounds read in case-insensitive backreference matching, which may disclose memory or crash the process.
Upgrading to a fixed Ruby version addresses all seven vulnerabilities.
Is there a patch for CVE-2026-132825?
Yes. The Ruby core team released Ruby 4.0.10, 3.4.13 and 3.3.14 on November 18, 2026, and strongly recommends upgrading. The fix ensures that two bytes of output space are available when the sharp s is converted. Self-hosted software and container images that bundle Ruby need to be updated or rebuilt once their vendors ship versions based on the fixed Ruby releases.
How to mitigate ruby2ßhell
No official workaround has been published; upgrading Ruby is the fix. Recommended steps:
- Inventory all Ruby runtimes, including OS packages, Ruby installed via version managers or tarballs, Ruby bundled inside self-hosted applications, and container images.
- Upgrade to Ruby 3.3.14, 3.4.13 or 4.0.10, and move applications running end-of-life Ruby versions (3.2 and earlier) to a supported branch. These are fixes to the Ruby interpreter itself, not to a gem, so updating gems (for example with bundle update) does not address them.
- Update self-hosted platforms such as GitLab, GitHub Enterprise Server, Mastodon and Discourse as soon as their vendors release fixed versions, and rebuild container images on patched base images.
- Prioritize internet-facing Rails and Sinatra applications and other Ruby services that process untrusted input.
Is ruby2ßhell being exploited in the wild?
At the time of writing, there are no reports of in-the-wild exploitation. The Ruby core team states that it is aware of proof-of-concept exploits that can trigger remote code execution in some scenarios, but these have not been published. The researchers behind the ruby2ßhell write-up have said they plan to publish a proof of concept about a week after disclosure, which is likely to accelerate exploitation attempts. Given how widely Ruby is used in internet-facing applications, organizations should treat this vulnerability as urgent.
How can Orca help?
Orca enables customers to quickly identify assets running vulnerable Ruby versions, including Ruby installed from OS packages and Ruby bundled in container images, and to understand their exposure in context, including internet accessibility, runtime reachability and asset criticality, so they can prioritize remediation based on real risk rather than CVSS alone.
