Ruby2Shell – Critical heap buffer overflow in Ruby
The release addresses seven memory safety bugs, two in string case conversion and five in the regular expression engine. The Ruby team cites proofs of concept for code execution or controlled memory corruption for six of them. CVE-2026-132825 is the case conversion flaw tracked as GHSA-34m4-m9fh-gqp5 and known as Ruby2Shell or “ruby2ßhell.” The CVE record was published on November 19.
How the overflow happens
In certain single-byte encodings, uppercasing the German letter ß produces the two characters SS. The affected code checked that one byte was available, allowing a one-byte write past the end of the heap buffer. UTF-8 follows a separate code path and is unaffected by this flaw.
The Ruby patch covers ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-9, ISO-8859-10, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16, Windows-1250, Windows-1252, Windows-1254 and Windows-1257. Ruby methods that reach the affected mapping include upcase, swapcase, downcase(:fold) and casecmp?.
Which applications are exposed?
Veria Labs reports pre-authentication exposure in the default Ruby on Rails and classic Sinatra configurations it tested. Rack’s method override middleware and handling of multipart character sets are relevant. For other frameworks or plain Rack deployments, review whether application code processes external input in an affected encoding.
Ruby rates the advisory critical and confirms that researchers demonstrated code execution in some scenarios. The reports reviewed by November 26, 2026 contained no confirmed exploitation in the wild. MITRE’s CVE record assigns the runtime flaw CVSS v3.1: 7.4 (high) with a local attack vector. A separate NVD assessment could not be verified.
Check your exposure
1. Identify the running Ruby version
ruby -v
Run the check in the deployment that processes requests, including inside the container or bundled runtime where applicable. For a distribution package, compare the full package revision with the vendor’s security notice.
2. Review input encodings and framework settings
Check where form data, uploads or other external inputs are decoded using a listed encoding and passed to case conversion or a case-insensitive comparison. Include application middleware and integrations that still use legacy encodings.
Affected releases and updates
| Release branch | Fixed in | Release date |
|---|---|---|
| Ruby 3.3 | 3.3.14 | November 18, 2026 |
| Ruby 3.4 | 3.4.13 | November 18, 2026 |
| Ruby 4.0 | 4.0.10 | November 18, 2026 |
Within each listed branch, releases before its fix are potentially affected. Move deployments on Ruby 3.2 or earlier, now out of upstream support, to a supported release that includes the fix.
Mitigations
Update the Ruby runtime itself. bundle update updates gems. For container deployments, rebuild with a patched base image, replace the running containers and verify their Ruby version.
While an update is pending, strict UTF-8 handling, rejection of unexpected legacy encodings and applicable WAF rules can reduce exposure. Check whether those controls also cover internal and direct traffic.