Plexus Access Solution

Ruby security release fixes seven flaws, including the Ruby2Shell heap overflow

The Ruby project released fixed versions on 18 November 2026 for seven memory-safety flaws. The most serious, nicknamed Ruby2Shell, can be reached before login in some default Rails and Sinatra setups.

Key takeaways

  • Fixed Ruby versions are 4.0.10, 3.4.13 and 3.3.14. Ruby 3.2 and older get no fix.
  • Running bundle update does not help, because the flaw is in Ruby itself, not in a gem (a Ruby code library).
  • No active attacks were confirmed in the sources we read, but proof-of-concept code exists for some of the bugs.
  • Products that bundle their own Ruby, such as GitLab, need the vendor's update.

What happened

On 18 November 2026 the Ruby project published a security release covering seven memory-safety flaws in the Ruby interpreter, the program that runs Ruby applications. Three are rated Critical, three High and one Moderate. The fixed versions are Ruby 4.0.10, 3.4.13 and 3.3.14.

The best known flaw is CVE-2026-132825, nicknamed Ruby2Shell. It is a one-byte heap overflow in string case conversion. A heap overflow means a program writes past the end of a block of memory, which can corrupt data and in some cases let an attacker run code. According to Semgrep, the bug triggers when a string in a legacy single-byte encoding contains 21 or more of the character ß, and Ruby then writes one extra byte. It has been present since Ruby 2.4.0, released in 2016.

The other six bugs are in regular expression handling and string handling. At the time of the sources, they had advisory IDs but no CVE numbers.

Who is affected

The affected versions are Ruby 2.4.0 through 3.3.13, 3.4.0 through 3.4.12 and 4.0.0 through 4.0.9. Ruby 3.2 and older are end-of-life, so the Ruby project will not fix them.

Semgrep reports that the Ruby2Shell bug only applies to legacy encodings such as ISO-8859 and Windows-125x variants. UTF-8, US-ASCII and binary strings are not affected. However, a default full-stack Rails app and a classic-style Sinatra app can reach the bug before a user logs in, through a middleware component and multipart form uploads that declare a character set. Rails apps in api_only mode are not exposed through that component. Application code that changes the case of client-supplied text in an affected encoding is also exposed.

Veria Labs, cited by eSecurity Planet, found vulnerable bundled Ruby runtimes in GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot. Semgrep noted that some products had no fixed release yet when it wrote its article on 19 November, so check your vendor's current status.

How serious is it

The picture is still developing. eSecurity Planet reports that no active exploitation had been confirmed and that proof-of-concept exploits exist for five of the seven bugs. Ruby's own advisory says some can lead to remote code execution, meaning an attacker runs commands on your server, in some scenarios. Semgrep said Veria Labs planned to publish a proof of concept that was not yet public when it wrote.

The CVE record scores Ruby2Shell at CVSS 7.4 (High), while the Ruby project rates it Critical. Semgrep says the lower score reflects the bug being scored as a local attack. Semgrep also notes that patched and unpatched Ruby give identical results, so there is no safe way to test whether a server is vulnerable. The only reliable check is the Ruby version.

What businesses can do

  • Find every Ruby you run. Check the version of the Ruby actually running in production, including containers and background workers, not only the project files.
  • Upgrade the interpreter. Move to 4.0.10, 3.4.13 or 3.3.14, rebuild container images, restart web servers and workers, then confirm the version in the running system.
  • Do not rely on bundle update. It updates gems and leaves the Ruby runtime unchanged.
  • Plan migrations for Ruby 3.2 or older. These versions have no fix from the Ruby project.
  • Ask vendors about bundled Ruby. Updating the Ruby on the host may not change a copy bundled inside a product.
  • Use interim workarounds only if you cannot patch yet. Semgrep lists unofficial options, such as disabling method override in Rails or Sinatra, or rejecting multipart parts that declare a non-UTF-8 character set at a proxy. It stresses these are not a fix and do not cover application code or the six related bugs.

Sources

Finding every place a Ruby runtime hides, from old servers to bundled products, is often the slow part of a fix like this. If you run a Ruby application and want help with servers and cloud upgrades or a review of an in-house system, you can book a free consultation.

Ready to talk about your project?

Tell us what you need. We offer a free consultation for your software and IT needs.