Skip to main content

Ruby Fixes Seven Memory Bugs, Five With Code-Execution Proofs of Concept, and Ruby 3.2 Gets No Patch

Ruby 4.0.10, 3.4.13 and 3.3.14 fix seven flaws in regular expressions and string case conversion, and the project says proof-of-concept code exists for five. Which versions are exposed, how to find every Ruby you run, and what to ask a supplier.

KBY News Desk8 min read
A close-up shot of a person coding on a laptop, focusing on the hands and screen.

The Ruby project fixed seven memory-safety flaws in its regular expression engine and in string case conversion on Wednesday 18 November, and its own advisory says proof-of-concept code already shows remote code execution for five of them. The fixes are in Ruby 4.0.10, 3.4.13 and 3.3.14. Ruby 3.2 and anything older is end of life and gets no patch at all. Four days on, the picture is a little clearer: the worst bug now has a CVE number and a name, “Ruby2Shell”, and Veria Labs says it plans to publish its proof of concept once the big vendors have shipped fixes. If you run Ruby, the useful question this Sunday is not whether the bug is easy to exploit, but how many places in your estate carry a Ruby you did not install on purpose.

We are writing this as analysis rather than breaking news because the advisory is four days old and the story has moved on since. We have no sign that anyone is exploiting any of the seven flaws, and neither the advisory nor SecurityWeek’s report says anyone is.

#Who is exposed, and who is not

The Ruby security team lists the affected versions plainly: Ruby 3.3.13 and earlier, Ruby 3.4.0 through 3.4.12, and Ruby 4.0.0 through 4.0.9. The team “strongly” recommends upgrading to 4.0.10, 3.4.13 or 3.3.14. It adds that Ruby 3.3 is in its security maintenance phase, while Ruby 3.2 and earlier have reached end of life and will not receive these fixes. That last sentence matters more than it looks. Plenty of production applications still run 3.2 or older because nothing forced them off it. For those, “apply the patch” is not available, and the real task is a version upgrade, which takes a different kind of planning.

Not everyone running Ruby is equally exposed. Several of the bugs only matter if the application compiles regular expressions built from attacker-controlled text, which most applications avoid. The case-conversion bugs are different, because they trigger on ordinary-looking operations on external text. According to Veria Labs, quoted by SecurityWeek, an unauthenticated attacker could reach the worst one in a default Ruby configuration through Rails or through classic-style Sinatra applications, and possibly through other frameworks. WatchTowr, the exposure management firm SecurityWeek spoke to, put it more broadly: any Ruby application that changes the case of external text in a single-byte encoding is affected.

#The seven bugs in one table

The advisory refers to the flaws by GitHub Security Advisory identifiers because CVE numbers had not been assigned when it was posted. SecurityWeek reports that the case-conversion heap overflow, which it says is dubbed Ruby2Shell, now carries CVE-2026-132825 with a CVSS score of 7.4, and that identifiers for the other four bugs with code-execution proofs of concept were still awaited. The table uses the project’s own identifiers throughout.

Advisory IDWhereWhat the project says
GHSA-34m4-m9fh-gqp5String case conversionOne-byte heap buffer overflow; PoC shows code execution in some scenarios
GHSA-87fm-7w84-j2pxString case conversionInteger overflow leading to a heap overflow; PoC shows code execution in some scenarios
GHSA-7x2q-68qv-6p8xRegular expression compilationDouble free; matters where attacker-controlled patterns are compiled; PoC shows code execution in some scenarios
GHSA-3p8q-wmhx-vm2wRegular expression compilationInteger overflow leading to a heap overflow; PoC shows code execution in some scenarios
GHSA-7whj-cfh7-xgm4Regexp#to_sHeap buffer overflow; information disclosure or code execution; PoC shows code execution in some scenarios
GHSA-wpqw-5qxg-m68rCase-insensitive matchingOut-of-bounds read; PoC shows attacker-controlled memory corruption
GHSA-pvgc-g7gj-pv6hCase-insensitive backreference matchingOut-of-bounds read; memory disclosure or a crash

Read the right-hand column carefully. “In some scenarios” is the project’s own hedge, and it is honest: a memory bug becomes code execution only when the surrounding conditions line up. That is why the next section matters.

#Why “hard to exploit” is not the same as “safe to leave”

WatchTowr’s Yordan Ganchev told SecurityWeek that exploiting Ruby2Shell in production would be hard. By his account, an attacker needs a particular memory layout, a non-glibc memory allocator, the right runtime configuration and application logic, and then has to defeat address space layout randomisation, the protection that hides where code sits in memory. He thinks the most likely outcome of a malformed request is a crash and service disruption rather than a takeover.

We think that is a fair reading of today’s risk, and a bad reason to wait. Our view is that three things shorten the comfortable period. First, the Ruby team itself says working code exists for five of the seven. Second, Veria Labs says it plans to release its proof of concept after major vendors have rolled out patches, which turns “someone has this privately” into “anyone can read it”. Third, a crash is not harmless for a service that sits behind a load balancer and handles customer logins: a request that reliably kills a worker process is a cheap denial-of-service tool even if it never becomes anything worse. We would patch internet-facing Ruby applications this week and the internal ones this month, and we would not let the word “challenging” in a researcher’s quote set the schedule.

The pattern is familiar. In recent days we have written about memory-safety flaws in other runtimes and libraries that sit under a lot of software, including PHP’s November security release, the Java4Shell flaw in OpenJDK and a double free in GPGME. In each case the patch was not the hard part. Knowing where the vulnerable copy lived was.

#Finding every Ruby you run

An afternoon of checking beats a month of guessing. These steps use nothing beyond what any admin or developer can run, and none of them needs a vulnerability scanner.

  1. Ask each server and build image for its Ruby. Run ruby -v on hosts, and inside containers. Compare the result with the fixed versions above: below 4.0.10, below 3.4.13 or below 3.3.14 in the same line means unpatched. Anything on 3.2 or older needs an upgrade plan, not a patch.
  2. Look in the places that pin a version. The .ruby-version file, the ruby line in a Gemfile, the base image named in a Dockerfile, and the Ruby version set in your CI configuration. A floating image tag may already have moved to a fixed release when you next build, but a pinned one will not, and a running container does not change until it is rebuilt and redeployed.
  3. Check the operating system’s own Ruby. Linux distributions package Ruby separately and backport fixes under the old version number, so ruby -v alone can mislead you. Use the distribution’s security tracker for the package, not the version string.
  4. List the applications that bundle Ruby. Many self-hosted products ship their own. According to Veria Labs, as SecurityWeek reports it, GitHub Enterprise Server is affected, while Chatwoot, GitLab, Mastodon, OpenProject and the Discourse base image have already patched. If you run any of these on your own servers, check that you have the release containing the fix, rather than assuming the vendor’s hosted service covers you.
  5. Ask suppliers directly. If an agency or contractor built a Rails or Sinatra site for you, ask which Ruby version it runs on and when it will be upgraded. The question to put in an email is: “Is the site running Ruby 4.0.10, 3.4.13 or 3.3.14 or later, and if not, by what date?”

#If you are a small business

Most small firms do not run Ruby on purpose. You are affected if a website, booking system or customer portal was built with Rails by an outside developer, or if you host one of the self-hosted tools listed above yourself. Nothing here is a reason to take a site offline. It is a reason to send the supplier one email this week asking for the Ruby version and an upgrade date, and to keep the reply. If the site runs on Ruby 3.2 or older, ask for a quote for the upgrade now, because the fixes will not arrive for that version and the supplier will need time.

#What we expect next

We expect the proof-of-concept code to become public within weeks, once Veria Labs judges that the large vendors have shipped fixes, and we expect scanning for vulnerable Rails applications to follow it. We expect the remaining CVE identifiers to be assigned soon, and distribution security trackers to catch up over the same period. We would be wrong about the timing if Veria Labs holds the code back for longer, or if the memory-layout conditions WatchTowr describes prove hard enough that nobody publishes a reliable exploit. Even then, the denial-of-service risk stays, and the end-of-life question for Ruby 3.2 does not go away.

What would change our advice: a report of exploitation in the wild, which would make this an emergency for internet-facing applications, or a vendor advisory showing that a product you run bundles an affected Ruby and cannot be updated yet. We will update this story if either happens, or if distributions publish their fixed packages.

Evidence trail

Sources and verification

Primary documentation and external technical references used in this article.

  1. 01Ruby project: Security advisories, multiple vulnerabilities in Regexp and String case conversion (18 November 2026)ruby-lang.org
  2. 02Ruby project: Ruby 4.0.10 released (18 November 2026)ruby-lang.org
  3. 03Ruby project: security page and advisory listruby-lang.org
  4. 04SecurityWeek: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE (20 November 2026)securityweek.com

About this page

Credited to

Dates

Published

Corrections

No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.

Reader Interaction

Comments

Add a thoughtful note on Ruby Fixes Seven Memory Bugs, Five With Code-Execution Proofs of Concept, and Ruby 3.2 Gets No Patch. Comments are checked for spam and held for moderation before appearing.

Loading comments...

Get new fixes by email.

New runbooks, configuration traps and fixes from KBY Technologies, about twice a week.