Threat advisory: Ruby string case-conversion heap overflow, GHSA-34m4-m9fh-gqp5
Published 19 November 2026, 9 pages, Mitigata Threat Research
In plain words
Ruby is a computer language that many websites are built with. A bug in how it changes letters between capitals and small letters can let a crafted piece of text write one byte too far into memory. That can crash the program, and Ruby says that in some cases an attacker could take control. Nobody has been seen using it yet, but the fix is an update.
For business leaders
A flaw in the Ruby programming language lets crafted text overwrite memory, and Ruby says it may allow an attacker to run code. Ruby rates it Critical. Any business running Ruby apps, Rails sites or Ruby-based tools is exposed. No exploitation in the wild is reported, but Ruby knows of proof-of-concept code. Upgrade to 3.3.14, 3.4.13 or 4.0.10 and restart app servers, since branches 3.2 and below get no fix. Ask whether every Ruby runtime is inventoried, whether any run unsupported branches, and whether upgrades are confirmed. The advisory cites a 6-hour CERT-In reporting window under Section 70B, which compliance should confirm for your sector.
For security analysts
Technique: one-byte heap overflow (CWE-193, off-by-one) during case conversion (upcase, downcase, capitalize, swapcase and their bang-suffixed forms; method list is analyst mapping) on crafted strings in single-byte encodings such as ISO-8859-1 and Windows-1252. Effect: memory corruption; segfault at minimum; RCE possible per Ruby. Exploit status: Ruby reports PoCs reaching code execution in some scenarios; no in-the-wild exploitation reported. CVE not yet assigned; no CVSS score. Affected: 3.3.13 and earlier, 3.4.0 to 3.4.12, 4.0.0 to 4.0.9; 3.2 and below end of life, no fix. Fixed: 3.3.14, 3.4.13, 4.0.10, or distro fixed package (vendor versions not stated). Steps: 1 patch: upgrade to a fixed build. 2 rebuild images and restart Puma, Unicorn, Sidekiq. 3 interim (analyst suggestion, not Ruby-listed): review force_encoding and encode near case conversion on user input; convert untrusted text to UTF-8 before case change. Detection: segfaults, [BUG] reports, worker restarts, Ruby spawning shells, Latin-1/Windows-1252 charset requests with unusual bytes, new users or web shells.
Key points
- Ruby rates advisory GHSA-34m4-m9fh-gqp5 Critical for a one-byte heap overflow during case conversion in some single-byte encodings.
- Ruby says proofs of concept reach code execution in some scenarios, though no exploitation in the wild is reported.
- Any app on an affected Ruby is in scope where crafted text reaches a case conversion, including Rails, Sinatra and scripts.
- Fixed builds are Ruby 3.3.14, 3.4.13 or 4.0.10, and branches 3.2 and below get no fix.
- Restarting Puma, Unicorn and Sidekiq is needed, because an installed package alone does not change a running process.
- Suspected compromises should be reported to CERT-In within 6 hours under Section 70B, as the advisory states.
The full report is a PDF that opens with a work email.