Ruby2Shell: Critical Ruby vulnerability

Ruby2Shell (GHSA-34m4-m9fh-gqp5) is a critical Ruby vulnerability. Find out which versions and products are affected, how to fix it and how AppCheck can help.

A critical vulnerability in the Ruby programming language could, in some scenarios, allow attackers to execute code on affected servers without logging in. The flaw is in Ruby itself, not in an application or library, so updating application dependencies alone will not fix it.

Fixed on 18th November 2026 and publicly detailed the following day, the vulnerability affects Ruby versions dating back to 2.4.0, as well as several widely used self-hosted products that bundle their own Ruby.

What is Ruby2Shell?

GHSA-34m4-m9fh-gqp5, named Ruby2Shell by Veria Labs, is a memory corruption flaw in the way Ruby changes the case of text held in legacy single-byte encodings such as ISO-8859-1 or Windows-1252. Text in UTF-8 is not affected. The Ruby project rates it Critical and fixed it alongside six other Ruby vulnerabilities, several of which can also lead to code execution.

The researchers report that Ruby on Rails and classic-style Sinatra applications in their default configuration can be reached over the network without logging in. The Ruby maintainers say proof-of-concept exploits have achieved remote code execution in some scenarios.

There are currently no reports of exploitation in the wild. However, the researchers plan to publish their proof of concept around a week after disclosure, and we recommend acting before then.

Who could be affected?

The following Ruby versions are affected:

  • Ruby 3.3.13 and earlier
  • Ruby 3.4.0 to 3.4.12
  • Ruby 4.0.0 to 4.0.9

Running an affected version does not automatically make a system exploitable from outside. That depends on whether untrusted input reaches the vulnerable code. Rails and classic-style Sinatra applications do this by default. Plain Rack and other frameworks are not exposed by default, but any application that changes the case of untrusted text in an affected encoding may be.

Organisations should also consider self-hosted products that bundle their own Ruby. The following products included an affected version in their latest release at disclosure:

Product  Release checked  Bundled Ruby 
GitLab  19.6.0  3.3.13 
GitHub Enterprise Server  3.22.5  4.0.9 
Mastodon  4.7.5  4.0.9 
OpenProject  17.9.7  4.0.9 
Discourse  2026.10.1  3.4.7 
Chatwoot  4.20.0  3.4.4 

This list is not exhaustive. Any Rails application, including software written in-house, should be treated as potentially exposed if it runs on an affected Ruby version.

W3Techs reports that Ruby is used by 7.3% of websites whose server-side language is known, and by around 12% of the top one million sites (18th November 2026). That is an upper bound on exposure, not a count of vulnerable systems, and no count of exposed vulnerable servers has been published.

What should organisations do?

The Ruby project released security updates on 18th November 2026. The fixed versions are:

  • Ruby 3.3.14
  • Ruby 3.4.13
  • Ruby 4.0.10

Where Ruby is supplied through an operating system, check its security advisory. Distribution packages often carry backported fixes under different version numbers. Where a product bundles its own Ruby, updating the system Ruby will not fix it, so install the vendor’s fixed release when it is available.

Check the Ruby version inside the environment the application actually runs in, including container images and background workers, as running ruby -v on the host does not always show it. Rebuild container images on a fixed base and restart all application processes after updating.

Ruby 3.2 and older are also affected but have reached end of life and will not receive a fix. Some Linux distributions and extended support vendors backport security fixes, so check with your supplier and plan a move to a supported version.

The Ruby project lists no workaround. If immediate patching isn’t possible, restrict access to affected applications to trusted networks, for example with a VPN or IP allowlist, and consider taking non-essential applications offline.

No indicators of compromise have been published. Unexpected crashes of Ruby application processes are worth investigating, as failed exploitation attempts are likely to crash the process.

How can AppCheck help?

If you know you’re running an affected Ruby version, patch now rather than waiting for a scan.

A web application scan is the quickest way to find internet-facing systems that may be exposed. Many Ruby-based products, such as GitLab, Discourse and Mastodon, can be identified from their web responses. Where the product or its version is exposed, AppCheck can flag it as running a potentially affected build. For custom Rails and Sinatra applications, a web application scan can confirm the framework is in use.

Ruby version information is rarely exposed to the network, so an external scan may not identify servers that hide it. For a fuller picture, run an authenticated infrastructure scan as well. This can read the Ruby versions installed on the host and match them against this vulnerability.

It’s important to understand the limitations: version-based detection identifies potential exposure, not confirmed exploitability. A scan that does not report an affected version does not prove a system is unaffected, particularly where a product bundles its own Ruby or runs in a container.

We’re also exploring an active detection for Ruby2Shell. However, we recommend upgrading now rather than waiting for that check.

If you have questions or would like help interpreting your results, please get in touch with our team.

Further reading

Get started with Appcheck

No software to download or install.

Contact us or call us 0113 887 8380

About AppCheck

AppCheck is a software security vendor based in the UK, offering a leading security scanning platform that automates the discovery of security flaws within organisations websites, applications, network and cloud infrastructure. AppCheck are authorised by the Common Vulnerabilities and Exposures (CVE) Program as a CVE Numbering Authority (CNA)

No software to download or install.
Contact us or call us 0113 887 8380