ruby2shell turns a default Rails or Sinatra install into unauthenticated memory corruption, and your application logs won’t help you.

Cloudflare documented CVE-2026-132825 as a flaw that lets attackers corrupt memory in default Rails and Sinatra apps without logging in. If your cybersecurity program still treats a clean application review as coverage, you’re measuring the wrong layer. The interpreter is the product now, and it just handed remote code to anyone who can reach the port.

Cloudflare diagram of ruby2shell WAF protection for Rails and Sinatra applications
Cloudflare published WAF coverage for ruby2shell, including Free plans, while the real fix remains a Ruby upgrade.

Your cybersecurity inventory still misses interpreters

The same week, PHP’s default session handler produced phpAfterShell, a critical flaw that can lead to code execution. Cloudflare shipped WAF rules for that bug on every plan, Free included. Two language defaults. Two unauthenticated execution paths. You can’t patch a runtime you have not listed.

Rails and Sinatra are not exotic. They show up in internal admin tools, payment callbacks, and the temporary API someone promised to retire. Those are the hosts that skip the CDN and still have a public IP from a lift-and-shift.

You already lived a version of this when PHP runtime holes forced teams to ask where PHP ran, including under CMS products and appliances nobody tagged as a PHP app. ruby2shell mints the same ticket for Ruby. Somewhere in your estate there is a Sinatra sidecar, a leftover Rails console, or a vendor image that shipped Ruby because that was convenient years ago.

Static analysis of your repo doesn’t inventory /usr/bin/ruby.

It also skips the appliance image, the forgotten status page, and the CI runner that still binds to a routable interface. When a WAF vendor says every customer is covered, including Free, read that as an SLA on their edge, not yours. You still own every origin that never sat behind that service.

Call this a cyber security visibility gap and you’re being precise. Threat detection tuned to brute-force against /login stays quiet, because this class of bug never guesses a password. Your SIEM can look healthy and still miss the crash. Default apps are not logging the corruption the way you wish they would.

If you cannot name every Ruby and PHP process that faces a network, you’re already late.

Patch Ruby then starve the foothold

Do the boring work in this order, with immediate actions first.

Find internet-facing Rails, Sinatra, and other Ruby servers. Upgrade Ruby to the patched release and restart the process. A running interpreter doesn’t pick up a package sitting on disk.

Do the same for PHP hosts on the default session handler path covered by phpAfterShell. Take the service offline if you cannot patch in the same shift.

Treat any reachable, unpatched instance as an incident response case. Hunt for new local users, new listeners, and unexpected outbound connections from those hosts.

Keep a living inventory of language runtimes, not just application names. Record version, bind address, and whether the process sits behind the edge firewall or on a VLAN every laptop can reach.

Owners matter more than scanners this week. Assign a named human to each Ruby service, including the ones owned by a vendor. If they cannot tell you the version in ten minutes, put that host in the first patch wave and keep it there until you have evidence.

Pair the upgrade with security hardening that limits what a web worker can touch. Management networks, directory services, and break-glass credentials should not sit a hop away from an app process. Login lockouts still matter on SSH and RDP. Controls in the ipban family, including IPBan Pro, belong on those guessable surfaces. They don’t replace a runtime upgrade.

That is defense in depth you can actually operate. The next default-runtime CVE won’t wait for your quarterly scan.

A WAF rule is a timer not a control

Cloudflare’s WAF blocks ruby2shell for every customer, Free plans included. Treat that as borrowed time. The signature sits on the edge you actually send through that firewall. Internal Rails, direct-to-origin DNS, and partner links never see it.

Cloudflare advisory graphic for phpAfterShell and related PHP runtime flaws
phpAfterShell landed in PHP’s default session handler in the same news cycle as ruby2shell.

Edge threat-protection is useful when it is honest about scope. A rule that fires in front of some public sites leaves the app your developers tunnel to from the office uncovered. Put a compensating control at the origin anyway: deny by default, patch, then reopen.

Free WAF rules also create a false calm in small shops. The dashboard is green, so nobody files the change request for Ruby. That’s how a default install stays default.

Stop waiting for a louder alert.

Closing a WAF hit as handled is how you accumulate unpatched origins. Ask for the package version and the process start time. If the process started before the patch, you’re still exposed. You’ll get another runtime CVE. Build the list now so the next one is a filter against known hosts, not a company-wide scavenger hunt.

Sources

Take Control of Your Server Security

Don't let brute-force attacks slow you down. Try IPBan Pro risk-free for 30 days.

Secure. Automated. Lightweight.

Stay up to date with the latest news, releases and more.

Take Control of Your Server Security

Don't let brute-force attacks slow you down. Try IPBan Pro risk-free for 30 days.

Secure. Automated. Lightweight.