Skip to content
Rush Commerce
Software & Dev3 min read

Ruby2Shell (CVE-2026-132825): upgrade Ruby, then restart

Ruby2Shell is a heap overflow in Ruby itself, reachable before login in default Rails and Sinatra apps. Upgrade to Ruby 4.0.10, 3.4.13 or 3.3.14 and restart.

If your app runs on Ruby, your dependency scanner will not catch this one. Ruby2Shell (CVE-2026-132825) is a heap overflow inside the Ruby interpreter, not a gem. Semgrep reports that a stock Rails app reaches it before login, before the CSRF check, before any of your own code runs. The fix is Ruby 4.0.10, 3.4.13 or 3.3.14, released November 18. A proof of concept is reportedly about a week out.

What actually happened

The Ruby security advisory fixes seven memory bugs in Ruby's regex engine and string case conversion. The headline one (GHSA-34m4-m9fh-gqp5) is a one-byte heap overflow when Ruby changes the case of a crafted string. Ruby says it knows of proofs of concept that reach remote code execution "in some scenarios." Affected: Ruby 3.3.13 and earlier, 3.4.0 through 3.4.12, and 4.0.0 through 4.0.9. Ruby 3.2 and older are end of life and get no fix. The bug was credited to Stephan Lipp (Ada Logics) and Anthropic.

Semgrep's analysis explains how a stranger gets there. The bug only fires on 14 legacy single-byte encodings such as ISO-8859-1 and Windows-1252, not UTF-8. But Rack's MethodOverride middleware upcases the hidden _method form field, and a multipart form lets the client declare that field's charset. Semgrep confirmed the value reaches the vulnerable call on Rails 8.1 and 7.2 and classic-style Sinatra. Rodauth's sign-up flow is a second path.

Two more details matter. The CVE record scores it 7.4 (High); Ruby rates it Critical. And Semgrep says Veria Labs, which named the bug, plans to publish a proof of concept about a week after disclosure. No attacks have been reported so far.

Why Ruby2Shell matters for your business

Your tools will say you are fine. bundle update changes nothing and Gemfile.lock shows nothing. Six of the seven bugs had no CVE ID at release, so CVE-keyed scanners miss them.

Last month's patch doesn't count. Ruby's October 23 regex release landed you on 4.0.9, 3.4.12 or 3.3.13. Those are the newest vulnerable versions.

Upgrading isn't the same as fixed. A Puma worker started yesterday still runs yesterday's interpreter. Restart it. Rebuild Docker images on the fixed ruby tags.

Check what you host, not only what you wrote. As of November 19, Semgrep listed self-managed GitLab, GitHub Enterprise Server and Chatwoot as shipping vulnerable bundled Ruby with no fixed release yet. Put those behind a VPN or allow-list until their vendors ship.

Key takeaways

  • Ruby2Shell is a heap overflow in the Ruby interpreter, not a gem
  • Default Rails and classic Sinatra reach it before login, per Semgrep
  • Upgrade to Ruby 4.0.10, 3.4.13 or 3.3.14; Ruby 3.2 and older get no fix
  • Restart app servers and rebuild container images after upgrading
  • A public proof of concept is expected soon; patch before it lands

Patching is a process, not a command. We build Rails and Ruby stacks with pinned interpreter versions, rebuilt base images and a deploy that restarts every worker, so a runtime fix ships in an hour. Ask us to check your Ruby fleet, or see what we build.

Sources: Ruby security advisory, Semgrep: Ruby2Shell analysis.

  • #ruby
  • #cve-2026-132825
  • #rails
  • #security
  • #patching
TR

Tommy Rush — Founder, Rush Commerce

Operator turned builder. 15+ years running operations — now shipping the systems businesses run on. More

Get The Rush Report weekly — one email, zero fluff.