php2shell: the PHP vulnerability that shook the web in 2026
Patching php2shell: why some websites switched off instead of waiting
The fix for php2shell was free, and it was ready in one day. Still, governments chose to switch off their own websites. Updating PHP was harder than it sounds.
-
1
Miva reaches your server at last. She puts the new version of PHP on its disk. A fix like this is called a patch.
-
2
But the workers that are already running do not read the disk again. They keep the old PHP in memory, with the bug inside.
-
3
So Miva restarts them. Fresh workers start with the new PHP and an empty memory. Only now is your blog safe from php2shell.
-
4
Many servers had it worse. PHP 8.1 and older versions get no fixes any more: they are past their end of life. No new official version came for them.
-
5
There was no option to turn off that fully blocked the attack. So some owners did not wait. A website that is switched off cannot be attacked. That is why the cyber security centres switched off their own.
-
6
Your blog is safe again. php2shell was one way in, through a bug that nobody had fixed yet. How many other ways in do attackers try, every day, on every small website?
-
Go further
Two things worth knowing.