Ruby2Shell reaches default Rails and classic Sinatra apps, Veria Labs says


Veria Labs says the critical flaw is reachable without authentication in default Rails and classic-style Sinatra applications running affected Ruby versions. Ruby released fixes for seven flaws on 18 November, giving operators patched versions to install.
A critical Ruby flaw called Ruby2Shell is reachable over a network without authentication in default Rails and classic-style Sinatra applications running affected Ruby versions, Veria Labs said in research published 19 November. The flaw is tracked as CVE-2026-132825.
Ruby released fixes on 18 November for seven memory-safety flaws in its regular-expression engine and code that changes the case of text. The release followed an October 23 fix for different regular-expression bugs found by GitLab that lay behind four critical GitLab flaws. One of those flaws was targeted in an attempted attack on Alpine Linux’s GitLab server and later listed as actively exploited by the US Cybersecurity and Infrastructure Security Agency.
Ruby’s maintainers say proof-of-concept exploits demonstrated that crafted input could run code remotely for five of the new flaws. Such demonstrations are not reports of attacks: the advisories reported no attacks so far. Three flaws are rated critical, three high and one moderate.
Rails and Sinatra are frameworks for building Ruby applications. In an analysis described by The Hacker News, Moritz Sanft traced Ruby2Shell through Rack, the request-handling layer under Rails. Sanft found that Rack changes the case of a request field while processing a crafted form submission, reaching the flaw in a newly generated Rails application before the application’s own code runs.

The flaws sit in Ruby itself, but whether an attacker can reach them depends on how an application handles outside input. Most of the regular-expression flaws require an application to build and compile or run a pattern from input an attacker controls. A regular expression is a pattern used to match text.
The moderate flaw is an exception: a crafted string can trigger it when matched against a fixed pattern containing a case-insensitive backreference, which matches earlier text without regard to letter case. Its advisory says it may disclose memory contents or crash the process. The two case-conversion flaws instead involve changing the case of crafted text; they do not require regular expressions.
| Affected versions | Fixed release |
|---|---|
| 4.0.0 through 4.0.9 | 4.0.10 |
| 3.4.0 through 3.4.12 | 3.4.13 |
| 3.3.13 and earlier | 3.3.14 |
| 3.2 and earlier | No fix; move to a supported line |
The Ruby project recommends that operators on unsupported versions move to a supported line. The fixes are in the Ruby interpreter, the software that runs Ruby code, so updating application packages or a framework alone is not enough. Operators need to update the Ruby used by application servers, background workers and container images, then restart or rebuild them.
Ruby 3.3 support is scheduled to end at the end of March 2027. With its fixed release, maintainers renamed that line’s phase from security maintenance to legacy maintenance.
For a sixth flaw, a proof of concept showed attacker-controlled memory corruption but not code execution; maintainers say remote code execution is possible. The seventh is the moderate memory-disclosure or crash flaw. Ruby has requested CVE identifiers for the other six flaws, which can meanwhile be tracked using their GitHub advisory IDs.
| Advisory ID | Severity | Effect |
|---|---|---|
| GHSA-34m4-m9fh-gqp5 | Critical | Ruby2Shell; one-byte heap overflow when changing the case of a string in certain single-byte encodings; remote-code-execution proof of concept |
| GHSA-7x2q-68qv-6p8x | Critical | Regular-expression compilation; remote-code-execution proof of concept |
| GHSA-3p8q-wmhx-vm2w | Critical | Regular-expression compilation; remote-code-execution proof of concept |
| GHSA-87fm-7w84-j2px | High | Case conversion producing a result larger than 4 GiB; remote-code-execution proof of concept, though the required size puts it out of reach for most requests |
| GHSA-7whj-cfh7-xgm4 | High | Regular-expression conversion to text; remote-code-execution proof of concept |
| GHSA-wpqw-5qxg-m68r | High | Attacker-controlled memory corruption demonstrated |
| GHSA-pvgc-g7gj-pv6h | Moderate | Possible memory disclosure or crash |
Veria Labs says it plans to publish its Ruby2Shell proof of concept about a week after disclosure, once users have had time to upgrade.
The $20-a-month ChatGPT Plus plan has a small test, while eligible Business Standard members in the US can gain access to a personal agent.
2 min

The $64 prototype was tested for three months in Pakistan. Researchers said a panel’s average power output rose 86.7% after cleaning, compared with its heavily soiled state.
2 min

The center’s first teaching phase has 30 students, while a $500,000 robotics laboratory is planned at the American University of Armenia.
3 min