Ruby2Shell heap overflow can give unauthenticated RCE on Rails and Sinatra
Original title: Ruby2Shell: Critical Ruby Vulnerability Allows Unauthenticated Remote Code Execution on Rails and Sinatra Applications
Ruby 3.3.14, 3.4.13, and 4.0.10 fix the flaw; Veria Labs reported no active exploitation and plans a PoC in a week.
Veria Labs disclosed Ruby2Shell on November 19, 2026: a one-byte heap overflow in Ruby case conversion for certain legacy single-byte encodings. Default Rails and classic-style Sinatra on affected runtimes can reach the bug without an account; UTF-8 and plain Rack are not exposed by default. Patched releases are Ruby 3.3.14, 3.4.13, and 4.0.10. The CVE is still pending, and the disclosure did not report active exploitation.
Unconfirmed: CVE assignment is pending, a proof of concept is not yet published, and network exposure varies by installation.
- Affected ranges are Ruby 4.0.0–4.0.9, 3.4.0–3.4.12, and 3.3.0–3.3.13.
- The defect dates to Ruby 2.4.0 and also hits end-of-life branches through 3.2.
- Advisory cited is GHSA-34m4-m9fh-gqp5; CVE assignment is pending.
- Vulnerable bundled runtimes were found in named GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Discourse, and Chatwoot releases.
- Operators of bundled Ruby should install the vendor’s fixed product release.
Impact: Unauthenticated remote code execution via a one-byte heap overflow
| Product | Affected | Fixed in |
|---|---|---|
| Ruby | 4.0.0 through 4.0.9, 3.4.0 through 3.4.12, 3.3.0 through 3.3.13; also EOL branches through 3.2 from 2.4.0 | 3.3.14, 3.4.13, or 4.0.10 |
| Ruby on Rails | Default configurations on an affected Ruby runtime | — |
| Sinatra | Classic-style apps on an affected Ruby runtime | — |
- 1.Upgrade directly managed Ruby to 3.3.14, 3.4.13, or 4.0.10.
- 2.Install the vendor’s fixed release when Ruby is bundled in a product.
- 3.Prioritize internet-facing Rails and classic-style Sinatra, then verify the running runtime.
- Organizations
- Veria Labs
From the original article
7 min read at gbhackers.com
A critical vulnerability in Ruby’s string case conversion can allow unauthenticated remote code execution in applications running affected versions of Ruby on Rails and classic-style Sinatra. Veria Labs disclosed the flaw, dubbed Ruby2Shell, on November 19, 2026. The researchers’ disclosure lists GitHub advisory GHSA-34m4-m9fh-gqp5 and marks the CVE assignment as pending.
By Divya · gbhackers.com
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.