PHP2Shell: Two Critical PHP Flaws Force Emergency Patches as Attacks Begin
If you ran into maintenance pages across the web this week, there's a good chance this is why. Yesterday the PHP project shipped emergency updates for two critical flaws that let an attacker run their own code on a server without logging in. Researchers already gave the pair a nickname: PHP2Shell.
What PHP2Shell actually is
The two flaws are tracked as CVE-2026-109618 and CVE-2026-109619. The first corrupts memory when PHP hits its memory limit at exactly the wrong moment during a request; the second lets internal state from one request linger into a later request handled by the same worker, a use-after-free. Both end in the same place: unauthenticated remote code execution.
The PHP team rates each flaw 9.2 under CVSS v4.0. Security firm watchTowr went further and called it a 10. Versions from 5.4 all the way to 8.5 are affected, which covers an enormous share of the web: WordPress, Laravel, Drupal, Joomla, Magento, and plain PHP alike.
And this is not a bug in your code. It lives in the PHP engine itself, in the memory management and error handling paths nearly every request passes through. A perfectly written application on a vulnerable PHP version is still exposed. PHP's advisory puts the highest risk on Apache with mod_php, where researchers demonstrated an exploit that fires before any application code runs, but PHP-FPM, php-cgi, FrankenPHP, and LiteSpeed deployments are all in scope.
Why the patch landed a day early
The plan was a coordinated release on October 22. On October 20 the CVE identifiers leaked onto forums and social media while the embargo was still in place, so PHP moved the release up to October 21 at 14:00 UTC, shipping 8.5.12, 8.4.27, 8.3.36, and 8.2.35.
The embargo did not survive the week intact. Calif accidentally published a video of its proof of concept working against real targets, which sped up copycat exploit development, and Chainguard pushed patched container images about six hours before the coordinated release. By the time the patch went public, Cloudflare was already reporting attack traffic against its customers, with attackers mutating payloads to slip past its rules. The company's WAF protections had gone live at 3:02 a.m. UTC, roughly nine hours ahead of disclosure, and its post still told customers to patch: a WAF helps, but it's not the fix.
That explains the maintenance pages
On October 20, CERT-EU published advisory 2026-018, and European cybersecurity officials warned that organizations unable to patch in time should be ready to take PHP sites offline temporarily. A lot of admins took that advice literally. A maintenance page is embarrassing; a compromised server is worse.
This bug is older than it looks
A PHP core developer first noticed signs of the out-of-memory problem back in 2024, while fixing a separate issue found during an external audit by Quarkslab. Researchers theorized an exploit even then. But no concrete attack existed, other bugs looked more urgent, and the team could not agree on a fix that wouldn't break compatibility or third-party extensions. The work stalled.
Then on August 11, 2026, researcher Ryan A at the security firm Calif demonstrated unconditional remote code execution from the same root cause, as part of OpenAI's "Patch the Planet" project. OpenAI's own team reported the same root cause independently that same day, and Wiz followed on August 24 with additional attack vectors. From first suspicion to emergency patch: about two years, and more than a decade if you count how long this class of bug has been flagged as a concern.
What to do now
Update. The fix you need depends on your branch: 8.5.12, 8.4.27, 8.3.36, or 8.2.35. The PHP team is blunt that updating is the only complete protection.
Running 8.1 or older? There's no official release for you. Source backports exist for 7.4, 8.0, and 8.1, but treat those as a bridge while you plan the upgrade, not a destination. Disabling session upload progress lowers exposure on one confirmed attack path, yet it doesn't close the hole.
If you only visit websites, there's nothing to do except wait out the maintenance pages. If you run a PHP server, the patch has been out since yesterday afternoon UTC, and the attackers are already knocking.
Sources: PHP2Shell on Wikipedia, Tenable FAQ, SOCRadar timeline.

Comments
Post a Comment