DE — heise online
ruby2ßhell: Remote Code Execution via 21 ß
Security1 min read
A serious bug in the Ruby programming language, called ruby2ßhell, can let attackers take control of servers. Ruby has released fixes, and server operators should update quickly.
What happened
Security researchers at Veria Labs found a critical flaw in Ruby. The bug is about the German letter ß. When a program converts text to capital letters, ß becomes SS, so the text gets one character longer. Ruby did not reserve enough memory for this extra space. An attacker can use this to write data outside the reserved area. This is not a full attack yet, but it can be a first step toward running code on a server remotely.
Key facts
- Ruby has reserved memory equal to the input length plus 20 bytes.
- An attack can start when a text has 21 or more ß characters.
- The flaw affects text in ISO-8859 or Windows-125x character sets.
- Fixed versions: Ruby 3.3.14, 3.4.13 and 4.0.10.
- No CVE number has been given yet, but Ruby has published a security advisory.
Why the name?
The bug got its name from php2shell, another recent bug that affected website operators. Ruby is a programming language. Many web tools are built with it, including Rails and Sinatra frameworks, which are tools that help developers build websites faster.
Why it matters
Many popular apps written in Ruby can be used on your own server. These include GitLab, GitHub Enterprise, Mastodon and OpenProject. If the bug is used against them, an attacker could gain control of the server. Anyone who runs these tools should install the update as soon as possible.
What to watch
- Veria Labs has said it will release proof-of-concept code for common Ruby software in one week.
- Watch for a CVE number, which will give the bug an official ID.
- Check whether your Ruby apps use the affected character sets and functions.
Glossary
- Ruby
- A programming language used to build websites and web apps.
- Veria Labs
- A security research company that tests systems for weak spots and found this bug.
- Rails
- A tool kit written in Ruby that helps developers build websites faster.
- GitLab
- Software for storing and managing computer code, which can be run on your own server.
- CVE
- An official ID number given to a known security problem so people can track it.