Critical Ruby2Shell Flaw Allows Unauthenticated RCE in Rails and Sinatra Applications

Verialabs disclosed Ruby2Shell, a critical one-byte heap buffer overflow in Ruby's native string case conversion routines leading to unauthenticated remote code execution. The vulnerability affects Ruby versions 3.3.0 through 3.3.13, 3.4.0 through 3.4.12, and 4.0.0 through 4.0.9, as well as end-of-life branches back to Ruby 2.4.0. Ruby on Rails and classic-style Sinatra applications using single-byte encodings like ISO-8859 and Windows-125x reach the faulty code by default. Self-hosted products including GitLab 19.6.0, GitHub Enterprise Server 3.22.5, Mastodon 4.7.5, OpenProject 17.9.7, Discourse 2026.10.1, and Chatwoot 4.20.0 bundle affected interpreters. Operators must upgrade standalone deployments to Ruby 3.3.14, 3.4.13, or 4.0.10 and install vendor-fixed releases rather than updating application gems alone.