PHP2Shell: Haven’t patched yet? Take these steps now to mitigate

The PHP Project shipped fixes on a Wednesday for a pair of critical PHP vulnerabilities that researchers at Wiz discovered with the help of AI, and on October 23 it published an advisory with an additional mitigation aimed at a related but separate remote code execution vector. The two headline bugs, CVE-2026-109618 and CVE-2026-109619, each carry a critical severity score of 9.2 and affect most PHP builds. Wiz's security team, which found the flaws, says PHP underpins 70% of the world's websites, which explains why the disclosure set off a worldwide rush to patch.
The flaws sit in PHP itself rather than in whatever application runs on top of it. According to Wiz, they cover memory disclosure and unauthenticated remote code execution, meaning an attacker needs no credentials and no vulnerable plugin or theme to get in. In practice that broadens the blast radius considerably: the same defect exists whether the server runs WordPress, a custom application or an e-commerce platform. On an unpatched system, an attacker could execute code on the server or read sensitive process memory, which in turn opens the door to data theft and movement into corporate networks.
Wiz's account of how the bugs were found and weaponized is notable in its own right. The researchers describe the attack chain and the demonstration of exploitability as requiring an exceptionally complex sequence of steps, at the edge of what human researchers could practically achieve. Frontier AI models, they say, substantially reduced that barrier and turned a longstanding flaw into a working exploit. That cuts both ways: the same class of tooling that surfaced the problem can also lower the cost of abusing it.
Attack activity has not waited. Amazon Threat Intelligence reports exploit attempts against PHP2Shell beginning four days before the vulnerabilities were made public, and proof-of-concept code appeared within hours of disclosure. One threat actor associated with PHP2Shell attack chains is trying to deploy a Mirai-style botnet. Cloudflare CEO Matthew Prince said the Cloudflare network is recording millions of exploitation attempts. This suggests the window between disclosure and mass scanning has effectively collapsed, and that any internet-facing PHP host running an unpatched version should be treated as a candidate for compromise rather than merely at risk.
On the patching side, the PHP Project urges users to move to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35. If an immediate upgrade is not possible, the advisory lists mitigations. The October 23 guidance adds one more: set session.upload_progress.enabled=0 until the next scheduled round of bug fixes. That setting was already listed as a mitigation in the October 21 release, but the Project now says further investigation shows it also protects against a different RCE, tracked as CVE-2026-115560.
The configuration detail behind that second vector matters for anyone deciding whether they can skip the mitigation. According to the advisory, an application must set session.serialize_handler to php_binary or php_serialize in its configuration and then switch it to php at runtime with ini_set() before calling session_start(), and session upload progress must still be enabled. Applications that never change the serialize handler at runtime can leave the feature enabled. Because that combination is unusual, the PHP Project considers the vector unlikely and says mitigation is sufficient until the regular release cycle addresses it.
Matthew Weier O'Phinney, principal product manager at Perforce Zend and OpenLogic, told ZDNET that most open source software and commercial long-term-support distributions had patches ready at the coordinated release or within a few hours after it, and that a fix is likely available to anyone running PHP. Updating through the system package manager is, in his words, a quick remedy. That is a useful shortcut for teams that track operating system packages rather than compiling PHP themselves, though anyone running a custom build or a container image with a pinned PHP version still needs to rebuild it.
The NSA weighed in as well, advising heightened awareness of PHP2Shell over the coming weeks and saying vendor-issued patches tied to it should be prioritized. The agency recommends mitigative steps such as enhanced logging and replacing end-of-life PHP packages where appropriate, and calls on all users to inventory, where feasible, hardware and software services that depend on vulnerable PHP versions, with vigilance in applying patches to those systems described as paramount.
A practical reading is that the immediate job is inventory followed by upgrade, and the harder job is finding PHP you did not know you were running. PHP is frequently bundled into base images, embedded in appliances and shipped with third-party applications, so a package manager sweep on primary servers may miss instances. Heightened logging during the patch window is a reasonable hedge: if exploitation attempts are already arriving in the millions, log evidence of probing or unusual process behavior could reveal a host that was hit before its update landed. It is worth noting that the score of 9.2 and the pre-disclosure exploitation together mean this is not a routine patch cycle, and that the 8.2 branch updates reflect continued support rather than a reprieve from upgrading eventually.
Why it matters: Any team running PHP, whether directly or through a CMS, e-commerce stack or vendor appliance, is affected, and the fixes are available now for most distributions. Developers should confirm which PHP versions their images, package sources and third-party services actually use, upgrade to the patched releases, and apply the session upload progress mitigation where runtime handler changes make the unlikely vector reachable. For product teams, the disclosure is a reminder that dependency inventory and fast patch paths are now security controls in their own right, and that AI-assisted discovery is likely to surface more flaws of this complexity going forward.
Based on reporting from the original publisher. Visit the source for full context and later updates.
Publisher excerpt
The PHP Project provides instructions to stop further RCE exploits in limited settings.