A major leak in PHP allows attackers to execute code remotely on web servers worldwide. Active exploitation began before the patch became available. That patch is now out.
The PHP project has shared patches for the previously leaked vulnerabilities in the PHP programming language slightly earlier than anticipated. Nearly 70 percent of all websites worldwide are affected. The updates resolve two critical vulnerabilities that were already being actively exploited. Attackers can execute code via the bugs in question without needing to log in. The high CVSS score of 9.2 is therefore appropriate.
PHP versions 8.5.12, 8.4.27, 8.3.36, and 8.2.35 resolve the issues. You can find them here. All other versions are vulnerable. Updating must be the highest priority for any organization with a website or app that relies on PHP. Security experts expect that exploitation on an increasing scale is a matter of hours, not days or weeks.
Approximately 69.3 percent of all websites worldwide use PHP.
Even before the details of the bug were known, the risk already had a name: PHP2Shell. The reference to the impactful Log4Shell is no coincidence: approximately 69.3 percent of all websites worldwide use PHP.
The bugs in detail
PHP2Shell revolves around CVE-2026-109618 and CVE-2026-109619. With CVE-2026-109618, the handling of a memory shortage can interrupt PHP while the internal data of a request is only half-filled. When PHP subsequently cleans up the request, it may treat that invalid data as valid. With CVE-2026-109619, internal information from a request persists after the underlying memory has already been released. A subsequent request in the same worker process can use that outdated information before PHP resets it.
According to PHP, all installations that handle web requests are at risk, whether they work with PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, or LiteSpeed. The risk is greatest with mod_php. A working exploit already exists there, where a single request without authentication starts the attack before any application code even runs.
Vulnerability in PHP itself
PHP is a critical programming language that powers a large portion of the web. Because the flaw resides in PHP itself, any application running on a vulnerable version is at risk, regardless of how securely the application’s own code was written. Huntress points to content management systems such as WordPress, Drupal, Joomla, and Magento, management panels like cPanel and Plesk, and appliances with embedded PHP.
“This is not a problem you can solve just by updating WordPress or plugins,” explains Vaisha Bernard, Chief Hacker at Eye Security. “The vulnerability is in PHP itself, the software the website runs on. Organizations must check the PHP version of their public websites and install the official update.”
This is not a problem you can solve just by updating WordPress or plugins.
Vaisha Bernard, Chief Hacker Eye Security
The fix exists for PHP 8.2 through 8.5. Linux distributions and long-term support (LTS) vendors received the patches in advance, so administrators should check if updated packages are already available. Organizations that are customers of shared web hosting must rely on their provider for PHP patching. They can verify if the update has already been implemented. By now, that should be the case.
Combell, for instance, had implemented the patch just over half an hour before the public release. ITdaily has been running on the updated version since before 3:00 PM. It is a good idea for administrators to double-check whether their website or application has effectively been moved to the latest PHP version.
This can pose a problem, particularly with older installations. PHP 8.1 and older no longer receive updates from the PHP project. Given the severity of the vulnerabilities, the security team did make minimal backports available in the source code for PHP 7.4, 8.0, and 8.1 for those who compile their own or lack an LTS vendor.
Offline on their own initiative
In Belgium, DPG Media has taken several of its sites offline as a precaution, the company reports. Bernard considers this a wise move: “For PHP-based websites accessible from the internet, it is sensible to temporarily restrict access or take the site offline until the official update has been applied. After the update, verify that the website is actually using the patched version and check whether it has already been compromised.”
Other websites, such as those of the Vrije Universiteit Brussel and several hospitals, also went offline. In Belgium, the CCB is recommending this step as well. The agency has even temporarily placed its own website in maintenance mode. As soon as patches are installed, all sites can go back online. PHP2Shell can thus take credit for taking sites offline worldwide, even without interference from hackers.
Mitigation is possible (partially)
There are other options to mitigate attacks. Cloudflare had already rolled out an initial set of WAF rules against known attack vectors before the patch was released, reports Dane Knecht, CTO of Cloudflare. A web application firewall (WAF) inspects traffic to a website and blocks requests that resemble a known attack before they reach the server. These rules apply to PHP sites with traffic routed through Cloudflare, and are available to all customers, including those on free plans.
For PHP-based websites accessible from the internet, it is sensible to temporarily restrict access or take the site offline until the official update has been applied.
Vaisha Bernard, Chief Hacker Eye Security
PHP itself also published several strategies users can use to protect their applications while awaiting an update. According to the organization, these reduce the risk, but PHP emphasizes that only an update makes the installation secure again.
First attacks
Knecht saw the first attacks emerging as early as the morning of October 21 and said Cloudflare is updating the rules as soon as new attack vectors become known. “This is only a stopgap,” he writes on X. “Patch as soon as PHP releases the update today.” That is now the case.
The news leaked on October 20, ahead of the coordinated disclosure that watchTowr said was not planned until Thursday. Since the unveiling of the patches, technical details have been available in two PHP advisories on GitHub. Hackers can now also use these to fine-tune their attacks.
It is now important for everyone to map out all servers and applications using PHP and update them as quickly as possible. Systems connected to the internet and thus accessible deserve priority. Those who do not manage the server themselves should ask their hosting provider to apply the update immediately.
PHP2Shell is already an illustration of the extremely shortened window between the disclosure of a CVE and active exploitation. In recent years, driven by AI, this window has shrunk from weeks to days, and now hours. AI can quickly identify exactly where a leak is located and how it can be exploited based on a patch or other information. In this case, the first signs of abuse appeared even before the patch was available.
A race has now begun: PHP has fixed the bug, but it is up to administrators to ensure they are running the latest version of PHP. Attackers will now be searching in large numbers for servers where the backdoor is still slightly ajar.
