Ruby2Shell CVE-2026-132825: Ruby Fixes Heap Overflow and 6 More Bugs
Ruby 4.0.10, 3.4.13 and 3.3.14 fix seven memory-safety bugs, led by Ruby2Shell (CVE-2026-132825), a case-conversion heap overflow reachable via Rails and Sinatra.

⚡ Why it matters
Ruby powers many web apps and PoCs exist for five of the bugs, so patching matters even though full RCE is hard to achieve.
The Ruby project has released security updates fixing seven vulnerabilities in its regular expression engine and string case conversion. Proof-of-concept code demonstrating remote code execution exists for five of them.
Ruby2Shell
The headline bug, CVE-2026-132825 (CVSS 7.4) and nicknamed Ruby2Shell, is a heap-based buffer overflow in case conversion for single-byte encodings such as ISO-8859-1 and Windows-1252. Some characters expand to two characters when upper-cased, but the code only reserves room for one byte.
Veria Labs says unauthenticated attackers could reach the bug in default setups through Rails and classic-style Sinatra. GitHub Enterprise Server is affected, while GitLab, Mastodon, Chatwoot, OpenProject and the Discourse base image have shipped fixes.
Exploitability
watchTowr notes that reliable RCE in production is difficult, requiring precise heap layout, specific allocator and runtime conditions, and an ASLR bypass. Denial of service is the more likely outcome of malicious requests.
Other fixes
The release also addresses a double free, two integer overflows, another heap overflow and out-of-bounds reads, including one in the regex engine that can leak memory or crash processes. Some still await CVE IDs.
Recommendations
- Upgrade to Ruby 4.0.10, 3.4.13 or 3.3.14.
- Apply vendor updates for Ruby-based products such as GitHub Enterprise Server as they become available.
- Review applications that change the case of external text in single-byte encodings.
🔗 Sources
This article is original reporting by the Security World editorial team based on the sources listed above; direct quotes are kept short and marked with quotation marks. Corrections and feedback: info [at] securitywd.net.
Related stories
Nexter Blocks Pro CVE-2026-125294 Lets Attackers Create WordPress Admins
A CVSS 9.8 flaw in the Nexter Blocks Pro WordPress plugin up to 5.0.10 lets unauthenticated attackers register accounts with full Administrator rights.
GPGME Flaw CVE-2026-129975: Malicious OpenPGP Keys Trigger Double Free
GnuPG fixed a critical double-free bug in the GPGME library, CVE-2026-129975, that a crafted OpenPGP key with an oversized user ID can trigger to leak app data.
SAP NetWeaver Portal CVE-2025-42884 Added to CISA KEV as Exploited
CISA says attackers are exploiting CVE-2025-42884, an unauthenticated JNDI injection flaw in SAP NetWeaver Enterprise Portal that SAP fixed in November 2025.


