Ruby has issued fresh security updates that resolve seven vulnerabilities affecting its regular expression engine and string case-conversion operations. Proof-of-concept (PoC) code demonstrating remote code execution (RCE) is available for five of these issues.
At the top of the list is CVE-2026-132825 (CVSS 7.4), a heap-based buffer overflow in string case conversion that could lead to RCE under certain conditions. The flaw, dubbed Ruby2Shell, impacts character case-conversion operations. In single-byte encodings such as ISO-8859-1 and Windows-1252, Ruby may write one byte past the allocated output buffer when converting strings. For example, converting the German character ß to uppercase produces SS; the code checks for space for one byte but writes two, potentially corrupting adjacent heap memory.
According to Veria Labs, unauthenticated attackers could trigger the defect from Rails, classic-style Sinatra, and potentially other frameworks in default Ruby configurations. WatchTowr states that any Ruby application changing the case of external text in a single-byte encoding is affected. GitHub Enterprise Server is confirmed vulnerable, while Chatwoot, GitLab, Mastodon, OpenProject, and the Discourse base image have already released patches.
Successful exploitation of Ruby2Shell in production is likely difficult. Correct memory layout, specific non-glibc allocators, runtime configuration, and application logic preconditions are required, and attackers must also defeat Address Space Layout Randomization (ASLR). Malformed requests are more likely to result in denial-of-service (DoS) conditions.
The remaining four vulnerabilities with RCE PoCs include a double free, two integer overflows, and another heap-based buffer overflow. An additional out-of-bounds read in the regular expression engine can cause memory leaks and process crashes. All seven issues are fixed in Ruby versions 4.0.10, 3.4.13, and 3.3.14.


