Ruby2shell: Why Bundle Update Won't Fix CVE-2026-132825

On November 18, 2026, the Ruby core team released Ruby 4.0.10, 3.4.13, and 3.3.14 to fix seven memory-safety flaws in the regular expression engine and in string case conversion. Ruby says proofs of concept show some of them lead to remote code execution. The most discussed flaw, Ruby2Shell (CVE-2026-132825), is reachable without authentication in default Rails and classic-style Sinatra applications, according to the researchers who reported it.
All seven flaws live in the Ruby interpreter, so bundle update changes nothing. The fix is a new Ruby binary in every container image, CI runner, and self-hosted application that carries one. This article explains the seven flaws, how they reach your applications, what security leaders should decide this week, and how RapidFort Curated Images and advisories get you to a fixed Ruby runtime.
What are the Ruby Regexp and string case conversion vulnerabilities?
Ruby's security advisory lists seven flaws: two in string case conversion and five in the regular expression engine. For six of them, Ruby says proofs of concept show remote code execution or attacker-controlled memory corruption. The seventh discloses memory or crashes the process. No exploitation has been reported so far.
As of November 19, 2026, only one of the seven has a CVE ID. CVE-2026-132825 maps to GHSA-34m4-m9fh-gqp5, the case conversion overflow named Ruby2Shell. Ruby has requested CVE IDs for the other six and tracks them by their GitHub Security Advisory (GHSA) IDs until they're assigned.
| Advisory | Flaw | Triggered by | CVE |
|---|---|---|---|
| GHSA-34m4-m9fh-gqp5 (Ruby2Shell) | One-byte heap buffer overflow in string case conversion | Changing the case of a crafted string | CVE-2026-132825 |
| GHSA-87fm-7w84-j2px | Integer overflow in string case conversion, causing a heap buffer overflow | Changing the case of a crafted string | Pending |
| GHSA-7x2q-68qv-6p8x | Double free in regex compilation | Compiling an attacker-controlled pattern | Pending |
| GHSA-3p8q-wmhx-vm2w | Integer overflow in regex compilation, causing a heap buffer overflow | Compiling an attacker-controlled pattern | Pending |
| GHSA-wpqw-5qxg-m68r | Out-of-bounds read in case-insensitive regex matching | Matching against an attacker-controlled pattern | Pending |
| GHSA-7whj-cfh7-xgm4 | Heap buffer overflow in Regexp#to_s | Converting a crafted regex to a string | Pending |
| GHSA-pvgc-g7gj-pv6h | Out-of-bounds read in case-insensitive backreference matching | Matching a crafted string | Pending |
The affected versions are Ruby 3.3.13 and earlier, 3.4.0 through 3.4.12, and 4.0.0 through 4.0.9. The fixed versions are 3.3.14, 3.4.13, and 4.0.10. Ruby 3.2 and earlier are end of life and won't get these fixes. The researchers report that the Ruby2Shell code has been in Ruby since 2.4.0.
The severity ratings disagree. The CVE record scores Ruby2Shell 7.4 (High) under CVSS 3.1, with a local attack vector and high attack complexity. Ruby's advisory rates it Critical, and the researchers rate it network-reachable with no authentication. Plan around the network-reachable assessment until the scores converge.
How do these flaws show up in a Ruby application?
The triggers are ordinary operations on text your application receives. That's why the exposure is wide even though the bugs sit deep in the interpreter.
Changing the case of untrusted text
According to the Ruby2Shell research write-up, most of Ruby's single-byte encodings, such as ISO-8859-1 and Windows-1252, have no capital form of the German character ß. Upcasing it produces two bytes (SS), but the conversion loop checks for room for only one. The output buffer is the input length plus 20 bytes, so a string with 21 ß characters writes one byte past the end of the buffer.
The overflow is reached through upcase, swapcase, downcase(:fold), and casecmp?. UTF-8 strings take a different code path and aren't affected by Ruby2Shell. The researchers say Rails and classic-style Sinatra reach the vulnerable code in their default configuration. Other frameworks and plain Rack aren't exposed by default, but application code that upcases strings in a legacy encoding is.
Ruby's advisory describes the encoding limit only for Ruby2Shell. Upgrade regardless of which encodings your application uses, since the other case conversion flaw, GHSA-87fm-7w84-j2px, carries no such limit in the advisory.
Regular expressions built from request data
Four of the regex flaws need an attacker-controlled pattern. Search filters, rule builders, and admin tools that accept a pattern from the user are the usual sources. Code like this compiles whatever the request sends:
# Compiles attacker-controlled input into a regex
pattern = Regexp.new(params[:filter], Regexp::IGNORECASE)
results = records.select { |r| r.name.match?(pattern) }
Ruby publishes no workaround. Until you upgrade, stop compiling patterns from untrusted input and treat that as risk reduction rather than a fix.
Ruby you didn't install yourself
Ruby reaches production through base images such as ruby:3.3, CI runners, developer laptops that use rbenv, rvm, or asdf, and self-hosted products that bundle their own interpreter. As of November 19, 2026, the researchers list the latest releases of GitLab (19.6.0, bundling Ruby 3.3.13), GitHub Enterprise Server (3.22.5, bundling Ruby 4.0.9), Mastodon, OpenProject, Discourse, and Chatwoot as shipping an affected Ruby. For these products, you wait for the vendor's fixed release.
Watch Ruby application logs for unexpected crashes that print [BUG] or Segmentation fault. They may indicate exploitation attempts against an unpatched runtime.
Why bundle update won't fix Ruby2Shell
Bundler manages gems. The interpreter comes from your base image, an OS package, or a version manager, and Gemfile.lock doesn't record it. Teams that patch dependencies by refreshing lockfiles will see a clean build and still ship the vulnerable runtime. Use this sequence instead:
- Inventory the Ruby inside each image, not on the host. The host's Ruby says nothing about what your containers run.
# Check the runtime inside an image docker run --rm --entrypoint ruby <image>:<tag> -v # Find where your repositories pin a Ruby version grep -rnE '^FROM .*ruby' --include='Dockerfile*' . grep -rn '^ruby ' Gemfile .tool-versions 2>/dev/null; cat .ruby-version 2>/dev/null
- Update every pin to 3.3.14, 3.4.13, or 4.0.10: base image tags,
.ruby-version,.tool-versions, and therubydirective in yourGemfile. - Rebuild without cached layers so the build pulls the new base image, for example with
docker build --pull --no-cache. - Redeploy and restart every Ruby process. A running process keeps the old interpreter loaded until it restarts.
- Plan the move for Ruby 3.2 and earlier. These versions get no fix, so the only remediation is a supported release line.
How RapidFort helps you move to a fixed Ruby runtime
RapidFort Images keep the OS, language stack, and version tags you already use, so moving to a fixed runtime is a tag change in your FROM line once the fixed tag is published:
# Before FROM [INSERT RAPIDFORT REGISTRY PATH]/ruby:3.3.13 # After the fixed tag is published FROM [INSERT RAPIDFORT REGISTRY PATH]/ruby:3.3.14
After you redeploy, RapidFort Runtime monitors running workloads for CVEs, which shows you any container still running an old interpreter because it never restarted.
If you run GitLab, RapidFort offers curated GitLab images through its partnership with GitLab.
Optimizing/Hardening an image removes the components your application doesn't use, but a Ruby application uses the Ruby interpreter, so the fix here is an upgraded runtime.
Schedule time with RapidFort to close your Ruby exposure
A 30-minute session with the RapidFort team covers your Ruby inventory, maps each affected image to its fixed curated tag, and builds a plan for any Ruby 3.2 and earlier workloads before the public proof of concept lands.
Latest posts
Eliminate Attack Vectors at the Source
Continuously eliminate up to 99.9% of CVEs without code changes
Products
Use Case
Quicklinks
Stay in touch
Subscribe for product updates and RapidFort newsletter.
Address
440 North Wolfe Road, Sunnyvale, CA 94085
© 2026 RapidFort, Inc.
RapidFort, RAPIDFORT, and RBOM® are registered trademarks of RapidFort, Inc. All other marks and names mentioned herein may be trademarks of their respective companies.



