Pull to refresh
Logo
Ruby patches a one-byte overflow that researchers say reaches pre-auth code execution on stock Rails

Ruby patches a one-byte overflow that researchers say reaches pre-auth code execution on stock Rails

New Capabilities

Fixed Ruby releases are out; the analysis that named the flaw Ruby2Shell says default Rails and Sinatra installs are exposed

Overview

Updated 59 minutes ago

The German letter ß uppercases to two characters, SS. Ruby's C loop for case conversion checks there is room for the first byte and not the second, so a string holding 21 of those letters writes one byte past the end of its buffer. On 18 November 2026 the Ruby team released 4.0.10, 3.4.13 and 3.3.14 to close that flaw and six others.

What makes it more than a patch note is where the bug lives: in the interpreter, not in application code. Default Rails and classic Sinatra reach it with no misconfiguration, and the advisory lists GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot as shipping affected Rubies. Verial Labs, the firm that named the flaw Ruby2Shell, says a proof of concept follows in about a week.

Why it matters

If you run Rails, Sinatra, GitLab, Mastodon or Discourse on an unpatched Ruby, an attacker may not need a login to run code.

Questions about this story

Free account needed to ask — your question is kept and asked for you right after sign-up. Answers are public.

No questions yet — be the first to ask.

Key Indicators

7
Ruby vulnerabilities fixed in one batch
Ruby's maintainers say proof-of-concept code achieves code execution for five of the seven.
21
Sharp-s characters needed to overflow the buffer
The output buffer is sized to input length plus 20 bytes; every ß adds one byte.
1
Bytes written past the end of the buffer
The stray byte is 'S' (0x53) when upcasing and 's' (0x73) when case-folding.
3
Patched Ruby releases
4.0.10, 3.4.13 and 3.3.14. Ruby 3.2 and older are end-of-life and get no fix.
6
Self-hosted products listed as running affected Rubies
GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot.
7
Days until the researchers publish a proof of concept
Verial Labs says it is holding the exploit back to give operators time to upgrade.

Voices

Curated perspectives — historical figures and your fellow readers.

Sign up to generate historical perspectives on this story.

People Involved

Organizations Involved

Timeline

2016 November 2026

3 events Latest: Today
  1. Flaw named Ruby2Shell, RCE claimed on stock Rails

    Today Disclosure

    Verial Labs says default Rails and Sinatra are exploitable before login, and holds back its exploit for about a week.

  2. Ruby ships 4.0.10, 3.4.13 and 3.3.14

    Patch

    Seven advisories in one batch; maintainers confirm proof-of-concept code reaches code execution for five.

  3. Off-by-one enters Ruby 2.4.0

    Origin

    The case-conversion loop checks room for one output byte, then writes two for ß. The flaw survives ten years of releases.

Scenarios

1

Public exploit lands and internet-facing Rails apps get scanned

Possible Resolves by Jan 15, 2027

Discussed by: Verial Labs, which says it will publish a proof of concept about a week after 19 November

The write is one byte, but the Ruby maintainers already say proof-of-concept code achieves code execution in some settings. Once a chain is public, automated scanners tend to absorb it within days. The variable that decides the damage is how many of the six named products have rebuilt against a fixed interpreter by then.

2

Proof of concept slips, and the one-byte primitive stays a lab curiosity

Uncertain Resolves by Dec 18, 2026

Discussed by: Security commentators, including Sekurak, who argue a single controlled byte makes stable exploitation hard

The stray byte has a fixed value, 'S' or 's', and lands immediately after a heap buffer whose size the attacker sets through input length. Sceptics argue that produces crashes more readily than reliable control flow, and the RCE claim rests on demonstrations nobody outside the reporting group has seen. If no working chain appears within a month, the practical risk narrows to denial of service.

3

Downstream vendors rebuild on patched Ruby before anyone exploits the gap

Likely Resolves by Feb 28, 2027

Discussed by: The Ruby advisory, which tells operators of packaged software to install vendor releases rather than swapping interpreters

GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot each bundle their own interpreter, so the fix reaches their users only through a vendor release. If those releases land within weeks, most exposed installs close the hole without anyone touching an application's dependencies.

Historical Context

3 moments from history that rhyme with this story — and how they unfolded.

April 2014

Heartbleed (2014)

A missing bounds check in OpenSSL's heartbeat extension let anyone read up to 64 kilobytes of a server's memory with one request. The bug had been in OpenSSL 1.0.1 for about two years before researchers at Google and the firm Codenomicon reported it on 7 April 2014.

Then

Patches shipped within days, and operators raced to reissue certificates and reset passwords.

Now

The episode pushed major open-source projects toward funded security audits and made library-level bugs a board-level concern.

Why this matters now

Ruby2Shell has the same shape: a bounds-check error in a dependency almost nobody inspects, rather than in the application built on top of it.

March-September 2017

Equifax and the Apache Struts patch (2017)

A remote code execution flaw in the Apache Struts framework, CVE-2017-5638, was patched in March 2017. Equifax did not apply the fix. Attackers used it to reach records on about 147 million people, a breach the company disclosed in September 2017.

Then

The chief executive resigned and the company faced congressional hearings and federal penalties.

Now

It became the standard example of exposure that comes from an unapplied patch rather than an unknown bug.

Why this matters now

The Ruby fix exists now. The installs that stay exposed will be the ones that never restart on the new interpreter.

December 2021

Log4Shell (December 2021)

A lookup feature in the Log4j 2 logging library let a crafted string in a log line trigger a download and execution of remote code. Because the library sat inside thousands of products, the flaw reached systems whose operators had never chosen to use it.

Then

Vendors shipped emergency updates for months as new bypasses appeared.

Now

It set the current practice of tracking software bills of materials, since few operators knew where the library ran.

Why this matters now

Products that bundle Ruby inherit this fix only when they rebuild, which is why the advisory points at GitLab and Mastodon rather than at application developers.

Sources

(9)