What is Ruby2Shell?
CVE-2026-132825, known as Ruby2Shell, is a vulnerability in Ruby, a programming language runtime used to build and run web applications. It sits in the code that changes the case of a string, for example turning it to uppercase, when that text uses a single-byte encoding such as ISO-8859-1 or Windows-1252. Converting certain characters can write one byte past the end of a memory buffer that Ruby allocated for the result.
An attacker who can get such a string into an affected application may be able to use that one-byte overwrite as a starting point to run commands on the server where Ruby is running. Reaching that outcome takes further work specific to each application, but the vulnerability gives an attacker a foothold in memory that the application did not intend to expose.
| CVE | Description | CVSS | Exploited in the wild |
|---|---|---|---|
| CVE-2026-132825 | Remote Code Execution in Ruby | 7.4 High (CVSS 3.1) | Not reported |
Is Ruby2Shell being exploited in the wild?
As of November 19, 2026, no exploitation in the wild has been reported.
How did Ruby2Shell come to light?
Researchers at Veria Labs found the vulnerability and named it Ruby2Shell, echoing the earlier php2shell naming, according to heise online. Ruby published its security announcement and released fixed versions on November 18, 2026, and the CVE record, CVE-2026-132825, followed on November 19, 2026.
How is watchTowr helping Ruby customers?
- Adversary Sight engine identified Ruby instances across client environments and assessed exposure.
- Rapid Reaction identified exposure to this vulnerability across the watchTowr client base, giving teams the time they need to act.
What is Ruby?
Ruby is a general-purpose programming language used to build web applications and the servers, background workers, and automation tools that run them. Organizations often run Ruby applications, including those built on the Rails or Sinatra frameworks, to power customer-facing services and internal tools inside enterprise networks.
Which Ruby versions are affected?
| Product | Affected Versions | Fixed Version |
|---|---|---|
| Ruby 3.3 branch | Before 3.3.14 | 3.3.14 |
| Ruby 3.4 branch | 3.4.0 before 3.4.13 | 3.4.13 |
| Ruby 4.0 branch | 4.0.0 before 4.0.10 | 4.0.10 |
| Ruby 3.2 and earlier | 3.2 and earlier | Not yet available |
- The application must process text in a single-byte encoding such as ISO-8859-1 or Windows-1252, rather than Ruby’s default UTF-8.
- The application must run a function that changes the case of a string, such as converting it to uppercase, on text an attacker controls.
- Ruby applications built with Rails or with Sinatra in its classic style are affected in their default configuration.
Rails applications and Sinatra applications running in their default configuration face the earliest exposure, along with any Ruby application that changes the case of external text in a single-byte encoding.
How do I fix Ruby2Shell?
Apply the fix by updating Ruby to 4.0.10, 3.4.13, or 3.3.14, depending on the branch in use, since the vulnerability lives in the interpreter itself. Updating application gems or frameworks alone does not fix it. No workaround has been published, so systems on Ruby 3.2 or earlier should move to a supported release line.
- Identify every Ruby interpreter version running on application servers, background workers, and container images.
- Update affected systems to Ruby 4.0.10, 3.4.13, or 3.3.14, matching the branch in use.
- Rebuild container images and restart application servers and workers after the update.
- Move any system running Ruby 3.2 or earlier to a supported release line, since no fix exists for it.
- Review application code for functions that change the case of text coming from outside the application.
Is Ruby2Shell related to earlier vulnerabilities?
Ruby fixed three different bugs in its regular expression engine in October 2026, which were linked to vulnerabilities in GitLab that compiled patterns from attacker-controlled text. Those earlier bugs are unrelated to the case-conversion issue behind CVE-2026-132825, which involves no regular expressions at all.
What types of threat actors typically exploit this vulnerability?
No attribution has been made public.
