Elevated
Ruby string case conversion buffer overflow flaw
CVE-2026-132825
Ruby programs that change text capitalization can be hacked.
- CVE
- CVE-2026-132825 (opens in a new tab)
- Score
- CVSS 7.4
- First seen
Mitigation
Update to Ruby 4.0.10, 3.4.13, or 3.3.14 or later. Ruby 3.2 and earlier have no fixed version, so move to a supported release line.
Update to at least the version for your product:
- Ruby 3.3 3.3.14 or later
- Ruby 3.4 3.4.13 or later
- Ruby 4.0 4.0.10 or later
Summary
Ruby has a heap buffer overflow in string case conversion, where one byte can be written outside a buffer. It is one of several flaws that can lead to remote code execution in affected Ruby versions.
Exploit code is public
Affected when
Ruby programs that use string case conversion
Incidents by product: Ruby
Distribution packages (18) (every link below opens in a new tab)
- Debian 13 (trixie)ruby3.3 · fixed in 3.3.14-0+deb13u1
- Debian 12 (bookworm)ruby3.1 · fixed in 3.1.7-1~deb12u2
- Ubuntu 26.10ruby3.3 · fixed in 3.3.8-2.2ubuntu4.1
- Ubuntu 26.04 LTSruby3.3 · fixed in 3.3.8-2ubuntu3.2
- Ubuntu 24.04 LTSruby3.2 · fixed in 3.2.3-1ubuntu0.24.04.9
- Ubuntu 22.04 LTSruby3.0 · fixed in 3.0.2-7ubuntu2.14
- RHEL 10ruby · fixed in 3.3.14-17.el10_3
- RHEL 10ruby4.0 · fixed in 4.0.10-39.el10_3
- RHEL 9ruby · fixed in 3.0.7-171.el9_9
- SLES 16.1ruby · not affected
- SLES 16.1ruby3.4 · fixed in 3.4.13-160100.1.1
- SLES 16.0ruby · not affected
- SLES 16.0ruby3.4 · fixed in 3.4.13-160000.1.1
- SLES 15 SP7ruby · not affected
- SLES 15 SP7ruby2.5 · fixed in 2.5.9-150700.24.14.1
- SLES 15 SP7ruby3.4 · fixed in 3.4.13-150700.3.7.1
- openSUSE Leap 16.0ruby · not affected
- openSUSE Leap 16.0ruby3.4 · fixed in 3.4.13-160000.1.1
Sources: Debian Security Tracker · Ubuntu Security Notices (Canonical) (CC BY-SA 4.0) · Red Hat Security Data (CC BY 4.0) · SUSE CSAF VEX (CC BY 4.0)
Read the write-up · ruby-lang.org (opens in a new tab)
- CVE record: cve.org (opens in a new tab)
Discussion (6): news.ycombinator.com, seclists.org
- Multiple vulnerabilities in Regexp and String case conversion (opens in a new tab)
- Ruby: multiple vulnerabilities in Regexp and String case conversion (opens in a new tab)
- Ruby2ßhell: Pre-authentication RCE on stock Rails (opens in a new tab)
- Re: Ruby: multiple vulnerabilities in Regexp and String case conversion (opens in a new tab)
- Cloudflare WAF protects against ruby2shell (CVE-2026-132825) (opens in a new tab)
- Ruby2Shell (CVE-2026-132825): One Byte Past the Buffer in String#upcase (opens in a new tab)
- Newsletter: Risky Bulletin: New Windows security feature will allow apps to refuse to run on insecure systems (opens in a new tab)
- Newsletter: Srsly Risky Biz: America Needs Homegrown Open-Weight Models (opens in a new tab)
Repository (6): github.com