Patch available Security news

Ruby fixes seven flaws in regular expressions and string case conversion, six may allow code execution

The Ruby maintainers released versions 4.0.10, 3.4.13 and 3.3.14 on 18 November 2026. They fix seven memory-safety bugs in the regular expression engine and in string case conversion. For six of them the maintainers warn of possible remote code execution and say they are aware of proof-of-concept code. No CVE IDs have been assigned yet and no exploitation has been reported. Here is who is affected and what to do.

Kyberkit editorial team · · event date · reading time 4 minutes · For admins and analysts

Patch available: Ruby

Key points

  • Who is affected: Ruby 3.3.13 and earlier, 3.4.0 to 3.4.12 and 4.0.0 to 4.0.9. Ruby 3.2 and older are end-of-life and will not be fixed.
  • Seven bugs: heap overflows in string case conversion, a double free and an integer overflow in regex compilation, out-of-bounds reads in case-insensitive matching, and a heap overflow in Regexp#to_s.
  • For six bugs the maintainers warn of possible code execution and say they know of proof-of-concept code. Some need the app to compile a regex from attacker input; two only need the app to change the case of a crafted string.
  • Fixed on 18 Nov 2026 in 4.0.10, 3.4.13 and 3.3.14. CVEs have been requested but, as of 19 Nov, not assigned - the bugs only have GHSA IDs.

What happened

On 18 November 2026 the Ruby maintainers shipped point releases 4.0.10, 3.4.13 and 3.3.14 together with a security advisory covering seven vulnerabilities in the regular expression engine and in string case conversion. For six of them the maintainers warn of possible remote code execution and say they are aware of proof-of-concept code that achieves it "in some scenarios". They "strongly recommend upgrading".

CVE IDs have been requested but were not assigned as of 19 November 2026, so we list the bugs by their GHSA IDs. No exploitation has been reported.

Technical details

All seven are memory-safety bugs in Ruby's C code, mostly on the heap. According to the maintainers:

GHSA Component Bug type Trigger
GHSA-34m4-m9fh-gqp5 string case conversion one-byte heap overflow changing the case of a crafted string
GHSA-87fm-7w84-j2px string case conversion integer overflow leading to heap overflow changing the case of a crafted string
GHSA-7x2q-68qv-6p8x regex compilation double free (character class intersection &&) compiling an attacker-supplied pattern
GHSA-3p8q-wmhx-vm2w regex compilation integer overflow leading to heap overflow compiling an attacker-supplied pattern
GHSA-7whj-cfh7-xgm4 Regexp#to_s heap overflow (data leak or code execution) converting a crafted pattern to a string
GHSA-wpqw-5qxg-m68r case-insensitive matching out-of-bounds read, memory corruption matching against a crafted pattern
GHSA-pvgc-g7gj-pv6h case-insensitive backreferences out-of-bounds read (memory leak or crash) matching a crafted string

The trigger is what matters. The four regex bugs need an application that builds patterns from attacker input (custom search expressions, filters, rule engines). The two case-conversion bugs only need a string whose case the application changes - a routine step in web apps that normalise emails, usernames or headers. The bugs were reported by Stephan Lipp (Ada Logics) with Anthropic, by researchers via HackerOne, and by Ruby developers. We do not describe how to exploit them.

Who is affected

  • Ruby 3.3.13 and earlier, 3.4.0-3.4.12 and 4.0.0-4.0.9.
  • Ruby 3.2 and older are end-of-life and will not get these fixes.
  • Apps on Rails, Sinatra, Hanami and other frameworks, Ruby services and scripts, tools that bundle Ruby, and container images built on older versions.
  • Linux distributions backport fixes into their own packages; with no CVEs yet, look for them in each distribution's security announcements.

How to tell if you were compromised

The maintainers have not published indicators of compromise. Based on the bug types (our inference, not vendor guidance): failed attempts to exploit memory corruption often crash the process. Repeated crashes of Ruby workers (Segmentation fault or [BUG] in Puma, Unicorn or Sidekiq logs) after requests with unusual text are worth investigating. To check your version:

ruby -v
docker images --format '{{.Repository}}:{{.Tag}}' | grep -i ruby

Once CVEs and scores are published, you can break them down in our CVSS calculator.

What to do

  1. Inventory Ruby versions on servers, in CI and in container images (.ruby-version, Dockerfile, Gemfile).
  2. Update to 4.0.10, 3.4.13 or 3.3.14 and rebuild images. For distribution packages, follow their advisories.
  3. Plan a move off Ruby 3.2 and older - those branches will not be fixed.
  4. Until you update, do not compile regexes from user input (Regexp.new(params[...])). The maintainers list no workaround for the case-conversion bugs.

Timeline

Timeline of the November 2026 Ruby security fixes18 Nov 2026: Ruby 4.0.10, 3.4.13 and 3.3.14 released, advisory on seven bugs; 19 Nov 2026: GHSA advisories published, CVEs requested and still pending; 19 Nov 2026: No known exploitation, maintainers aware of PoC code18 Nov 2026Ruby 4.0.10, 3.4.13 and3.3.14 released, advisory onseven bugs19 Nov 2026GHSA advisories published,CVEs requested and stillpending19 Nov 2026No known exploitation,maintainers aware of PoC code
Based on the Ruby maintainers' announcements and GitHub advisories

FAQ

My app never compiles regexes from user input. Am I safe?

Not necessarily. According to the maintainers, two of the bugs (GHSA-34m4-m9fh-gqp5 and GHSA-87fm-7w84-j2px) are triggered just by changing the case of a crafted string. Calling downcase or upcase on user input is common in web apps, for example to normalise email addresses or usernames. Update.

I use Ruby from my Linux distribution. What should I look for?

Distributions usually backport fixes into packages with older version numbers. Since no CVEs are assigned yet, follow your distribution's security announcements, and its security tracker once the CVEs appear.

Does this affect Ruby on Rails?

The bugs are in Ruby itself, not in Rails. But every Rails app runs on Ruby, so the interpreter needs updating. This is unrelated to the November Rails fixes for Active Storage.

Sources

  1. Ruby - Security advisories: multiple vulnerabilities in Regexp and String case conversion (18 Nov 2026)
  2. ruby/ruby - Security advisory GHSA-7x2q-68qv-6p8x: Double free in regular expression compilation
  3. Ruby - Ruby 4.0.10 Released (18 Nov 2026)
  4. Ruby - Ruby 3.4.13 Released (18 Nov 2026)
  5. Ruby - Ruby 3.3.14 Released (18 Nov 2026)

Spotted a mistake? Let us know and we will correct it openly.