Ruby2Shell Flaw Enables Unauthenticated Code Execution in Vulnerable Ruby Apps

· Original article ↗

Summary

CVE-2026-132825 is a critical Ruby heap overflow in case conversion that can enable unauthenticated code execution when apps process untrusted strings in certain legacy encodings. Fixed releases are 3.3.14, 3.4.13 and 4.0.10; Ruby 3.2 and older have no fix.

Key points

  • Ruby2Shell is a one-byte heap overflow in string case conversion for certain legacy single-byte encodings; UTF-8 strings are not affected.
  • Affected versions are Ruby 2.4.0–3.3.13, 3.4.0–3.4.12 and 4.0.0–4.0.9, when applications change the case of untrusted strings in those encodings.
  • Rails and classic-style Sinatra are exposed by default, according to the article.
  • The article says the latest listed releases of GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot bundle affected Ruby versions.
  • Ruby fixed the flaw in versions 3.3.14, 3.4.13 and 4.0.10, released November 18, 2026; Ruby 3.2 and older have no fix.
  • No attacks had been reported, but Ruby maintainers knew of proof-of-concept exploits and the researchers planned to publish theirs.
  • Recommended steps are to upgrade Ruby, restart app servers, rebuild container images, update pinned Ruby versions, and restrict affected self-hosted servers until vendor fixes are available.

Article Details

Vulnerability Types
  • One-byte heap overflow
  • Remote code execution
Severity
Critical
Affected Versions
  • Ruby 2.4.0 to 3.3.13
  • Ruby 3.4.0 to 3.4.12
  • Ruby 4.0.0 to 4.0.9
Exploitation Status
not_reported
Exploit Availability
claimed_or_private
Patch Status
available
Workarounds
  • For affected self-hosted software, make the server private, for example behind a VPN or an IP allowlist, until a fixed release is available.

MITRE ATT&CK

CVE

People

Products

ChatwootGitLab is affected, and so are GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot. Their latest releases still bundle a vulnerable Ruby. If you run one of these servers, make it private until theDiscourseGitLab is affected, and so are GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot. Their latest releases still bundle a vulnerable Ruby. If you run one of these servers, make it private until theGitHub Enterprise ServerGitLab is affected, and so are GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot. Their latest releases still bundle a vulnerable Ruby. If you run one of these servers, make it private until theGitLabGitLab is affected, and so are GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot. Their latest releases still bundle a vulnerable Ruby. If you run one of these servers, make it private until theMastodonGitLab is affected, and so are GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot. Their latest releases still bundle a vulnerable Ruby. If you run one of these servers, make it private until theOpenProjectGitLab is affected, and so are GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot. Their latest releases still bundle a vulnerable Ruby. If you run one of these servers, make it private until theRailsRuby2Shell (CVE-2026-132825) is a critical Ruby flaw that can let an unauthenticated attacker run code on your server. Rails and classic-style Sinatra apps are exposed by default.RubyRuby2Shell (CVE-2026-132825) is a critical Ruby flaw that can let an unauthenticated attacker run code on your server. Rails and classic-style Sinatra apps are exposed by default.SinatraRuby2Shell (CVE-2026-132825) is a critical Ruby flaw that can let an unauthenticated attacker run code on your server. Rails and classic-style Sinatra apps are exposed by default.

Related Articles