Skip to main content
osky
Sección
Technology

On November 18, 2026, the Ruby team published an advisory covering seven vulnerabilities in its regular expression engine and in string case conversion, and shipped Ruby 4.0.10, 3.4.13 and 3.3.14 to fix them. One of them already has a movie-sounding name: Ruby2Shell (CVE-2026-132825), a one-byte overflow that, according to Veria Labs, allows unauthenticated remote code execution on a stock Rails app. If you have anything in Ruby exposed to the internet, or a self-hosted GitLab, Mastodon or Discourse, this concerns you.

What happened

The official Ruby advisory says it is aware of proofs of concept demonstrating remote code execution with some of these flaws and asks people to upgrade: "We strongly recommend upgrading". The affected versions are 3.3.13 and earlier, 3.4.0 through 3.4.12, and 4.0.0 through 4.0.9. Ruby 3.2 and earlier have already reached end of life and will not get a patch.

Veria Labs, which named the flaw, published the technical analysis and notes that Rails and Sinatra in classic style expose it in their default configuration; other frameworks and bare Rack do not, unless your code uppercases text that arrives in a legacy encoding. Ruby's advisory credits Stephan Lipp (Ada Logics) and Anthropic with finding the underlying flaw; Veria says it found it independently and was the first to demonstrate remote code execution.

The bug, in plain English

In most single-byte encodings (the ISO-8859 and Windows-125x families), the German ß has no uppercase form of its own: when you uppercase it, it becomes "SS", two bytes. According to Veria, the loop that does the conversion only checked for room for one. Ruby reserves the length of the input plus 20 bytes for the result, so with 21 ß letters the output overshoots by one byte and writes an "S" into memory that doesn't belong to it. It's triggered with upcase, swapcase, downcase(:fold) and casecmp?, and the code has been there since Ruby 2.4.0. UTF-8 strings take a different path and are not affected. The fix is in commit d582f8f.

Diagram: an input with 21 ß letters is converted to uppercase and the last "S" lands one byte outside the output buffer, which Ruby reserves with n + 20 bytes

One byte sounds like nothing. But a well-placed byte in the heap is exactly what an exploit needs to start moving pieces around.

Who is exposed

Besides your own apps, a lot of self-hosted software ships its own Ruby, and there the patch depends on the vendor. As of November 20, according to Veria Labs's table:

Software Fixed version
GitLab 19.6.1, 19.5.8 and 19.4.10
Mastodon 4.7.6, 4.6.12, 4.5.22 and 4.4.29
OpenProject 17.9.8 and 17.8.3
Discourse (base image) 2.0.20261119-0203
Chatwoot 4.20.1
GitHub Enterprise Server No patch yet (3.22.5 and earlier, vulnerable)

GitLab confirmed its critical patch on November 20: the official packages and container images already ship the fixed Ruby, and GitLab.com and Dedicated were already protected. If you build GitLab from source, you need to rebuild your Ruby with 3.3.14 or 3.4.13.

Table of affected and fixed Ruby versions, status of self-hosted software that ships its own Ruby, and four steps to mitigate Ruby2Shell

What to do today

  1. Update Ruby to 4.0.10, 3.4.13 or 3.3.14. Ruby doesn't offer an alternative mitigation in its advisory.
  2. Actually restart. Web servers, Sidekiq workers, jobs: everything that has the old interpreter loaded. Aikido also recommends rebuilding container images and checking everything that pins a version, such as .ruby-version and Dockerfiles.
  3. Still on 3.2 or something older? No patch is coming. Time to migrate for real, and you were already late.
  4. GitHub Enterprise Server exposed? Until there's a fixed version, Aikido suggests taking it off the internet with a VPN or an IP allowlist.

Panic or calm?

There's disagreement here. The NVD rates the flaw CVSS 7.4 (high), while the Ruby team marked it as critical, as GitLab explains. OX Security published that Ruby2Shell is "more marketing than real risk": no exploitation has been reported, and turning a one-byte overflow into code execution requires very specific conditions.

My take: OX is right that this isn't worth setting up a war room over the weekend, but the clock is already ticking. Veria announced it will publish its proof of concept against stock Rails on November 25, or later if the major vendors haven't patched. Once the exploit is public, the "very specific conditions" conversation ends fast. If you have Ruby facing the internet, you have one week to make this stop being your problem.

Sources