Skip to content
NewA calmer, faster ZeroHour

Ruby sharp-s upcase bug enables pre-authentication RCE on default Rails

Original title: Ruby2ßhell: Pre-authentication RCE on stock Rails

Hacker News · securityby jdns ()2 min read2
Part of a story covered by 4 sourcesRuby patches Ruby2Shell one-byte heap overflow in case conversionMerged summary & timeline
AI summary · x-ai/grok-4.7Summaries by Vani AI

Ruby 3.3.14, 3.4.13 and 4.0.10 fix a one-byte heap overflow; a proof of concept is due in a week.

A one-byte heap overflow in Ruby's single-byte encoding upcase path, present since Ruby 2.4.0, is reachable before authentication on default Rails and classic-style Sinatra. Upcasing a sharp s writes two bytes while the loop checks room for one; 21 of them overflow a buffer sized to the input length plus 20. UTF-8 takes a different path and is not affected. Fixed releases are Ruby 3.3.14, 3.4.13 and 4.0.10; Ruby 3.2 and older are end of life.

Unconfirmed: The write-up does not say whether attackers already exploit the flaw; the proof of concept is not yet published.

Key facts
  • Ruby 4.0.0 to 4.0.9 is fixed in 4.0.10.
  • Ruby 3.4.0 to 3.4.12 is fixed in 3.4.13; 3.3.0 to 3.3.13 in 3.3.14.
  • GitLab 19.6.0 bundles affected Ruby 3.3.13.
  • GitHub Enterprise Server 3.22.5, Mastodon 4.7.5 and OpenProject 17.9.7 bundle Ruby 4.0.9.
  • Discourse 2026.10.1 bundles 3.4.7; Chatwoot 4.20.0 bundles 3.4.4.
Security assessment · AI, from the article

Impact: pre-authentication remote code execution on default Rails

ProductAffectedFixed in
Ruby4.0.0 to 4.0.9; 3.4.0 to 3.4.12; 3.3.0 to 3.3.13; 3.2 and older back to 2.4.04.0.10, 3.4.13, 3.3.14
Railsdefault configuration on an affected Ruby—
Sinatraclassic style on an affected Ruby—
GitLab19.6.0 (bundled Ruby 3.3.13)—
GitHub Enterprise Server3.22.5 (bundled Ruby 4.0.9)—
Mastodon4.7.5 (bundled Ruby 4.0.9)—
OpenProject17.9.7 (bundled Ruby 4.0.9)—
Discourse2026.10.1 (bundled Ruby 3.4.7)—
Chatwoot4.20.0 (bundled Ruby 3.4.4)—
What to do
  1. 1.Upgrade Ruby to 3.3.14, 3.4.13, or 4.0.10.
  2. 2.Install the vendor's fixed release for self-hosted software that bundles an affected Ruby.
Analyze this story with Vani AIImpact, who is affected and what defenders should do, in a new chat

From the original article

2 min read at verialabs.com

The bug is reachable from the following frameworks in their default configuration. Other frameworks are not exposed by default, but application code that upcases strings received in a legacy encoding may also be vulnerable. The latest version of the following popular software bundles an affected Ruby.

Hacker News · security

By jdns · verialabs.com

Read the full article at Hacker News · security

A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.