العربية
🚨 BreakingSonicWall Gen 6 Firewalls Reach End of Security Patches

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.

Source image for: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE
Image: SecurityWeek

⚡ 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