Ruby Patches Seven String and Regular-Expression Vulnerabilities, Some With RCE Potential

Summary
Ruby patched seven string case-conversion and regular-expression vulnerabilities. Proof-of-concept exploits show some may enable remote code execution in certain scenarios; affected organizations should upgrade to fixed releases.
Key points
- The flaws affect Ruby 3.3.13 and earlier, 3.4.0–3.4.12, and 4.0.0–4.0.9.
- CVE-2026-132825, called Ruby2Shell, can cause a one-byte heap buffer overflow during case conversion of a crafted string.
- Other flaws involve regular-expression compilation, matching, and conversion, with reported impacts including double frees, overflows, out-of-bounds reads, and possible memory disclosure or process crashes.
- Ruby's security team says proof-of-concept exploits show that some flaws may enable remote code execution in certain scenarios; risk depends on how applications handle attacker-controlled input.
- Upgrade to Ruby 3.3.14, 3.4.13, or 4.0.10, and check products and images that bundle Ruby.
- Inventory production runtimes, rebuild images, and restart application processes after updating. Ruby 3.2 and earlier are end of life and have no fixes.
Article Details
- Vulnerability Types
- Heap buffer overflow
- Double free
- Integer overflow
- Out-of-bounds read
- Affected Versions
- Ruby 3.3.13 and earlier
- Ruby 3.4.0–3.4.12
- Ruby 4.0.0–4.0.9
- Exploitation Status
- unknown
- Exploit Availability
- unknown
- Patch Status
- available
