Vulnerabilities

Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE

Tracked as CVE-2026-132825, the bug is a heap-based buffer overflow that could lead to remote code execution (RCE).

Exploited Vulnerabilities

Fresh security updates for the Ruby programming language resolve seven vulnerabilities in its regular expression engine and in the case conversion of strings. Proof-of-concept (PoC) code demonstrating remote code execution (RCE) exists for five of them.

At the top of the list sits CVE-2026-132825 (CVSS score of 7.4), described as a heap-based buffer overflow in the case conversion of strings that could potentially lead to RCE in certain scenarios.

Dubbed Ruby2Shell, the flaw impacts character case-conversion operations. In some single-byte encodings, including ISO-8859-1 and Windows-1252, when changing the case of a string, Ruby may end up writing one byte past the output buffer.

“For example, converting the German character ß to uppercase produces SS. In affected code, Ruby checks that sufficient space exists for one byte but writes two, potentially corrupting adjacent heap memory,” Previdian explains.

Veria Labs reports that, in default Ruby configurations, unauthenticated attackers could trigger the security defect from Rails, classic-style Sinatra, and potentially other frameworks.

According to preemptive exposure management firm WatchTowr, “any Ruby application that changes the case of external text in a single-byte encoding” is affected by the vulnerability.

Advertisement. Scroll to continue reading.

According to Veria Labs, which plans to release a PoC after major vendors have rolled out patches, GitHub Enterprise Server is affected. Chatwoot, GitLab, Mastodon, OpenProject, and the Discourse base image have patched the bug.

Successful exploitation of Ruby2Shell in production environments is likely to be challenging, WatchTowr principal threat intelligence specialist Yordan Ganchev told SecurityWeek.

According to him, correctly laying out memory is difficult, and “attackers would also need the right non-glibc memory allocator, runtime configuration, and application logic preconditions, making exploitation even more challenging.”

“And if that weren’t enough, they’d need to contend with anyone else hammering the system on the internet and, in the end, defeat Address Space Layout Randomization (ASLR), making the whole journey a complete odyssey,” Ganchev noted.

Most likely, malformed requests could lead to denial-of-service (DoS) and service disruption, he said.

The other four vulnerabilities with a PoC demonstrating RCE include a double free, two integer overflows, and a heap-based buffer overflow. CVE identifiers for these issues have been requested but not assigned yet. PoC code also exists for an out-of-bounds read, demonstrating memory corruption.

Ruby also resolved an out-of-bounds read in its regular expression engine that could lead to memory leaks and process crashes.

Patches for all seven vulnerabilities were included in Ruby versions 4.0.10, 3.4.13, or 3.3.14. Users are advised to apply the fixes as soon as possible.

Related: PHP Patches Seven Critical RCE Vulnerabilities

Related: Hackers Exploit Cisco Expressway Vulnerability Soon After PoC Release

Related: Critical Apache Roller, Axis Vulnerabilities Exploited in Attacks

Related: F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public

Related Content

Vulnerabilities

Tracked as CVE-2026-136858, the flaw allows attackers to impersonate a build agent and intercept builds assigned to it.

Vulnerabilities

A high-severity improper authorization flaw in the plugin could lead to sensitive information disclosure.

Vulnerabilities

Users should patch immediately, as proof-of-concept (PoC) exploit details are publicly available.

Vulnerabilities

Hardcoded credentials in the management platform could allow unauthenticated attackers to log in over SSH or obtain and/or modify sensitive information.

Mobile & Wireless

Google rolled out enhanced security and privacy features and improved scam protections for more Android users.

Vulnerabilities

Use-after-free was the most common type of bug, and the update patched 101 of them, including 14 rated ‘critical’.

Vulnerabilities

It allows attackers to obtain the storage path for files uploaded through forms, potentially leading to XSS attacks.

Vulnerabilities

The threat actor hit over 400 organizations, stealing, validating, and stockpiling high-value credentials.

Copyright © 2026 SecurityWeek ®, a Wired Business Media Publication. All Rights Reserved.

Exit mobile version