21 Oct 2026
PHP should not turn a web request into a shell.
2 min read
On 21 October 2026 the PHP project released PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. The PHP Foundation said the releases fix two critical vulnerabilities that, under the right conditions, allow an unauthenticated attacker to execute code on servers running PHP. The same day CISA urged organisations to patch immediately. CISA refers to the issues as php2shell.
What happened
The two flaws are CVE-2026-109618, remote code execution through out-of-memory corruption, and CVE-2026-109619, remote code execution through stale global state. Both sit in memory management and error handling, which almost every PHP request touches.
On Apache with mod_php, the Foundation said an unauthenticated request can trigger the first issue before any application code runs, and that full remote code execution was demonstrated with default settings. Remote code execution was also confirmed on PHP-FPM through application-level code paths. For the second issue, remote code execution was demonstrated against a real-world application running on Apache with mod_php.
The official advisories are clear that updating to a release that contains the patch is the only complete mitigation.
Who is affected
CISA says the vulnerabilities affect all PHP installations that serve web requests, including Apache with mod_php, which PHP considers the highest risk, as well as PHP-FPM, php-cgi, FrankenPHP and LiteSpeed. If you run PHP in front of the network, you are in scope until you are on one of the fixed releases. CISA also notes that PHP is often a component of other software, so it may not be obvious where it is running. Inventory those systems as well as the ones you already know about.
What to do
- Update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, as named in the Foundation post and the CISA alert. Prioritise systems that face the internet.
- If you cannot update immediately, or you still run PHP 8.1 or earlier unsupported versions, CISA says to take PHP-based systems offline until they can be patched or updated. A web application firewall may provide some protection in the meantime, but it is not a complete fix.
- Monitor for unusual activity, including PHP worker processes launching shells or downloading tools.
A language runtime is part of the trusted computing base of every site it serves, and a request that reaches it should not be enough to run a shell.
Filed under: vulnerabilities