Ruby2Shell
Also tracked as: ruby2ßhell
Disclosed Nov 19, 2026
Updated Dec 1, 2026
A one-byte heap buffer overflow in Ruby's string case-conversion routines for legacy single-byte encodings (such as ISO-8859-1 or Windows-1252) that can escalate to remote code execution in Rails, Sinatra, and GitLab deployments.
Component
Ruby String Case-Conversion (Legacy Single-Byte Encodings)
Attack Vector & Class
Conditional RCE
Memory Safety
Exploitation Status
No confirmed wild attacks
Public PoC available
CVSS & Ecosystems
9.8 (v3.1)
Ruby, Rails
Affected Versions
- Ruby 2.4.0 through 3.2.x (EOL — no official patch)
- Ruby < 3.3.14, < 3.4.13, < 4.0.10
Fixed / Recommended Versions
- Ruby 3.3.14+, 3.4.13+, or 4.0.10+
Technical Root Cause
Present since Ruby 2.4.0 (2016), CVE-2026-132825 occurs when case-converting characters such as ß that expand from one byte into two bytes under single-byte encodings, causing the loop to write one byte past the allocated heap buffer. While pure UTF-8 code paths are not directly impacted, applications processing attacker-supplied strings converted or tagged with legacy single-byte encodings can suffer heap corruption leading to RCE.
Remediation & Hardening
- 1Upgrade Ruby to 3.3.14, 3.4.13, or 4.0.10 (or migrate off end-of-life Ruby 3.2 and older).
- 2Rebuild Ruby container images and restart Puma/Unicorn/Passenger worker processes.
- 3Apply WAF rules blocking suspicious legacy single-byte charset headers while patching rolls out.