The PHP Foundation says maintainers knew about a remote-code-execution vulnerability for two years before disclosure. PHP2Shell attacks are now targeting servers, many of which run unsupported PHP versions.
A PHP Foundation post-mortem says a small maintenance team knew about a remote-code-execution vulnerability for two years but delayed resolving it while weighing compatibility with third-party extensions. The flaw stems from inconsistent heap data left behind when PHP handles an out-of-memory condition.
The ongoing PHP2Shell exploit can execute code with PHP’s permissions through specially crafted web requests. Exploitation requires knowledge of the target’s exact PHP version and build, but the potential impact is broad: the report says about 73% of PHP installations were running end-of-life versions, while nearly 8% used PHP 5.x.
Maintainers published patches for PHP 7.4 through 8.1, and Debian, Ubuntu, CloudLinux and AlmaLinux packages also include backported fixes. WAF, CDN and server-security tools have added mitigations, but administrators are advised to update to a patched version where possible. Censys estimated that roughly 29 million services remained unpatched, although version reporting is disabled on many servers, making the true figure uncertain.