Security

Ruby2Shell (CVE-2026-132825): One-Byte Heap Overflow Exposes Default Rails, Sinatra, and GitLab Stacks

On November 18, 2026, the Ruby core team released 4.0.10, 3.4.13, and 3.3.14 to fix seven memory-safety flaws, led by Ruby2Shell (CVE-2026-132825 / GHSA-34m4-m9fh-gqp5). Reachable without authentication in default Rails and classic Sinatra configurations—and bundled inside GitLab 19.6.0—the interpreter bug cannot be fixed by updating gems alone. Learn why ISO-8859-1 and Windows-1252 case conversion overflows the heap and how to deploy CrowdSec virtual patches while upgrading Ruby.

By 0xScorPionSon

8 min read

Ruby2Shell (CVE-2026-132825): One-Byte Heap Overflow Exposes Default Rails, Sinatra, and GitLab Stacks

Ruby2Shell CVE-2026-132825 Ruby heap overflow RCE infographic

Executive Summary

On November 18, 2026, the Ruby core team shipped Ruby 4.0.10, 3.4.13, and 3.3.14, patching seven memory-safety vulnerabilities in CRuby's regular expression engine and string case-conversion code. The most severe flaw—CVE-2026-132825 (GHSA-34m4-m9fh-gqp5), dubbed Ruby2Shell (or ruby2ßhell) by Veria Labs and reported to Ruby by Stephan Lipp (Ada Logics) and Anthropic—is a one-byte heap buffer overflow in string case conversion present in Ruby since version 2.4.0.

Ruby's maintainers rate CVE-2026-132825 Critical and state they are "aware of PoCs that prove this flaw can be used to trigger RCE in some scenarios" (MITRE/NVD scores it CVSS 3.1 7.4 High). According to Veria Labs, the bug is reachable without authentication over the network in default Ruby on Rails and classic-style Sinatra applications, as well as bundled products like GitLab 19.6.0 (which ships Ruby 3.3.13), GitHub Enterprise Server, Mastodon, and Discourse. Crucially, because the defect lives inside the CRuby C interpreter, updating Rails or running bundle update does not fix it.

As of November 19–20, 2026, no wild exploitation has been reported and CVE-2026-132825 is not in CISA's KEV catalog. However, Veria Labs plans to publish a working proof-of-concept exploit roughly one week after disclosure. Ruby 3.2 and earlier are end-of-life (EOL as of April 1, 2026) and receive no fixes. Organizations should immediately upgrade Ruby to 4.0.10, 3.4.13, or 3.3.14, rebuild container images, restart all Ruby processes, and consider CrowdSec's free virtual patch (crowdsecurity/vpatch-CVE-2026-132825) as an interim stopgap for default Rails routes.

Advisory / CVE ID Component & Mechanism Severity / PoC Status Fixed Releases
CVE-2026-132825 (GHSA-34m4-m9fh-gqp5) String case conversion (ISO-8859-1 / Windows-1252) 1-byte heap overflow Critical (Ruby) / 7.4 (NVD); RCE PoC known 4.0.10, 3.4.13, 3.3.14
GHSA-7x2q-68qv-6p8x Double free in regular expression compilation PoC for RCE in some scenarios 4.0.10, 3.4.13, 3.3.14
GHSA-87fm-7w84-j2px Integer overflow in string case conversion PoC for RCE in some scenarios 4.0.10, 3.4.13, 3.3.14
GHSA-wpqw-5qxg-m68r Out-of-bounds read in case-insensitive Regexp matching PoC for RCE in some scenarios 4.0.10, 3.4.13, 3.3.14
GHSA-3p8q-wmhx-vm2w Heap buffer overflow in regular expression compilation PoC for RCE in some scenarios 4.0.10, 3.4.13, 3.3.14
GHSA-7whj-cfh7-xgm4 Heap buffer overflow in Regexp#to_s Attacker-controlled memory corruption PoC 4.0.10, 3.4.13, 3.3.14
GHSA-pvgc-g7gj-pv6h Out-of-bounds read in case-insensitive backreference matching No PoC noted in advisory 4.0.10, 3.4.13, 3.3.14

Technical Mechanics and Architecture

How a Single-Byte Case-Conversion Overflow Reaches the Heap

In Ruby, string case conversion methods (such as converting a string to uppercase) allocate an output buffer sized for the expected character transformation. When processing text in legacy single-byte encodings—such as ISO-8859-1 or Windows-1252—converting certain characters (notably the German sharp s ß / ruby2ßhell, which expands to two bytes when uppercased) caused Ruby's allocator to underestimate the required output buffer by one byte, writing one byte past the end of the heap-allocated result.

According to Orca Security and watchTowr (November 19–20, 2026), Ruby 4.0.10, 3.4.13, and 3.3.14 fix CVE-2026-132825 by ensuring two bytes of output space are allocated when sharp s is converted. While a single-byte heap overflow does not produce an instant universal shell on every codebase, attackers can leverage that out-of-bounds write to corrupt adjacent heap metadata or object pointers—and Veria Labs confirmed an unauthenticated network path in default Rails and classic-style Sinatra applications.

Interpreter & Bundled Runtime Exposure Architecture

+-------------------------------------------------------------------------+
|                    UNAUTHENTICATED HTTP REQUEST                         |
|  - Sends crafted ISO-8859-1 / Windows-1252 input to default Rails or    |
|    classic Sinatra route (or app code upcasing legacy-encoded strings)   |
+------------------------------------+------------------------------------+
                                     |
                                     v
+-------------------------------------------------------------------------+
|        CRUBY INTERPRETER (< 4.0.10 / < 3.4.13 / < 3.3.14)               |
|  - Gem updates (bundle update Rails) DO NOT patch C interpreter         |
|  - Case conversion writes 1 byte past allocated heap buffer             |
|  - Heap corruption -> Process Crash (DoS) or RCE in Worker UID          |
+------------------------------------+------------------------------------+
                                     |
         +---------------------------+---------------------------+
         |                           |                           |
         v                           v                           v
  [Rails / Sinatra]         [GitLab 19.6.0]            [Mastodon / Discourse]
  (Default Configs)       (Bundles Ruby 3.3.13)        (Containerized Runtimes)

Defensive Fleet Audit & Virtual Patching Snippets

1. Safe Fleet Ruby & Bundled-App Inventory Script (Read-Only):

Because Ruby is frequently bundled inside Omnibus packages (like GitLab), containers, and rbenv/asdf/rvm installations, check every Ruby binary on the host—not just /usr/bin/ruby:

#!/usr/bin/env bash
# Read-only Ruby2Shell (CVE-2026-132825) host and container runtime audit
set -euo pipefail

echo "=== System & Bundled Ruby Binaries ==="
while IFS= read -r bin; do
    ver=$("$bin" -v 2>/dev/null || true)
    echo "$bin -> $ver"
done < <(find /usr /opt /home /var -name ruby -type f -executable 2>/dev/null | head -n 50)

echo "=== Running Docker Containers with Ruby ==="
if command -v docker >/dev/null 2>&1; then
    for cid in $(docker ps -q); do
        rver=$(docker exec "$cid" ruby -v 2>/dev/null || true)
        if [[ -n "$rver" ]]; then
            echo "Container $cid ($(docker inspect -f '{{.Name}}' "$cid")): $rver"
        fi
    done
fi

2. CrowdSec Interim Virtual Patching (Default Rails Path Stopgap):

As CrowdSec documented on November 20, 2026, crowdsecurity/vpatch-CVE-2026-132825 blocks the known pre-auth Ruby2Shell exploit request on default Rails paths—but cannot protect custom application code that calls .upcase on legacy-encoded input elsewhere:

# Install CrowdSec virtual patch stopgap while scheduling Ruby interpreter upgrade
sudo cscli appsec-rules install crowdsecurity/vpatch-CVE-2026-132825
sudo systemctl reload crowdsec

Evidence & Operational Impact

Cloud & Platform Rollouts

  • AWS Elastic Beanstalk (2026-193-aws): On November 20, 2026, AWS published Security Bulletin 2026-193-aws, confirming that AWS Elastic Beanstalk released updated Ruby platforms on Amazon Linux 2023 (platform version 4.15.4) on November 19, 2026 with Ruby 3.3.14, 3.4.13, and 4.0.10.
  • Self-Hosted GitLab & Discourse: CrowdSec noted on November 20, 2026 (citing Veria Labs) that GitLab 19.6.0 bundles Ruby 3.3.13 (vulnerable) and recommends keeping unpatched GitLab instances off the public internet until a fixed Omnibus release ships. Cloudflare Radar noted discourse_docker updated to Ruby 4.0.10 on November 19, 2026.

Source Nuances & Missing Benchmarks

  • CVE Assignment Lag: While CVE-2026-132825 (GHSA-34m4-m9fh-gqp5) was published by MITRE on November 19, 2026, the remaining six November 18 Ruby advisories (GHSA-7x2q-68qv-6p8x, GHSA-87fm-7w84-j2px, GHSA-wpqw-5qxg-m68r, GHSA-3p8q-wmhx-vm2w, GHSA-7whj-cfh7-xgm4, GHSA-pvgc-g7gj-pv6h) still used GHSA IDs pending CVE assignment at publication.
  • Performance Benchmarks: Quantitative throughput or memory benchmarks comparing Ruby 4.0.10, 3.4.13, and 3.3.14 against prior releases are unavailable in the fetched advisories.

Hardening Playbook

  1. Locate Every Ruby Runtime (Including Bundled Copies)

    • Inventory system Ruby packages, version managers (rbenv, rvm, asdf), background job workers (Sidekiq, Resque), container images, and Omnibus/self-hosted apps (GitLab, Mastodon, Discourse). Remember that Linux distros may backport patches without changing upstream minor strings—verify against your OS vendor's package advisory.
  2. Upgrade Ruby to 4.0.10, 3.4.13, or 3.3.14 and Restart Processes

    • Upgrade to Ruby 4.0.10, 3.4.13, or 3.3.14, rebuild all Docker/OCI images, and restart every web and background-worker Ruby process so no vulnerable interpreter stays resident in memory.
    • Migrate any workload still on Ruby 3.2 or earlier immediately, as 3.2 reached EOL on April 1, 2026 (and note that Ruby 3.3 legacy maintenance ends March 31, 2027).
  3. Deploy Interim WAF / Network Controls Where Patching Waits

    • Deploy crowdsecurity/vpatch-CVE-2026-132825 (or equivalent WAF rules) as a temporary stopgap for default Rails endpoints, avoid processing untrusted input in non-UTF-8 (ISO-8859-1 / Windows-1252) encodings per AWS 2026-193-aws, and restrict internet access to unpatched self-hosted apps like GitLab 19.6.0.
  4. Monitor for Worker Crashes & Post-Exploitation Execution

    • Alert on unexpected Puma/Unicorn/Passenger/Sidekiq worker SIGSEGV crashes, anomalous child shell executions spawned by ruby processes, and outbound connections from app containers.

    Example SIEM hunting query (Splunk/SPL-style) for unexpected child processes spawned by Ruby workers:

    index=edr OR index=auditd
    parent_process_name="ruby"
    process_name IN ("sh", "bash", "dash", "curl", "wget", "python3", "nc")
    | stats count values(command_line) as cmds by host, user, process_name, _time span=15m
    
  5. Rollback & Change-Control Notes

    • Run your application test suite in staging against 4.0.10, 3.4.13, or 3.3.14—specifically verifying any legacy-encoding (ISO-8859-1 / Windows-1252) string conversions and Regexp patterns—before rolling out to production. Keep previous container tags available for rapid rollback if an unrelated regression appears, while retaining WAF and network isolation if you must temporarily revert.

Frequently Asked Questions (FAQ)

1. Does running bundle update rails fix Ruby2Shell (CVE-2026-132825)? No. Ruby2Shell is a C-level heap buffer overflow inside the Ruby interpreter itself, not a Ruby gem. You must upgrade Ruby to 4.0.10, 3.4.13, or 3.3.14 and restart all Ruby processes.

2. Are Ruby 3.2 or older versions patched? No. Ruby 3.2 reached end-of-life on April 1, 2026 and receives no upstream fixes. Organizations on 3.2 or earlier must upgrade to a supported branch (3.3.14, 3.4.13, or 4.0.10).

3. Is Ruby2Shell being actively exploited in the wild? As of November 19–20, 2026, no wild exploitation has been reported and CVE-2026-132825 is not in CISA's KEV catalog. However, Veria Labs plans to publish a PoC roughly one week after disclosure, so patching is urgent.

4. Why is GitLab 19.6.0 affected? According to CrowdSec (citing Veria Labs on November 19, 2026), GitLab 19.6.0 bundles Ruby 3.3.13, which predates the 3.3.14 fix. Keep unpatched self-hosted GitLab instances off the public internet until a fixed build is applied.

5. Can a WAF completely protect my Ruby app until I upgrade? A WAF rule such as CrowdSec's vpatch-CVE-2026-132825 can block the known default Rails pre-auth request path, but it cannot protect custom application code that calls .upcase on legacy-encoded (ISO-8859-1 / Windows-1252) strings elsewhere. Treat WAF rules strictly as a stopgap.


Sources

  1. AWS Security Bulletin (2026-193-aws) — CVE-2026-132825 and related issues – Ruby regular expression and string case conversion. Published: November 20, 2026. URL: https://aws.amazon.com/security/security-bulletins/rss/2026-193-aws/
  2. watchTowr Intelligence — Ruby2Shell (CVE-2026-132825) FAQ: Ruby Exposure and Fix. Published: November 20, 2026. URL: https://watchtowr.com/intelligence/ruby-cve-2026-132825-faq/
  3. CrowdSec Blog — Ruby2Shell virtual patch: a free WAF rule while you upgrade Ruby. Published: November 20, 2026. URL: https://www.crowdsec.net/blog/ruby2shell-virtual-patching
  4. CVE.org — CVE-2026-132825 Record. Published: November 19, 2026. URL: https://www.cve.org/CVERecord?id=CVE-2026-132825
  5. OX Security — Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution. Published: November 19, 2026. URL: https://www.ox.security/blog/ruby2shell-ruby-memory-corruption-flaws-expose-applications-to-remote-code-execution-but-is-it-an-actual-risk/

More on Security

Security

ASUS Control Center Express CVSS 10.0 Flaw (CVE-2026-114202): Hard-Coded Key Enables Unauthenticated Fleet Takeover

ASUS released Control Center Express 1.7.29 to patch CVE-2026-114202 (CVSS 10.0), a hard-coded cryptographic key flaw that lets unauthenticated remote attackers forge administrator tokens and seize control of managed PC fleets. Companion flaws CVE-2026-114204 and CVE-2026-114205, along with Enterprise/Datacenter CVE-2026-126574 and Armoury Crate CVE-2026-112115, were also addressed. Learn why you must update both the server and managed endpoint agents.

7 min read

Security

VMware vCenter Zero-Day (CVE-2026-123890): How ARMORY CASTLE Bypassed Login for Two Months Before VMSA-2026-0009

On November 19, 2026, Broadcom patched CVE-2026-123890 (CVSS 9.8), an authentication bypass in VMware Directory Service with no workaround. Google Threat Intelligence Group and Mandiant revealed that suspected PRC-nexus actor ARMORY CASTLE exploited the flaw as a zero-day in early September 2026 using BONESAW to steal vCenter keys and ESXi credentials. Learn which vCenter and VCF builds are fixed, why vCenter 7.0 has no published patch, and how to hunt for post-exploitation persistence.

8 min read

Security

Java4Shell (CVE-2026-114938): OpenJDK Base64 Intrinsics Flaw Enables Pre-Auth RCE on AVX-512 Servers

Disclosed by Calif and patched by Oracle on November 17, 2026, Java4Shell (CVE-2026-114938) is a heap memory corruption bug in OpenJDK's AVX-512 VBMI Base64 decoder affecting Java 17.0.6 through 27. Learn why ARM64 and OpenJ9 are unaffected, how researchers demonstrated pre-auth RCE against Jenkins, Jira, and Keycloak, and how to deploy -XX:-UseBASE64Intrinsics while upgrading.

8 min read

Tell us what is not working

A thirty-minute call, no deck and no obligation. You will leave with a straight answer about whether this is worth building - including if that answer is no.

Start a project

Direct line

hello@codebumble.net
Dhaka, Bangladesh  :   local timeCalls in English or Bangla