Skip to content

Category: Vulnerabilities & Advisories

Ruby2Shell: Critical Ruby Vulnerability and What to Do Now

Ruby2Shell, originally “ruby2ßhell,” is a vulnerability in the Ruby interpreter that can, in the worst case, lead to a server takeover – according to its discoverers, without authentication in default configurations of Ruby on Rails. The Ruby project fixed it overnight from November 18 to 19, 2026 (Central European Time), with versions 4.0.10, 3.4.13, and 3.3.14. We explain who is affected, how the vulnerability works, and what you should do now.

Published Approx. 13 min read Author: Rootsektor Editorial Team

In short: Update the Ruby interpreter to 4.0.10, 3.4.13, or 3.3.14, or to your distribution's package (updating your gems is not enough), restart every Ruby process, and rebuild your container images. Ruby2Shell (CVE-2026-132825) is a memory corruption flaw in the interpreter that writes one byte too many when converting text between uppercase and lowercase in older single-byte character sets. Ruby 4.0.0 to 4.0.9, 3.4.0 to 3.4.12, and 3.3.13 and earlier are affected; the Ruby project provides no fix for Ruby 3.2 and earlier. According to its discoverers, the vulnerability can be reached without authentication in default configurations of Ruby on Rails and Sinatra (classic style); no attacks have been reported so far. Information as of November 20, 2026 – we will update this article as the situation develops.

What is Ruby2Shell?

Overnight from November 18 to 19, 2026 (Central European Time), the Ruby project disclosed seven vulnerabilities in its regular expression engine and in string case conversion, and fixed them with versions 4.0.10, 3.4.13, and 3.3.14 (Ruby project). The best known of them is called “ruby2ßhell,” usually written Ruby2Shell. The project describes it as a one-byte buffer overflow in dynamically managed memory (the heap): converting a crafted string to uppercase or lowercase may allow remote code execution. The Ruby project says it is aware of proof-of-concept exploits – demonstrations that the flaw can actually be exploited – that achieve code execution in some scenarios (Ruby project).

In the Ruby project's security advisory on GitHub, the vulnerability is tracked as GHSA-34m4-m9fh-gqp5 and rated as critical (GHSA-34m4-m9fh-gqp5). It has since been assigned the CVE identifier CVE-2026-132825. However, the CVSS score of 7.4 out of 10 that the assigning authority MITRE gives in the CVE record assumes a local attack (CVE record). By contrast, CERT-Bund, the computer emergency response team of Germany's Federal Office for Information Security (BSI), scores the Ruby vulnerabilities at 9.8 out of 10 and assigns them the risk level “high” (CERT-Bund); in the European Union Vulnerability Database (EUVD) of the EU Agency for Cybersecurity (ENISA), the vulnerability is listed as EUVD-2026-129481 (ENISA).

The Ruby project credits Stephan Lipp (Ada Logics) and Anthropic with reporting it (GHSA-34m4-m9fh-gqp5). The name “ruby2ßhell” was coined by the security company Veria Labs, which says it found the vulnerability independently; the “ß” presumably refers to the letter that triggers the flaw (own research, as of November 20, 2026). Ruby2Shell joins a series of similarly named vulnerabilities from fall 2026 that we have already covered: php2shell, Broccoli2Shell, and Java4Shell.

Which versions and applications are affected?

CRuby, the standard interpreter of the Ruby project, is affected in all supported release series and in older versions (Ruby project, Ruby maintenance branches):

Affected and fixed Ruby versions (as of November 20, 2026)
Release seriesAffectedFixed inSupport
Ruby 4.04.0.0 to 4.0.94.0.10normal maintenance
Ruby 3.43.4.0 to 3.4.123.4.13normal maintenance
Ruby 3.33.3.0 to 3.3.133.3.14only security fixes and selected bug fixes, expected until the end of March 2027
Ruby 3.2 and earlierall versions from 2.4.0 (according to Veria Labs)no fixend of life

According to Veria Labs, the flawed code has been in the interpreter since Ruby 2.4.0 (Orca). The Ruby project provides no fix for Ruby 3.2 and earlier (Ruby project). Some vendors maintain older versions themselves: OpenVox, a fork of Puppet, for example, has applied the fix itself to the Ruby 3.2 in its version 8 (OpenVox). Check with each of your vendors whether it does the same.

Only strings in certain older single-byte character sets such as ISO-8859-1 or Windows-1252 are affected (GHSA-34m4-m9fh-gqp5); according to Veria Labs, UTF-8 strings are not affected (Orca). In JRuby, the Java-based implementation, the same flaw only leads to an error (an exception) rather than memory corruption (own research, as of November 20, 2026). The fixed jcodings library has been released as of version 1.0.66 (jcodings 1.0.66), but a JRuby version with the fix has not (JRuby).

Whether an application is vulnerable depends on whether attackers can send text in an affected character set to such a conversion. According to Veria Labs, this is possible without authentication in default configurations of Ruby on Rails and classic-style Sinatra, as well as in self-hosted software such as GitLab, GitHub Enterprise Server, Mastodon, and Discourse (Orca). CERT-Bund assumes that a remote, anonymous attacker can exploit the Ruby vulnerabilities to execute arbitrary code (CERT-Bund).

Many products ship their own Ruby interpreter. For these, usually only the vendor's update helps (as of November 20, 2026):

  • Discourse: Images from version 2.0.20261119 onward include Ruby 4.0.10. Hosted instances have already been updated; if you self-host Discourse, you need to rebuild your installation (Discourse).
  • Mastodon: Versions 4.7.6, 4.6.12, 4.5.22, and 4.4.29 update Ruby in the Docker images. If you don't use the official images, you need to update Ruby yourself (Mastodon).
  • OpenProject: Version 17.9.8 uses Ruby 4.0.10 (OpenProject 17.9.8, OpenProject PR #27113); for the 17.8 series, it is version 17.8.3 (OpenProject 17.8.3).
  • OpenVox: Versions 9.5.0 and 8.34.0 include the fix (OpenVox 9.5.0, OpenVox 8.34.0).
  • GitLab: There is no patch release yet. The update to the bundled Ruby has already been merged for version 19.6 but not yet released (GitLab).
  • GitHub Enterprise Server: The current version 3.22.5 from November 17, 2026, does not include a fix yet (GitHub Enterprise Server).

The situation varies across Linux distributions (as of November 20, 2026):

  • Debian: The ruby3.1 (Bookworm) and ruby3.3 (Trixie) packages are still listed as vulnerable (Debian ruby3.1, Debian ruby3.3).
  • SUSE: Updates are being prepared (SUSE).
  • Ubuntu: Updated packages for 22.04, 24.04, 26.04, and 26.10 have been released (Ubuntu).
  • Red Hat: The vulnerability has been logged but not yet assessed; there is no update yet (Red Hat).
  • Alpine Linux: Updated Ruby packages are already available in the package repositories (Alpine).

How the vulnerability works

Ruby stores the character set in which each string is encoded. In addition to UTF-8, Ruby supports numerous older character sets in which each character takes up exactly one byte. Methods such as upcase convert text to uppercase and write the result to a new memory area on the heap.

The German letter ß has no uppercase form in these character sets. During conversion, it therefore becomes “SS” – one byte turns into two. However, the affected routine only checked whether there was room for one byte before writing, so it could write one byte past the end of the allocated memory (own research, as of November 20, 2026). According to Veria Labs, the flaw can be reached through several case conversion methods (Orca).

A single byte sounds harmless. On the heap, however, heap metadata and other objects sit close together, and overwriting one byte in a targeted way can, under certain circumstances, influence how a program runs. According to the Ruby project, this already achieves code execution in some scenarios (Ruby project). For the Ruby vulnerabilities, CERT-Bund lists denial of service, disclosure of confidential information, and memory corruption as possible consequences in addition to code execution (CERT-Bund).

The flaw becomes dangerous because web frameworks often process input before any authentication takes place. According to Veria Labs, the vulnerability can be reached in Rails and Sinatra before authentication; the company has not published the exact path. According to analyses by other security companies, the frameworks process certain request data whose character set attackers can choose themselves (own research, as of November 20, 2026). Updating Rails or other gems does not change this, because the flaw is in the interpreter itself.

Is Ruby2Shell already being exploited?

As of November 20, 2026, no attacks have been reported; the EUVD does not list the vulnerability as exploited (ENISA). So far, there are no public exploits in widely used tools such as Metasploit (own research, as of November 20, 2026).

This can change quickly. The Ruby project is aware of proof-of-concept exploits (Ruby project) that have not been published so far, and Veria Labs plans to publish its own about a week after disclosure (Orca). The BSI's 2026 report shows how quickly attackers react today: in the second quarter of 2026, an average of just 8 days passed between a vulnerability becoming known and its first exploitation (BSI report (PDF)). Read more in our article on the BSI report 2026.

Be careful with alleged exploits: since November 20, 2026, a repository of unknown origin described as a proof of concept has been circulating (own research, as of November 20, 2026). Downloads like this can contain malware; do not run them.

Immediate actions: update first

There is no official setting that closes the vulnerability without an update; the only remedy is an updated interpreter (Ruby project, Orca). Proceed as follows:

  1. Take inventory: Use ruby -v to check which version a system uses. Don't forget container images, build servers, version managers such as rbenv, and products that ship their own Ruby. A software bill of materials (SBOM) helps you find every instance.
  2. Update the interpreter: Install Ruby 4.0.10, 3.4.13, or 3.3.14, or your distribution's update as soon as it is available. The official ruby Docker images have already been updated; pull them again and rebuild your own images (Docker). If you use rbenv, the new versions are available from ruby-build v20261119 onward (ruby-build). Running bundle update is not enough, because it only updates the gems.
  3. Restart processes: Running processes keep using the old interpreter until they are restarted – application servers such as Puma as well as background jobs. Then check which version is actually running in production.
  4. Update products with their own Ruby: Install the updates for Discourse, Mastodon, OpenProject, and OpenVox. For GitLab and GitHub Enterprise Server, watch for patch releases and install them as soon as they are available.
  5. Replace old versions: Systems running Ruby 3.2 or earlier will not receive a fix from the Ruby project. Plan the move to Ruby 3.4 or 4.0, and isolate these systems until then.
  6. Reduce the attack surface in the meantime: Where no update is possible, restrict access from the internet, for example via VPN or IP allowlists. Some providers of web application firewalls already offer rules against Ruby2Shell (own research, as of November 20, 2026); they can make attacks harder but do not replace the update.

Make Ruby interpreters a permanent part of your patch management. Otherwise, vulnerabilities in the runtime slip through the cracks, because updates to applications and gems do not cover them.

Detecting signs of an attack

Signs of an attack can include:

  • crashes of Ruby processes with memory errors, or application servers restarting unusually often
  • Ruby processes that start shells or other programs or establish unexpected outbound connections
  • new or modified files in application directories, new user accounts, or new SSH keys
  • unusual access to credentials, databases, or configuration files of the application

Not every attack attempt leaves traces in the logs. If you have a concrete suspicion, a compromise assessment clarifies whether attackers are or were active; if an attack is already visible, report the emergency.

Do you know everywhere Ruby runs in your organization? A vulnerability assessment uses authenticated scans to read installed software and patch levels directly on your systems, including outdated Ruby interpreters, and prioritizes the findings. A web application penetration test shows whether your Rails or Sinatra applications are vulnerable beyond that.

Checklist: working through Ruby2Shell

  • Every Ruby interpreter is inventoried – on servers, in containers, on build servers, and in products that ship their own Ruby
  • Ruby is updated to 4.0.10, 3.4.13, or 3.3.14, or the distribution's update is installed
  • Container images are rebuilt and rolled out
  • Every Ruby process is restarted, and the version running in production is verified
  • Updates for Discourse, Mastodon, OpenProject, OpenVox, and other products are installed
  • Patch releases for GitLab and GitHub Enterprise Server are being monitored, and access is restricted until the update
  • Systems running Ruby 3.2 or earlier are replaced or isolated
  • Logs are checked for crashes and suspicious processes

Conclusion: update the interpreter, restart, know your inventory

Ruby2Shell shows once again that vulnerabilities are found not only in your own code or in libraries but also in the runtime underneath. What matters is knowing every Ruby interpreter (including those in containers and in products that ship their own Ruby), updating them promptly, and restarting the processes. Because a public proof of concept has been announced, you should not wait.

Sources

All sources accessed on November 20, 2026.

Frequently asked questions

Are we safe if our application only uses UTF-8?

Not automatically. The flaw only occurs with strings in certain single-byte character sets. According to Veria Labs, however, it can still be reached without authentication in default configurations of Rails and classic-style Sinatra (Orca). Update the interpreter in any case.

Is it enough to update Rails and our gems?

No. The flaw is in the Ruby interpreter, not in a gem. You need Ruby 4.0.10, 3.4.13, or 3.3.14, or the corresponding package from your distribution, followed by a restart of every Ruby process (Ruby project).

We still use Ruby 3.2. What should we do?

The Ruby project provides no fix for Ruby 3.2 and earlier (Ruby project). Plan the move to Ruby 3.4 or 4.0; Ruby 3.3 is expected to receive fixes only until the end of March 2027 (Ruby maintenance branches). Until you have migrated, check whether your distribution or vendor backports the fix, and restrict access to affected systems.

Is Ruby2Shell already being exploited?

As of November 20, 2026, no attacks have been reported (ENISA). However, Veria Labs has announced that it will publish a proof of concept (Orca). After that, the risk is likely to rise quickly.

Share article

Contact

Are vulnerable Ruby versions still running in your environment?

We help you track down outdated Ruby interpreters in your infrastructure, test your Rails applications, and examine your systems for signs of an attack.

Get in touch+49 2932 465265-0

Author

Rootsektor Editorial Team

Team of Rootsektor IT-Security GmbH

Under this name, the team of Rootsektor IT-Security GmbH publishes articles on vulnerabilities, attack techniques, and defense. The company offers vendor-independent penetration testing, security services, and incident response and forensics, and is editorially responsible for the articles.

About Rootsektor

Transparency note: This article was created with the support of AI tools. Editorial responsibility for its content and statements lies with Rootsektor IT-Security GmbH.

Related services

Glossary terms

Blog

More articles

All articles
  • Vulnerabilities & Advisories

    Java4Shell: Critical Java Vulnerability and What to Do Now

    · Approx. 23 min read

    A critical flaw in the OpenJDK Base64 decoder can enable code execution on x86-64 processors with AVX-512 VBMI. Java 17, 21, 25, and 27 from the major vendors are affected.

  • Vulnerabilities & Advisories

    Only 8 Days Until the Attack

    · Approx. 17 min read

    According to the BSI's 2026 report, newly disclosed vulnerabilities were recently exploited after just 8 days on average. What this means for priorities and deadlines in patch management.