Last updated: November 19, 2026, 12:49 PM IST. ruby2shell is an evolving situation.
TLDR;
- ruby2shell is a one-byte heap buffer overflow (GHSA-34m4-m9fh-gqp5) in Ruby’s case conversion of strings in single-byte encodings such as ISO-8859-1 and Windows-1252.
- Ruby rates it Critical. A CVE ID is pending and no CVSS score is published yet.
- Ruby maintainers know of proof-of-concept exploits (PoCs) that achieve RCE in some scenarios. A public PoC is planned about a week after disclosure.
- Affected: Ruby 3.3.13 and earlier, 3.4.0 to 3.4.12, and 4.0.0 to 4.0.9. Fixed in 3.3.14, 3.4.13, and 4.0.10.
- Action: upgrade Ruby and restart your application processes.
After php2shell, http2shell, and nginx2root, we got ruby2shell on the day of GTA 6. Ruby is a programming language that runs web frameworks such as Rails and a large amount of self-hosted software. ruby2shell is a one-byte heap overflow in string case conversion that Ruby’s maintainers say may allow remote code execution (RCE).

Ruby rates it Critical, with a CVE ID pending. Stephan Lipp, a security researcher from AdaLogic, reported it to Ruby, and the Ruby project published the advisory on November 19, 2026.
The researchers state it is reachable without authentication over the network in the default configuration of Rails and Sinatra (classic style). Other frameworks and plain Rack are not exposed by default, though application code that upcases strings in a legacy encoding may be vulnerable.
Technical Details of Ruby2shell
Ruby2shell is an off-by-one error (CWE-193) in the case conversion loop for several ISO-8859 and Windows-125x encodings, present since Ruby 2.4.0. Most of these encodings have no capital form of the German character ß. Upcasing it produces two bytes (SS), but the loop checks for room for only one. The output buffer is the input length plus a fixed margin, so a crafted string with enough such characters writes one byte past the end of the buffer.
The overflow is reached through upcase, swapcase, downcase(:fold), and casecmp?. UTF-8 strings take a different code path and are unaffected. The written byte is S (0x53) when upcasing or s (0x73) when case-folding, and the attacker controls the buffer size through the input length. Copying the result out of the buffer also reads one byte out of bounds.
The attack vector is the network, with no authentication or user interaction required. No CVSS score or vector is published yet. The sources do not publish exploit steps, and the upstream fix is commit d582f8f.
Affected Products or Versions by Ruby2shell
ruby2shell affects Ruby on every platform, back to version 2.4.0. Frameworks that call the vulnerable code in their default setup, and self-hosted products that bundle an affected Ruby, inherit the exposure.
- Ruby 4.0: 4.0.0 to 4.0.9. Fixed in 4.0.10.
- Ruby 3.4: 3.4.0 to 3.4.12. Fixed in 3.4.13.
- Ruby 3.3: 3.3.13 and earlier. Fixed in 3.3.14.
- Ruby 3.2 and older: affected back to 2.4.0. These end-of-life versions have no patch.
- Frameworks affected by default: Rails and Sinatra (classic style).
- Bundled Ruby in the latest versions (as of November 19, 2026, 04:35 UTC): GitLab 19.6.0, GitHub Enterprise Server 3.22.5, Mastodon 4.7.5, OpenProject 17.9.7, Discourse 2026.10.1, and Chatwoot 4.20.0.
Detection of Ruby2shell
Exposure depends on the Ruby version your application runs, which may differ from the system Ruby. The sources publish no indicators of compromise (IOCs) or network signatures for ruby2shell.
- Run
ruby -vin the same environment and container image your application uses, and compare it with the affected ranges. - Check the bundled Ruby version of any self-hosted product against the vendor’s release notes.
- Review container images and CI base images for affected versions.
- Search application code for
upcase,swapcase,downcase(:fold), andcasecmp?applied to strings in ISO-8859 or Windows-125x encodings. - Inventory any Ruby 3.2 or older runtime, since these have no patch.
Mitigation for Ruby2shell
Upgrade Ruby to 3.3.14, 3.4.13, or 4.0.10. Rebuild container images on a fixed base and restart application processes so they load the new runtime. For self-hosted software, install the vendor’s fixed release, since the products listed above bundle an affected Ruby. Ruby 3.2 and older receive no patch, so plan a move to a supported series.
| Ruby series | Affected versions | Fixed version | Status |
|---|---|---|---|
| 4.0 | 4.0.0 to 4.0.9 | 4.0.10 | Patched |
| 3.4 | 3.4.0 to 3.4.12 | 3.4.13 | Patched |
| 3.3 | 3.3.13 and earlier | 3.3.14 | Patched |
| 3.2 and older | All releases back to 2.4.0 | None | End of life, no patch |
Workaround for Ruby2shell
The sources list no official workaround, so upgrading is the only documented fix. Until you can upgrade, these general measures limit exposure and leave the flaw in place.
- Identify the systems that could be affected, such as Rails or Sinatra applications and self-hosted products that bundle Ruby, and monitor them for unusual behavior or crashes.
- Limit or remove their internet exposure where possible, for example through a VPN, an allowlist, or trusted networks only.
- Take non-essential Ruby applications offline until they are patched.
How Astra Helps
As of now, we are monitoring the ruby2shell situation and will update this page once more details are confirmed. If you need help or guidance on ruby2shell, talk to our team.
Disclaimer: This advisory reflects information available as of November 19, 2026, 12:49 PM IST. Details such as the CVE ID, CVSS score, and PoC availability may change. We will update this page as more information comes in.
References: Ruby security advisory GHSA-34m4-m9fh-gqp5, published November 19, 2026



