Skip to content
Tech News
← Back to articles

Ruby case-conversion bug enables one-byte heap overflow, pre-auth RCE in Rails

read original more articles
GoKawiil Brief

Security researchers found that Ruby's handling of the German ß character in certain single-byte encodings (used by upcase, swapcase, downcase(:fold) and casecmp?) miscalculates buffer bounds, letting an input with 21 ß characters overflow the output buffer by exactly one byte. The flaw has existed since Ruby 2.4.0 and affects only legacy ISO-8859 and Windows-125x encodings, not UTF-8 strings; it has now been patched upstream in the Ruby source repository.

Why It Matters

GoKawiil's interpretation of the reporting above, not reported fact.

A single attacker-controlled byte written past a heap buffer can be enough to corrupt adjacent memory, and researchers describe this as reachable pre-authentication on a stock Rails application, which could let an attacker trigger memory corruption before any login is required. Because the overflow size and timing are attacker-influenced through input length, this kind of primitive is often a building block for more complex exploitation chains rather than an immediate one-shot RCE, so the severity in practice depends on how Rails and the underlying allocator handle the corrupted byte.

Key Takeaways

Source: verialabs.com, 2026-11-19

Published there as: “Ruby2ßhell: Pre-authentication RCE on stock Rails”

Read the original report → The summary and analysis above are GoKawiil's own, written from reporting by the source above. Facts and quotes belong to the original publisher.
Keep reading
rce 18 briefs → ruby 16 briefs → rails 15 briefs →