On 21 October, the PHP team released an emergency update. It closes two flaws that let attackers run their own code on someone else’s web server without a password. The security press now calls them “PHP2Shell”. Germany’s federal security agency BSI issued a warning, and so did the US agency CISA.
A lot of sites are affected. According to W3Techs, PHP runs almost 70 percent of all websites whose technology can be detected. WordPress is one of them, Shopware too, plus countless custom-made systems.
What happened#
Both bugs sit in PHP itself. Put simply: when a request runs out of memory, PHP stops it abruptly. Sometimes that leaves memory behind in a broken state, half written or already freed. Anyone who triggers this on purpose can get a later request to run their code. The PHP team rates both flaws 9.2 out of 10. (PHP advisory)
- August: The security firm Calif and OpenAI independently report the same bug to the PHP team. Researchers at Wiz find more ways to attack it.
- 17 October: Amazon sees a first attack attempt on its decoy servers, four days before disclosure.
- 20 October: The flaws’ identifiers leak on social media. PHP brings the update forward by a day.
- 21 October: Versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35 come out. Hosting providers patch overnight, and some take servers offline as a precaution. (Tenable, Borns IT-Blog)
Amazon and the security firm watchTowr now report attacks in the wild.
Why this happens#
The faulty code is old. It goes back to PHP 5.4 from 2012. For fourteen years nobody recognised it as dangerous, even though millions of servers run it every day.
That sounds unbelievable, but it’s pretty normal. PHP is written in C, and in C developers manage memory by hand. A small mistake goes unnoticed in daily use if it sits somewhere the code almost never reaches. “Memory is full” is such a place. Tests hardly ever get there.
The uncomfortable part of the story is something else. According to the PHP Foundation, the problem first showed up in an external security audit back in 2024. It wasn’t fixed then, because the team couldn’t agree on an approach and was short of people. The Foundation itself calls this a structural failure. (The Next Web) I think it’s right that they say so openly. It also shows how much of the internet depends on small teams, often working on it on the side.
What’s new is the speed. OpenAI found the bug with its own tool, and Calif and Wiz say they used AI as well. That helps the people trying to make PHP safer. But attackers have the same tools. So I expect reports like this to become more frequent over the next few years.
A fix only protects you once it’s installed#
By 21 October, the fix was ready. On any single server, it changes nothing until someone installs the update and restarts PHP.
On many sites, that won’t happen soon. According to W3Techs, a good third of all PHP websites still run PHP 7 or even PHP 5. These versions haven’t had regular security updates for years. For 7.4 to 8.1, the PHP team did at least publish source-code corrections this time, but no finished releases. Older versions get nothing at all. Estimates put the number of servers on the internet that won’t get an official fix at around 884,000.
If you haven’t touched your site in years, you now have a bigger problem than an update. You first have to move to a current PHP version, and plugins, themes or your own code often stop working along the way. That takes days, sometimes weeks. The attacks are already running.
That’s really my point. Going from 8.3.35 to 8.3.36 takes a few minutes. Going from 7.2 to 8.4 is a project of its own.
What you should do now#
If you run a website on PHP, check today which version is actually running. A WordPress update alone isn’t enough, because the flaw is in PHP. With rented hosting, it’s best to ask your provider directly. Don’t blindly trust the version number you see: some Linux systems apply fixes without changing it. Ubuntu, for example, still shows 8.3.6. Sites made of plain HTML without PHP aren’t affected.
For your website, that means updates are part of running it. PHP, the CMS and the plugins should be updated at fixed intervals, with one person responsible for it. Before a PHP version reaches its end of life, the move should already be planned. PHP 8.2, for example, gets no more security updates after 31 December 2026.
I think this belongs at the start of every website project. If you have a website developed, you’re not buying a finished thing that just sits there. PHP keeps evolving, flaws get found, old versions run out, and the website has to keep up. With the PHP flaw, no site owner did anything wrong, yet all of them had to act. If you update regularly, you were done in a few minutes.