Ruby2Shell Flaw Enables Heap Corruption in Affected Ruby Versions

Summary
CVE-2026-132825, dubbed Ruby2Shell, is a critical heap out-of-bounds write in Ruby string case-conversion functions. Researchers say it is reachable through default Rails and Sinatra deployments; fixed Ruby and bundled-product releases are available.
Key points
- The flaw affects Ruby 2.4.0–3.2.x, 3.3.0–3.3.13, 3.4.0–3.4.12, and 4.0.0–4.0.9; fixed releases are 3.3.14, 3.4.13, and 4.0.10.
- A character-conversion buffer check can allow a one-byte heap out-of-bounds write when a string contains 21 characters that expand during conversion.
- Researchers report that the vulnerable functions can be reached through unauthenticated requests in default Ruby on Rails and Sinatra deployments.
- Public reporting documents memory corruption and process crashes. Ruby says it is aware of proof-of-concept exploits that achieve code execution in some scenarios; a public PoC was planned for November 25, 2026.
- Ruby 2.4.0 through 3.2.x are end of life; the article recommends migrating those applications to a supported release series.
- Applications using bundled Ruby runtimes, including GitLab and GitHub Enterprise Server, require their vendors' fixed product releases; upgrading system Ruby or Rails gems alone does not remediate them.
- Recommended steps include updating the runtime or bundled product, restarting application processes, rebuilding container images, and temporarily restricting internet access to affected systems until updates are complete.
Article Details
- Vulnerability Types
- Heap out-of-bounds write
- Severity
- Critical (Ruby rating); CVSS v3.1 score 7.4
- Affected Versions
- Ruby 2.4.0 through 3.2.x
- Ruby 3.3.0 through 3.3.13
- Ruby 3.4.0 through 3.4.12
- Ruby 4.0.0 through 4.0.9
- Exploitation Status
- reported
- Exploit Availability
- claimed_or_private
- Patch Status
- available
- Workarounds
- Until updates are complete, restrict internet access to affected systems through a VPN or IP allowlist.
MITRE ATT&CK
CVE
Products
ChatwootProduct updates are available for major platforms that bundle Ruby, including GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Chatwoot, and Discourse.DiscourseProduct updates are available for major platforms that bundle Ruby, including GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Chatwoot, and Discourse.GitHub Enterprise ServerProduct updates are available for major platforms that bundle Ruby, including GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Chatwoot, and Discourse.GitLabProduct updates are available for major platforms that bundle Ruby, including GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Chatwoot, and Discourse.MastodonProduct updates are available for major platforms that bundle Ruby, including GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Chatwoot, and Discourse.OpenProjectProduct updates are available for major platforms that bundle Ruby, including GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Chatwoot, and Discourse.RubyResearchers disclosed Ruby2Shell on November 19, 2026, one day after Ruby released security updates addressing seven vulnerabilities, including CVE-2026-132825Ruby on RailsOn November 19, 2026, researchers published technical details showing that a recently patched Ruby vulnerability could be reached through unauthenticated requests in default Ruby on Rails and Sinatra deployments.SinatraOn November 19, 2026, researchers published technical details showing that a recently patched Ruby vulnerability could be reached through unauthenticated requests in default Ruby on Rails and Sinatra deployments.
