In October 2026, PHP released emergency fixes for two critical flaws in the language itself. Known as PHP2Shell, they could let an attacker run code on a web server without logging in.1 The flaws are tracked as CVE-2026-109618 and CVE-2026-109619.4 PHP is used by almost 70% of websites, so the flaws affected a large part of the web.2
Word of the flaws leaked two days before the planned disclosure, and attackers began trying to exploit them before the fix was released.2,3,4 Governments and companies around the world took websites offline while they updated.4,5
The fixes are now available, but the case holds lessons that apply well beyond PHP.
If you haven't updated yet, install the latest release for your PHP version. PHP2Shell was fixed in PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35, and PHP has released additional security fixes since then. Full details are in PHP's security advisory.1
Jan Kaastrup, Chief Cybersecurity Advisor at CSIS Security Group, said: "PHP2Shell won't be the last flaw of this kind, and the time to respond keeps getting shorter. The organisations that cope best are the ones that have already mapped their systems and agreed the hard decisions. Building cyber resilience through thorough preparation is the main lesson to take from this case."
The flaws were in PHP itself, not in any one application. A website could be exposed even when its own code was secure.4
Updating WordPress, Drupal or another application did not fix the problem. PHP had to be updated on the server. Where a hosting provider managed PHP, the provider had to apply the update.2
That makes visibility essential. Organisations need to know which systems run PHP and the other software their applications depend on, including systems run for them by hosting providers and suppliers. As we wrote after Denmark's CPR breach, security doesn't stop at your door.
Researchers began reporting the flaws to PHP on 11 August.3 The fix was released on 21 October, a day earlier than planned, because the CVE numbers for the flaws had begun circulating online.3
AI is speeding this up. The PHP Foundation notes that tools now find bugs faster than ever, for defenders and attackers alike.3 As we set out in our recent article on generative AI in cybersecurity, that means organisations need to shorten the gap between detection and response.
In practice, decide in advance who can approve an emergency update out of hours, and make sure critical alerts reach that person quickly. Test the process before you need it.
Not every system can be updated immediately. PHP published settings that reduced exposure in the meantime, but said they did not make a server safe.1
Many organisations took services offline instead. In Japan, the airline ANA suspended some online services as a precaution.5 In the Netherlands, the sites taken offline included those of the House of Representatives and the national cyber security centre.4
Shutting down can be the right call, but it comes at a cost. Taking services offline in a hurry, without an agreed plan, may cause more disruption than the risk justifies.
The answer is to decide in advance which services can be taken offline, for how long, and who makes that call. Then the decision rests on risk rather than pressure.
Temporary protections can also buy time. A firewall in front of a website can block known attacks before they reach the server, but it doesn't remove the flaw. One security provider that blocked PHP2Shell attacks this way saw attackers continually change their methods to bypass its rules. It advised its customers to keep the firewall on and update PHP as well.2
Updating PHP closes the flaws, but it does not remove an attacker who got in before the update. Attackers often leave a backdoor so they can get back in later. A common example is a web shell, a hidden script that lets them control the server from anywhere. One of the flaws also let attackers read data from server memory, including passwords, session tokens, API keys and private keys belonging to other requests.4
After an emergency update, check exposed systems for signs of compromise, and replace credentials held on any server that was exposed. If you're unsure whether an attacker got in, a compromise assessment can determine whether one did.
Knowing quickly matters for compliance too. Under NIS2, the EU's cybersecurity directive, organisations it covers must report a significant incident to the authorities, starting with an early warning within 24 hours of becoming aware of it.6 Our NIS2 page explains who the directive covers and what it requires.
PHP 8.1 and older no longer receive updates from the PHP project. Because of the severity of these flaws, PHP made an exception and published minimal fixes for 7.4, 8.0 and 8.1. 1 Organisations can't count on that next time.
PHP 8.2 reaches end of life on 31 December 2026, after which it will no longer receive security fixes.1 Track when the software you rely on loses support, including software run by your suppliers, and plan upgrades before that date.
Our Compromise Assessment looks for evidence of compromise on your servers and computers, whether it came through PHP2Shell or another flaw. You get:
We don't stop at telling you whether you were compromised. We search affected systems for backdoors and anything else attackers installed, and tell you how to remove them.
The assessment draws on more than 20 years of incident response work. It is updated continuously with detections from the customer systems our analysts monitor, so threats such as PHP2Shell are covered as they emerge, not months later.
There is nothing to install; your team decides which systems our collection tool runs on, and the assessment usually takes less than four weeks.
If you see signs of an active attack, don't wait for an assessment. Our emergency response team is available 24/7.
Flaws like PHP2Shell will keep appearing. Organisations that know their systems, have agreed decisions in advance and can see what is happening on their networks are well placed to respond.
With Managed Detection and Response (MDR), analysts monitor activity around the clock and can respond as soon as something suspicious appears.
Sign up for our newsletter and get the latest cybersecurity analysis, reports and events from CSIS delivered straight to your inbox.