# A single German letter lets attackers run code on stock Rails

Original title: Ruby2ßhell: Pre-authentication RCE on stock Rails

> Hacker News story 50556287 · language: en · submitted 2026-11-19
> Web version: https://zeli.app/story/50556287
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 402 · by [jdns](<https://news.ycombinator.com/user?id=jdns>) · 💬 184
[original](<https://verialabs.com/ruby2shell/>) · [HN discussion](<https://news.ycombinator.com/item?id=50556287>)

## Summary

A one-byte heap overflow in Ruby's single-byte encodings has lurked since 2.4.0: upcasing ß writes two bytes where the loop only checks room for one. Reachable through upcase, swapcase, downcase(:fold) and casecmp?, it makes default Rails and Sinatra apps vulnerable to pre-authentication RCE. Fixed in Ruby 3.3.14, 3.4.13 and 4.0.10; GitLab, GitHub Enterprise Server, Mastodon, Discourse and others ship affected versions.

## Key quote

> The output buffer is allocated as the input length plus 20 bytes. Each ß adds one byte to the output, so an input with 21 of them overflows the buffer by one byte.

## HN discussion (184 comments)

### [cowlevel](<https://news.ycombinator.com/item?id=50558077>)

> So the recent RCE wave seems to be people finding more single byte overflows and such, but reporting them as RCEs because AI can do the tedious grunt work of finding the rest of the vulnerability chain.
>
> If any single byte overflow can be converted into an RCE with minimal human effort then we have no choice but to prove the whole software stack is memory safe.

### [circularfoyers](<https://news.ycombinator.com/item?id=50557382>)

> Thought this was another vulnerability for a second, but for anyone else who thought the same, this is already covered in the Ruby advisory being discussed here https://news.ycombinator.com/item?id=50554038 (which covers six other vulnerabilities).

### [barbegal](<https://news.ycombinator.com/item?id=50557892>)

> More interested to see how you can use just a single byte overflow to trigger RCE. Definitely achievable but sounds tough.

### [t1234s](<https://news.ycombinator.com/item?id=50560009>)

> For people who haven't been to Germany the character that looks like a script B is pronounced like "S". Its a bit of humor in what is an annoying problem.

### [Panzerschrek](<https://news.ycombinator.com/item?id=50557447>)

> I suppose this function has been written first in assumption, that case conversion doesn't affect length, but later ß -> SS conversion has been added without proper testing.

### [weinzierl](<https://news.ycombinator.com/item?id=50557538>)

> There should be other codepoints other than ß that in principle could be used for a vulnerability like that. There are even ones that expand to three codepoints, like ffi.

### [GTP](<https://news.ycombinator.com/item?id=50559344>)

> \> We'll be publishing a proof of concept in a week, once people have had time to upgrade.
>
> I think one may now decide to publish the PoC straight away or not publish it at all, since an AI agent pointed at this post would very likely be able to produce one in a few minutes.

### [speedgoose](<https://news.ycombinator.com/item?id=50557665>)

> But can the attacker specify the encoding in rails? It's not like UTF-8 or GTFO?

---

## Cite

- Page: https://zeli.app/story/50556287
- Date: 2026-11-19
- Source: verialabs.com (https://verialabs.com/ruby2shell/)
- Hacker News: https://news.ycombinator.com/item?id=50556287

## Other languages

- zh: https://zeli.app/zh/story/50556287 · markdown: https://zeli.app/zh/story/50556287.md
- ja: https://zeli.app/ja/story/50556287 · markdown: https://zeli.app/ja/story/50556287.md
- ko: https://zeli.app/ko/story/50556287 · markdown: https://zeli.app/ko/story/50556287.md
- de: https://zeli.app/de/story/50556287 · markdown: https://zeli.app/de/story/50556287.md
- es: https://zeli.app/es/story/50556287 · markdown: https://zeli.app/es/story/50556287.md
- ru: https://zeli.app/ru/story/50556287 · markdown: https://zeli.app/ru/story/50556287.md
