PHP2Shell: Two Critical PHP Flaws Let Attackers Run Code Without a Login
PHP has released fixes for two critical vulnerabilities, collectively called PHP2Shell, that let an unauthenticated attacker run code on servers that use PHP to handle web requests. The flaws are tracked as CVE-2026-109618 and CVE-2026-109619. PHP's security team rates both as critical, with a CVSS v4.0 score of 9.2.
Fixes shipped on 21 October 2026, at 14:00 UTC, a day earlier than expected. The patched versions are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP says updating is the only complete fix. Businesses that use their Linux distribution's PHP packages should follow that distribution's security advisory. After updating, every PHP worker needs to be restarted.
If you cannot update straight away, PHP's advisories list settings that reduce the risk but do not remove it. They should be set administratively, so that no pool, directory or app setting can override them. For CVE-2026-109619, set session.upload_progress.enabled to 0 and, on PHP 8.5, set fatal_error_backtraces to 0. If performance allows, PHP also suggests setting pm.max_requests to 1.
Exploitation attempts have been reported. AWS observed an attempt in its MadPot honeypots and describes PHP2Shell as "broadly exploited in the wild". However, AWS says it is unclear whether the attempts would have succeeded against real systems, and it recommends investigating activity from at least 17 October. As of 22 October, no successful compromise of a real-world victim has been publicly documented, and the flaws are not in CISA's Known Exploited Vulnerabilities catalog (version 2026.10.21).
Why it matters
Any business running public-facing PHP sites, including CMS-based websites and web apps, is exposed, because the flaws need no login and the attack comes through ordinary web requests. Exploitation attempts were seen before the patch date, so waiting for confirmed victims or a CISA listing is the wrong trigger for patching. The interim settings only reduce risk, so teams that cannot patch immediately still need a firm date for the full update and a look back through logs.
What to do
- Update PHP to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or apply your Linux distribution's security update.
- Restart every PHP worker after updating or changing any settings.
- Set session.upload_progress.enabled=0 administratively, and fatal_error_backtraces=0 on PHP 8.5, if you cannot patch yet.
- Review server activity from at least 17 October for signs of exploitation attempts.