Ruby2Shell: Critical Heap Overflow in Ruby Puts Default Rails APIs at Risk

A critical remote code execution flaw dubbed Ruby2Shell, tracked as CVE-2026-132825, has been disclosed in Ruby's case-conversion code for string handling. The one-byte heap overflow can be triggered without authentication on default Rails and classic Sinatra applications, according to researchers at Veria Labs. The bug stems from how legacy single-byte encodings handle the German sharp s character, which expands to two bytes when uppercased and overruns a buffer sized only for one. Affected Ruby versions include 2.4.0 through 3.3.13, 3.4.0 through 3.4.12, and 4.0.0 through 4.0.9, with fixes available in 3.3.14, 3.4.13, and 4.0.10, while Ruby 3.2 and older receive no patch.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in