Ruby heap overflow ruby2shell can yield remote code execution (CVE-2026-132825)
Original title: How Cloudflare WAF protects against ruby2shell (CVE-2026-132825)
Default Rails and classic Sinatra apps reach the bug before authentication; fixes are Ruby 3.3.14, 3.4.13 and 4.0.10.
On November 19, 2026, the Ruby team disclosed ruby2shell, a critical heap buffer overflow in legacy single-byte string case conversion. Ruby says it knows of proofs of concept that achieve remote code execution in some scenarios. Cloudflare added blocking WAF rules for all plans, including a related integer overflow, but says upgrading Ruby is the only complete fix. Cloudflare reports its own Ruby systems are patched and it found no indication of compromise.
Unconfirmed: Ruby says it knows of proofs of concept, but in-the-wild exploitation is not confirmed and Veria Labs has not yet published its PoC.
- Affected ranges are Ruby 3.3.13 and earlier, 3.4.0–3.4.12, and 4.0.0–4.0.9.
- UTF-8 strings use a different path and are not affected.
- Ruby 3.2 and earlier are end of life and will not be fixed.
- Veria Labs lists affected latest releases of GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Discourse and Chatwoot.
- The same Ruby releases also fix six other memory-safety flaws, several of which Ruby says can lead to code execution.
Impact: remote code execution before authentication in some apps
| Product | Affected | Fixed in |
|---|---|---|
| Ruby | 3.3.13 and earlier, 3.4.0 through 3.4.12, and 4.0.0 through 4.0.9 | 3.3.14, 3.4.13, and 4.0.10 |
| Ruby on Rails | default configuration | — |
| Sinatra | classic-style default configuration | — |
- 1.Upgrade Ruby to 3.3.14, 3.4.13, or 4.0.10.
- 2.Treat Cloudflare WAF rules as a compensating control, not a replacement for patching.
- 3.Check full distribution package versions against each distribution advisory.
- CVEs
- CVE-2026-132825
Vulnerabilities mentioned
All| CVE | Vulnerability | CVSS | EPSS | Signals | Published |
|---|---|---|---|---|---|
| CVE-2026-132825 | Heap buffer overflow in Ruby case conversion | 7.4 | 2% | PoC ×2 |
Indicators of compromise
auto-extracted · verify before use · export allAll| Type | Indicator | Context |
|---|---|---|
| md5 | 1afa543a1ed84893b01df04c34402c88 | Free plan) Block Ruby - Heap Overflow - CVE:CVE-2026-132825 1afa543a1ed84893b01df04c34402c88 Cloudflare Managed Ruleset (Pro, Business and Enterprise pl |
| md5 | 6defac6a52334542adf4a162daf25922 | e plan) Block Ruby - Integer Overflow - GHSA-87fm-7w84-j2px 6defac6a52334542adf4a162daf25922 Cloudflare Managed Ruleset (Pro, Business and Enterprise pl |
| md5 | 7328f23691e44b07892ebd25b19210f1 | t Default action Ruby - Heap Overflow - CVE:CVE-2026-132825 7328f23691e44b07892ebd25b19210f1 Cloudflare Free Managed Ruleset (Free plan) Block Ruby - He |
| md5 | 8660e37e86444f9f9267ba22e9855f05 | plans) Block Ruby - Integer Overflow - GHSA-87fm-7w84-j2px 8660e37e86444f9f9267ba22e9855f05 Cloudflare Free Managed Ruleset (Free plan) Block Ruby - In |
| md5 | efb7b8c949ac4650a09736fc376e9aee | aged Ruleset and the Cloudflare Managed Ruleset (Ruleset ID efb7b8c949ac4650a09736fc376e9aee), with Block as the default action. Rule description Rule I |
From the original article
6 min read at blog.cloudflare.com
ruby2shell lets attackers corrupt memory in default Rails and Sinatra apps without logging in. Cloudflare WAF blocks it for every customer, including Free plans. Upgrade Ruby now, and use the WAF to cover the gap.
By Daniele Molteni · blog.cloudflare.com
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.