Ruby2Shell (CVE-2026-132825): which Ruby versions are affected and how to check

Short answer: Ruby before 3.3.14, 3.4.13 and 4.0.10 has a heap buffer overflow when it changes the case of a string (CVE-2026-132825, NVD), and researchers showed it can lead to remote code execution (SecurityWeek, Sonatype). The fixed versions are 3.3.14, 3.4.13 and 4.0.10; Ruby 3.2 and older get no fix (Aikido). Applications that ship their own Ruby, such as GitLab, need their vendor's update, so a patched system Ruby is not the whole check.

Affected and fixed versions

BranchAffectedFixed in
4.0before 4.0.104.0.10
3.4before 3.4.133.4.13
3.3before 3.3.143.3.14
3.2 and olderallno fix (Aikido)

What the bug is

NVD describes a heap-based buffer overflow during case conversion: one byte can be written outside a buffer, for example for strings in ISO-8859-1 or Windows-1252. NVD scores it 7.4 (High); Aikido calls it critical because of the code execution it can lead to. The same Ruby releases fix seven vulnerabilities in string case conversion and in regular expression compilation, matching and conversion, and proof-of-concept exploits show that some of them can lead to remote code execution (Sonatype). Sonatype counts Ruby2Shell in the run of November 2026 bugs it calls November2Shell. The sources FixLane checked name no configuration that rules the bug out, so the Ruby version is the thing to check.

Which applications are affected

Aikido says GitLab is affected, and so are GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot. Sonatype advises checking vendor updates for Ruby bundled with applications or container images. An application with its own embedded Ruby keeps the old one until the vendor ships a release built on a fixed Ruby.

Find every Ruby on a machine (read-only)

ruby -v
which -a ruby
rbenv versions 2>/dev/null; rvm list 2>/dev/null; asdf list ruby 2>/dev/null
cat .ruby-version 2>/dev/null; grep -A1 'RUBY VERSION' Gemfile.lock
docker images --format '{{.Repository}}:{{.Tag}}' | grep -i ruby
docker run --rm IMAGE ruby -v
/opt/gitlab/embedded/bin/ruby -v        # GitLab Linux package
sudo gitlab-rake gitlab:env:info        # GitLab and Ruby version

ruby -v prints the full version, for example 3.4.13. which -a lists every Ruby on the PATH, and version managers keep more Rubies side by side: each one counts. Gemfile.lock records the Ruby version when the Gemfile pins one. A container tag such as ruby:3.4 does not say which patch release the image holds, so run ruby -v inside the image. The GitLab Linux package carries its own Ruby under /opt/gitlab/embedded. These commands only read.

What to compare

  • Every Ruby you found against the table above. 3.4.12 is affected, 3.4.13 is not.
  • A Ruby from a Linux distribution: distributions can backport the fix under an older version string, so check the distribution's advisory for the package.
  • GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot: the vendor's release notes for a release that ships a fixed Ruby.

FixLane's page: Ruby2Shell: critical Ruby RCE (CVE-2026-132825), with the fixed versions FixLane verified.

Questions

What is Ruby2Shell?

The name for CVE-2026-132825, a heap buffer overflow in Ruby's string case conversion that researchers showed can lead to code execution. Ruby 3.3.14, 3.4.13 and 4.0.10 fix it.

Is Ruby 3.2 affected by Ruby2Shell?

Aikido says Ruby 3.2 and older have no fix. Only the 3.3, 3.4 and 4.0 branches got fixed releases.

Is GitLab affected by Ruby2Shell?

Yes, according to Aikido, along with GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot. They run their own Ruby, so check the vendor's release for a fixed Ruby.

What is the CVSS score of CVE-2026-132825?

NVD scores it 7.4 (High). Aikido describes it as a critical Ruby RCE.

Sources

Check your own machine

Connect an AI agent to the free, read-only FixLane MCP server or ask the Telegram bot: it checks what you have installed against verified fixed versions and serves a reviewed fix procedure. All guides.