TwilioMatthew SetterIncident / postmortem
PHP2Shell. What is it and What Do You Need to Do?
Summary
PHP2Shell combines two critical RCE vulnerabilities, CVE-2026-109618 and CVE-2026-109619, affecting every PHP version back to 5.4. The first exploit corrupts memory when a request hits PHP’s memory limit at the wrong moment, while the second leverages stale global state after a fatal error. Both are rated 9.2 on the CVSS 4.0 scale and require no authentication. Exploitation has been confirmed in the wild, including a campaign that chained PHP2Shell with a Linux privilege-escalation flaw to root 25 servers. The post provides a remediation guide covering inventory, patching to PHP 8.5.12 or later, configuration workarounds, and long-term security practices.
Context
The post describes the PHP2Shell exploit, a combination of two critical RCE vulnerabilities (CVE-2026-109618 and CVE-2026-109619) affecting all PHP versions back to 5.4. It details how the exploits were discovered, their severity (CVSS 9.2), and confirmed exploitation in the wild, including a campaign that chained PHP2Shell with a Linux privilege-escalation flaw to root 25 servers. The post provides a step-by-step remediation guide covering inventory, patching, configuration workarounds, and long-term security practices.
Takeaways
PHP2Shell is a combination of two unauthenticated RCE exploits (CVE-2026-109618 and CVE-2026-109619) affecting all PHP versions back to 5.4, both rated 9.2 on CVSS 4.0.
Confirmed exploitation includes a campaign that chained PHP2Shell with the Linux privilege-escalation flaw Fragnesia (CVE-2026-46300) to root 25 servers.
If patching is impossible, setting memory_limit to -1 and using cgroup v2 memory.max for CVE-2026-109618, and setting max_input_vars to 1000 for CVE-2026-109619, can reduce risk but only patching is a complete mitigation.
FAQ
What configuration changes help if I cannot patch immediately?
If you cannot upgrade, for CVE-2026-109618 set memory_limit to -1 and use Linux cgroup v2 memory.max to contain resource consumption. For CVE-2026-109619, set max_input_vars to 1000 and max_input_nesting_level to 64. These reduce likelihood but only patching is a complete mitigation.
Has PHP2Shell been successfully exploited in the wild?
Yes. Mallory confirmed on October 26th that Dream Research reported artifacts of a campaign that rooted 25 servers by chaining PHP2Shell with the Linux kernel privilege-escalation flaw Fragnesia (CVE-2026-46300). Cloudflare, Imperva, Check Point, and AWS also reported exploit attempts in the hundreds of thousands to millions.
Source and freshness
- Source
- twilio.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.