Subscribe free
Morning Merge · Thursday, November 19, 20265 min read

Ruby2ßhell: patch Ruby before the PoC lands

Plus two Nginx HTTP/2 RCEs, PHP's critical release at 14:00 UTC, and Gemini 4 Neon

The main thing

An isometric forming press widens an orange metal strip, which spills over its receiving channel and bends the press's own control linkage.

If you run Ruby on a server that the internet can reach, you have an upgrade to do today. Ruby2ßhell is a one-byte heap overflow in Ruby's string case conversion. Its researchers say an attacker can reach it without logging in, and they say it works against stock Rails.

The root cause is small. Most of Ruby's single-byte encodings have no capital ß, so upcasing one writes two bytes, SS. The loop checks the bounds for only one of them. The output buffer is the input length plus 20 bytes, so a string with 21 ß characters writes one byte past the end. That loop has been in several ISO-8859 and Windows-125x encodings since Ruby 2.4.0.

UTF-8 strings use a different code path and are not affected. The bug is reached through upcase, swapcase, downcase(:fold) and casecmp?. Apart from the frameworks the report names, your own code is at risk if it upcases strings that arrive in a legacy encoding. If you run self-hosted software that ships with an affected Ruby, install the vendor's fixed release.

The same GHSA id is first on the list in Ruby's own security advisory. Those releases also fix six more bugs in Regexp and String, and Ruby says it knows of PoCs that turn several of them into remote code execution.

What to do today: upgrade Ruby to 3.3.14, 3.4.13 or 4.0.10, rebuild your images and redeploy. If you are still on 3.2 or older, no fix is coming for your branch, so plan the move to a supported version now.

Quick bits

Also happening

Patch roundup

CISA also added a Synology output encoding flaw to its KEV list.

Restart, don't reload. Then refill the coffee.

← All issues

Get this in your inbox every morning.

Free. Five minutes. Unsubscribe in one click.

Subscribe free →