
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-132825 (community name: "ruby2shell") is a heap-based buffer overflow vulnerability in Ruby's string case conversion functionality. When converting the case of a string encoded in certain single-byte encodings such as ISO-8859-1 or Windows-1252, Ruby can write one byte past the end of a heap-allocated output buffer. The vulnerability affects Ruby before 3.3.14, Ruby 3.4.0–3.4.12, and Ruby 4.0.0–4.0.9. It was disclosed on November 18–19, 2026, with patches released simultaneously. The CVSS v3.1 base score is 7.4 (High) (Github Advisory, Ruby Advisory).
The root cause is classified as CWE-122 (Heap-based Buffer Overflow) and CWE-193 (Off-by-One Error). The vulnerable loop in case_map() across 14 single-byte encoding files (e.g., enc/iso_8859_1.c) checks only for one byte of output room (to < to_end) before processing the German sharp-s character (ß, 0xDF), which expands to two bytes ("SS" under upcase). When the final loop iteration enters with exactly one byte of buffer space remaining, the second byte of the expansion is written one byte past the end of the mapping_buffer allocated by rb_str_casemap(). The allocation geometry is R = N + 44 bytes for an N-byte input, and the one-byte overflow lands on the adjacent glibc chunk's size field LSB only when the request size satisfies R ≡ 8 (mod 16) — requiring a carefully crafted mixed input (e.g., 20 × 0xDF + 7 × 'a' + 1 × 0xDF). The fix changes the loop guard to to_end - to > 1 (commit d582f8f13d70). A related advisory (GHSA-87fm-7w84-j2px) covers a separate integer overflow in the same code path for strings whose case-converted result exceeds 4 GiB (Ruby Advisory, PoC Repo).
Successful exploitation can result in high confidentiality, integrity, and availability impact. The one-byte heap metadata corruption can be leveraged to manipulate glibc chunk size fields, potentially enabling heap exploitation primitives that lead to arbitrary code execution. The Ruby project's own advisory states awareness of PoCs that prove the flaw can trigger RCE in some scenarios, particularly in web frameworks like Rails and Sinatra where attacker-controlled strings (e.g., multipart Content-Type charset fields or _method override parameters) may be passed through case conversion operations. Ruby ≤ 3.2 (including macOS system Ruby 2.6.10) is EOL and will not receive a patch, leaving those deployments permanently exposed (Ruby Advisory, Github Advisory).
Public PoC code is available on GitHub demonstrating ASAN crashes and glibc chunk-header corruption on stock glibc 2.31, though no complete end-to-end RCE chain has been publicly demonstrated as of disclosure (PoC Repo). The EPSS score is approximately 1.976% (81st percentile), indicating elevated exploitation probability relative to most CVEs (Github Advisory). The NVD SSVC assessment lists exploitation as "none" at time of publication, and there is no confirmed in-the-wild exploitation or CISA KEV catalog listing as of the report date. Veria Labs announced a public PoC release window approximately one week after disclosure (~November 26, 2026). The attack vector is local (AV:L) with high complexity (AC:H), as exploiting the heap primitive on glibc requires precise allocation geometry and ASLR bypass or disabled ASLR (PoC Repo, oss-security).
String#upcase, #downcase, #swapcase, or #capitalize) with ISO-8859-x or Windows-125x encoding. In web contexts, Rails/Rack multipart Content-Type charset fields or _method override parameters are candidate vectors.("\xDF" * 20 + "a" * 7 + "\xDF").force_encoding("ISO-8859-1"). This produces a malloc request of R=72 bytes (≡ 8 mod 16), ensuring the one-byte overflow lands on the adjacent glibc chunk's size field LSB rather than alignment slack._method field). The upcase call expands the trailing ß to "SS", writing 0x53 one byte past the allocated buffer onto the next chunk's size field.__free_hook, overwrite __free_hook with system, and trigger GC to free a heap string whose buffer begins with a shell command. This chain has been partially verified (victim-array smash confirmed) but full end-to-end execution has not been publicly demonstrated (PoC Repo, Ruby Advisory).Segmentation fault at 0x0 inside String#upcase-family frames (rb_str_upcase, rb_str_casemap); ASAN-instrumented builds reporting heap-buffer-overflow WRITE of size 1 at enc/iso_8859_1.c or enc/windows_1252.c.Content-Type charset values set to ISO-8859-1 or Windows-1252 combined with field values containing repeated 0xDF bytes (ß); unusual _method override fields in POST requests containing high-byte characters.ArgumentError: negative string size or input string invalid errors in Ruby logs (may indicate related GHSA-87fm-7w84-j2px probing).rb_str_casemap (PoC Repo).Upgrade Ruby to the patched versions: 3.3.14, 3.4.13, or 4.0.10, which fix the vulnerable loop guard in case_map() (commit d582f8f13d70). Ruby ≤ 3.2 is EOL and will not receive an upstream patch — deployments on these versions should migrate to a supported branch or isolate the affected systems. As a temporary workaround, apply WAF rules to block or alert on multipart requests with ISO-8859-x or Windows-125x charset declarations containing high-byte characters; Cloudflare deployed emergency WAF rules, and CrowdSec published virtual patching rules for this purpose. Rebuild and redeploy container images based on patched Ruby versions. Vendor patches are also available from Red Hat (RHSA-2026:102714 and related), SUSE (SUSE-SU-2026:5413-1), AWS (AL2023/AL2027 advisories), and GitLab (patch release 19.6.1) (Github Advisory, Ruby Advisory).
The Ruby project credited Stephan Lipp (Ada Logics) and Anthropic for reporting the vulnerability, and stated awareness of PoCs proving RCE is possible in some scenarios (Ruby Advisory). The vulnerability was dubbed "ruby2shell" by the community and received significant media coverage from The Hacker News, SecurityWeek, Imperva, Orca Security, and Heise, with many outlets noting the RCE potential for Rails and GitLab deployments. Cloudflare deployed emergency WAF rules and published a blog post on protection measures, while CrowdSec released virtual patching rules. Independent researcher commentary (Sekurak) expressed skepticism about stable RCE, rating DoS as more likely given the non-trivial heap geometry required — consistent with the PoC repository's own findings that pure ß-run triggers are absorbed by glibc alignment slack. GitLab shipped an emergency patch release (19.6.1) and AWS, Red Hat, and SUSE all issued security advisories within days of disclosure (oss-security, PoC Repo).
Fix availability across major Linux distributions and their releases.
bookworm
ruby3.1: 3.1.7-1~deb12u2
sid
ruby3.3
trixie
ruby3.3: 3.3.14-0+deb13u1
bionic (esm-apps)
jruby
bionic (esm-infra)
ruby2.5: 2.5.1-1ubuntu1.16+esm9
devel
ruby3.3
focal (esm-apps)
jruby
focal (esm-infra)
ruby2.7: 2.7.0-5ubuntu1.18+esm6
jammy
ruby3.0: 3.0.2-7ubuntu2.14
noble
ruby3.2: 3.2.3-1ubuntu0.24.04.9
noble (esm-apps)
jruby
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."