PHP is a programming language. Its developers describe it as a general-purpose scripting language especially suited to web development: on the server, it builds each page of a site at the moment a visitor requests it. According to W3Techs, a service that measures the technologies websites use, PHP is used, as of October 2026, by 69.3% of the websites whose server-side language is known. WordPress, Drupal, Magento, PrestaShop, Laravel and Symfony are written in PHP.
On 21 October 2026, the PHP team rushed out new versions of the language. They fix two critical vulnerabilities, which the people who found them named PHP2Shell. With a few requests, and no account or password, an attacker can make the server that hosts a site execute their own code. And it all happens before the site’s code even starts to run. These vulnerabilities go back to PHP 5.4, released on 1 March 2012. Attacks were reported before the fix was published.
In short
- Am I affected? In practice, we advise treating any server whose PHP is not up to date as exposed. For PHP2Shell, the question also applies to products that embed PHP without showing it.
- What should I do today? Complete protection means updating: for PHP2Shell, PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or a later version of the same branch, or your distribution’s fix. If updating is not possible right away, isolate the applications exposed to the Internet until it is. The steps to follow, in order, are in the section “WordPress site hacked or vulnerability discovered: what to do, in order”.
- Who should I ask? If your website or application relies on PHP, the question to ask your host or your provider today is simple: which version of PHP do we use, and when does it move to a fixed version?
Our article “How to fix vulnerabilities in applications” sets out what applies to any application, whatever its language. This vulnerability is not the first of this scale, and nothing suggests it will be the last. Three things can be prepared ahead of a vulnerability: what it lets an attacker reach, how long it takes to notice, and how long it takes to fix.
The technical details are grouped in the passages headed “For your technical team”.
PHP2Shell: what happened
On a web server, PHP is the program that executes a site’s code: the code of WordPress, of a PrestaShop store or of a custom-built application. The two vulnerabilities, referenced CVE-2026-109618 and CVE-2026-109619, are not in any of these programs, nor in a plugin. They are in PHP itself.
The PHP team gives them a severity score of 9.2 out of 10 (CVSS 4.0 scale). According to Calif, a security research company whose researchers reported the first vulnerabilities to the PHP team, they are exploitable under default configurations.
On 20 October, details leaked before the planned publication date (Patchstack). The PHP team brought the release forward by a day (CyberScoop). Versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35 came out on 21 October at around 3 pm UK time. The PHP team is clear: “There are no complete mitigations, updating is the only safe choice.”
Early attacks were reported on the morning of 21 October, before the fix was published. Cloudflare, a provider of website protection and acceleration services, observed attacks against its customers between the leak and the official release. On 21 October it switched on filtering rules for all its customers, free plan included, while telling them to apply the fix even with those rules in place. Patchstack, which tracks vulnerabilities in the WordPress ecosystem, reports that partner hosts told it of exploitation the same morning. At around 3 pm UK time, its own sensors were still only recording scanning attempts, with no evidence of intrusion. watchTowr, which tracks attacks through a network of decoy servers, says it observed exploitation on 21 October. Amazon’s threat intelligence team says its decoy servers recorded an exploitation attempt as early as 17 October, four days before publication. Cloudflare’s chief executive posted how the numbers grew (The Register): thousands of exploitation attempts (not confirmed intrusions) on its network in the ten hours before the announcement, tens of thousands in the 45 minutes after it, then millions. In Japan, the Prime Minister asked website operators that same day to check whether they use PHP and to apply the fix overnight, or failing that to take their sites offline. According to Reuters and Al Jazeera, banks, transport companies and government bodies in Japan and Europe suspended part of their services.
CERT-EU, the computer emergency response team of the EU institutions, advises patching immediately and, where that is not possible, considering isolating exposed applications from the Internet until the fix has been applied and verified. In the United States, CISA, the US cybersecurity agency, asks organisations to take PHP systems offline if they cannot be updated immediately or still run PHP 8.1 or older.
On 23 October, the PHP team reported a third vulnerability (CVE-2026-115560), for which, as of 6 November, no fix has been published. It too lets an attacker execute code on the server, in a case its developers consider unlikely: an application that changes, while it is running, the format in which its visitors’ sessions are stored, with upload progress tracking enabled. The versions fixed on 21 October do not cover this vulnerability, and the PHP team says it is handling it in its regular release cycle, without giving a date. We therefore advise asking your host or your provider to disable this progress tracking, or to leave it disabled if that was already done for PHP2Shell, until the fix is released.
For your technical team
-
Versions fixed on 21 October 2026: 8.5.12, 8.4.27, 8.3.36 and 8.2.35, or any later version of the same branch (php.net). PHP 8.1 and older versions are no longer supported by the PHP team (supported versions). According to Help Net Security, the PHP security team has published minimal source patches for PHP 7.4, 8.0 and 8.1, with no new official release, for those who build PHP themselves, and Linux distributions received the fixes before they were published. Support for PHP 8.2, security fixes included, ends on 31 December 2026 (supported versions).
-
Affected execution modes: all those that serve web requests, PHP-FPM, Apache’s mod_php (the most exposed), php-cgi, FrankenPHP, LiteSpeed (Help Net Security, Patchstack).
-
Exposure: with mod_php, every site exposed to the Internet is affected. With PHP-FPM, exploitation requires additional conditions, related to sessions and to upload progress tracking (Calif). In practice, we advise treating any server whose PHP is not up to date as exposed.
-
Partial stopgap mitigations: session.upload_progress.enabled=0 (with php_admin_flag for PHP-FPM); Calif points out that this setting does not replace a fix. Restart all PHP processes after changing a setting (Patchstack); the pipeline or the host applies that change like any other.
-
Inventory: the Dutch national cybersecurity centre maintains a repository with lists of software that depends on PHP, and detection and mitigation material. It recommends that you “identify PHP-based applications and their runtime versions” and “check third-party images, appliances and embedded runtimes separately”.
-
CVE-2026-115560 (23 October 2026): as of 6 November, no fix, and no date; the versions fixed on 21 October do not cover it, and the PHP team does not say which versions are affected. It affects an application that sets session.serialize_handler to php_binary or php_serialize, then switches it back to php with ini_set() before session_start(), while upload progress tracking is still enabled. Mitigation: session.upload_progress.enabled=0; the PHP team asks you to keep this setting in place if you applied it for PHP2Shell.
What can an attacker do, without credentials and before the site’s code even runs?
To understand it, you need to know what PHP does when a request arrives. When a visitor submits a form or a file, the web server passes the request to PHP. PHP starts by preparing it: it parses the data received, allocates memory, sets up the visitor’s session. Only then does it start the site’s code, the code that checks who is logged in and what they are allowed to do.
PHP2Shell is triggered during this preparation. According to Calif, both attack paths execute “before the target PHP file runs”. Wiz, a cloud security company, adds that the attack works even if the application never uses sessions. Calif states that with PHP-FPM, additional conditions apply (see the technical box above).
The mechanism, described by the PHP team and simplified here, unfolds in three steps.
- The attacker sends a file in a deliberately malformed request.
- PHP runs out of memory while parsing this request, and stops halfway through its preparation. Half-freed data stays in memory, and the PHP process still treats it as valid.
- The next request, handled by the same process, reuses these leftovers, and the attacker uses them to make the server execute their own instructions.
At that point, neither the login page nor the application’s access rules have run yet.
The attacker’s code then very probably runs with the rights of the PHP process, that is, of the system user PHP runs as on the server (php.net). That is not automatically the machine’s administrator. But this user can read everything PHP needs to make the site work. And on a system that is not itself up to date, other known vulnerabilities let an attacker go from this user to the machine’s administrator: that was the case with PwnKit and Baron Samedit, discussed below.
Here is a plausible scenario, which chains what these vulnerabilities allow with what attackers have already done against PHP sites. As of 25 October, we have found no public report of such an attack using PHP2Shell.
Read the database password. A site needs to connect to its database, and the password is most often in a configuration file. For WordPress, it is the wp-config.php file, which, according to the WordPress documentation, “contains your website’s base configuration details, such as database connection information”. The WordPress hardening guide advises making sure that only you “and the web server” can read it. Yet if PHP is executed by the same system user as the web server, which depends on the configuration, the attacker’s code can read this file. Looking for passwords in configuration files is a technique catalogued by MITRE ATT&CK, the reference knowledge base of attack techniques.
Help themselves to the data. With this password, the attacker connects to the database as the application would: customer accounts, orders, addresses. If the database account also has the right to delete or alter tables, they can do much more than read.
Settle in to come back. The attacker can drop a web shell: a small file placed on the web server that lets them come back and control the server from their browser (MITRE ATT&CK). This file stays in place after PHP is updated. Fixing the vulnerability does not remove it.
Skim card payments. On an online store, the attacker can insert code into the checkout page that copies the card numbers customers enter. That is what the CosmicSting attackers did, as described below.
Read the server’s memory, without executing code. According to Wiz, these vulnerabilities also make it possible to read part of the memory of PHP processes, which can hold “passwords, authentication tokens, API keys and certificates”.
Two recent attacks show what such vulnerabilities become once they are public. In June 2024, a vulnerability in PHP on Windows (CVE-2024-4577) was the target of many exploitation attempts within 24 hours of its disclosure, according to the research team at Akamai, a company providing Internet security and content delivery services. According to Help Net Security, citing the company Imperva, the same vulnerability was used to deliver ransomware two days after the fix was published.
The same year, CosmicSting (CVE-2024-34102) hit Magento and Adobe Commerce, two online store platforms written in PHP. According to Sansec, a company specialising in online store security, seven groups of attackers hacked 4,275 stores. They stole the store’s secret encryption key, used it to forge access to its API, then inserted code into the checkout page that copied bank cards. When the attackers started looking for these keys, 75% of installations had not applied the fix. And according to Sansec, quoted by The Hacker News, even patched stores remained vulnerable as long as they had not replaced their key: a key stolen before the fix still worked afterwards. Applying the fix therefore does not end the incident.
Who is affected? Everything that runs on PHP
Content management systems first. According to W3Techs, WordPress alone is used, as of October 2026, by 39.6% of all websites. Joomla, Drupal, PrestaShop, Bitrix, TYPO3 and OpenCart are also written in PHP.
Then custom-built applications. Laravel and Symfony are frameworks, sets of components on which custom applications are built in PHP. On the business software side, Dolibarr, an open source ERP and CRM for small and large companies alike, is written in PHP.
Calif says it confirmed exploitation on WordPress, Drupal, Joomla, Magento, MediaWiki, Nextcloud, phpMyAdmin, Roundcube and WHMCS, as well as on Laravel and Symfony. And other products embed PHP without showing it: CERT-EU warns that products that include PHP may be affected even if they do not expose it directly. Palo Alto Networks confirmed this on 21 October: every version of PAN-OS, the operating system of its firewalls, and of its Panorama management console is affected, through the management interface. By 29 October, the vendor had released fixed versions for all the listed branches and was reporting attacks on management interfaces exposed to the internet. It advises updating and restricting access to this interface to trusted internal addresses. NCSC-NL, the national cybersecurity centre of the Netherlands, maintains a list of software that depends on PHP: it is the best starting point for finding out which ones you use.
How many sites use a version the PHP team no longer fixes? In October 2026, by our calculations on W3Techs’ figures, nearly half of PHP sites whose version is known: around 35% are on PHP 7 or older, and around 14% on PHP 8.0 or 8.1 (breakdown by version, PHP 8 detail). This figure should be read with caution: some Linux distributions patch old versions themselves without changing the version number, so an old version is not always a vulnerable one. According to a researchers’ estimate reported by CyberScoop on 21 October 2026, more than 1.3 million servers exposed on the Internet could be vulnerable. So check your site’s PHP version, or ask your host for it. If it is no longer among the versions the PHP team maintains, it will not get a new official release fixing PHP2Shell. The PHP team has published minimal source patches for PHP 7.4, 8.0 and 8.1 (technical box above), but most sites only get them through their Linux distribution or their host. Otherwise, move to a maintained version.
A vulnerability fourteen and a half years old: is that unusual?
Fourteen and a half years between writing a piece of code and discovering its vulnerability seems enormous. That is often the case, even for some of the most serious vulnerabilities of recent years.
| Vulnerability |
Software affected |
Present since |
Made public |
Duration |
| Shellshock |
Bash, the command interpreter of Unix and Linux systems |
1989 |
September 2014 |
about 25 years (D. A. Wheeler) |
| PwnKit |
pkexec, a polkit tool for running a command with other rights on Linux |
May 2009 |
January 2022 |
about 12 and a half years (Qualys) |
| Baron Samedit |
sudo, the command for acting as administrator on Linux |
July 2011 |
January 2021 |
about 9 and a half years (Qualys) |
| Heartbleed |
OpenSSL, an encryption library |
March 2012 |
April 2014 |
about 2 years (heartbleed.com) |
| PHP2Shell |
PHP |
March 2012 |
October 2026 |
about 14 and a half years (php.net) |
Researchers had measured as early as 2006 how long vulnerabilities stay hidden. Andy Ozment and Stuart Schechter, two computer security researchers, followed the vulnerabilities of OpenBSD, an open source operating system known for its security. 62% of the vulnerabilities reported during the study were already present when it began, and half of the vulnerabilities in the original code stayed hidden for at least 2.6 years before being found (USENIX Security 2006).
These vulnerabilities have one thing in common: they sat in code written years earlier, on which a very large number of systems rely.
Is the week of 20 October unusual too? That day, a leak revealed PHP2Shell. In a little over three days, thirteen technologies received a fix for a serious vulnerability or were reported as exploited, among them PHP, GitLab (a platform that hosts software code and automates its deployment), Node.js (the software that executes JavaScript on servers) and the Linux kernel. This count is ours, drawn from the advisories of the vendors and of CISA.
CISA keeps the list of vulnerabilities known to be exploited. From 20 to 23 October, it added eight, almost twice its average for a whole week in 2025 (4.7), by our count from CISA’s catalogue. None of the eight is a PHP vulnerability: as of 23 October, PHP2Shell is not in CISA’s catalogue.
The number of vulnerabilities published, on the other hand, is rising sharply. According to Bloomberg Law, the NVD, the US database of known vulnerabilities, recorded 45,207 from 1 January to 27 July 2026, around 65% more per week than the 48,185 vulnerabilities of 2025 counted by the analyst Jerry Gamblin (our calculation). The same outlet, which attributes this rise to vulnerabilities found with AI, estimates that at this rate the 2026 total could be double that of 2025.
So the week stands out, in a year when the number of published vulnerabilities is rising sharply, for almost twice as many exploited vulnerabilities as usual, though PHP2Shell is not among them to date. For a company, that means more fixes to apply, within shorter deadlines. In the United States, CISA now sets federal agencies a deadline as short as three days for the riskiest vulnerabilities, and recommends that every organisation address the vulnerabilities in its catalogue “immediately”. We extend this to every critical fix: we advise applying it on the day it is published.
Attacks start earlier and earlier, sometimes before the vulnerability is made public
The time between the disclosure of a vulnerability and its first exploitation shrinks year after year. According to Mandiant, Google Cloud’s threat intelligence team, this time was 63 days on average in 2018 and 2019; its M-Trends 2026 report estimates that first exploitation now comes, on average, seven days before the vulnerability is disclosed.
PHP2Shell illustrates this: a first attempt spotted by Amazon as early as 17 October, a leak on the 20th, attacks reported by Cloudflare and watchTowr on the morning of the 21st, the fix published that afternoon.
If the attack can start before the fix is published, applying the fix is not enough. That leaves three things to prepare, which hold for any application: that the vulnerability, on the day it is exploited, does not give access to everything; that you are alerted immediately when it is exploited; and that the fix goes to production on the day it is published.
What AI changes
The Calif researchers explain that they reviewed PHP’s source code with the help of a language model. AI agents followed the code paths, and a model generalised the first vulnerability into a research method, which led to a second one. According to them, they needed no special tooling and no access to a non-public model; their knowledge of the history of PHP vulnerabilities mattered. Wiz, for its part, warns that language models can help adapt an attack to different PHP versions, configurations and memory layouts, and that “this significantly lowers the barrier to scaling attacks across different deployments”.
It is not the first case. In 2024, Big Sleep, an AI agent from Google, found an exploitable vulnerability in SQLite, a database found in a very large number of applications, fixed before it reached a released version (Google Project Zero). In August 2025, at the final of DARPA’s AIxCC competition (DARPA is the research agency of the US Department of Defense), AI systems found 54 vulnerabilities planted for the competition and fixed 43 of them, in 45 minutes per fix on average. They also found 18 real vulnerabilities, which had not been planted for the occasion (DARPA).
On 21 October, two projects fixed vulnerabilities found with AI tools: PHP, according to the people who discovered its vulnerabilities, and Node.js, for one of its own (CVE-2026-111497), which its team credits to OpenAI Codex Security and two researchers.
On 21 October, Microsoft described a campaign carried out with ARTEX by Storm-0940, an actor Microsoft says is aligned with the Chinese state. Microsoft presents ARTEX as an open source penetration testing framework that hands the stages of an attack to AI agents. According to Microsoft, Storm-0940 used it to automate attacks against hundreds of organisations. After compromising ConnectWise, a software vendor for IT service providers, it tried to sign in to more than 2,250 Microsoft 365 environments belonging to ConnectWise’s customers. The agents handled reconnaissance, changes to application credentials, and attempts to change permissions to widen or extend their access. Microsoft states that most of these attempts failed.
On 19 October, Reuters reported that a Chinese-speaking cybercriminal had used AI agents to break into the websites of more than 100 companies, for around $5,000 of AI usage. The agency could not establish how much data had been extracted. Reuters relies on a report by a researcher, Snorre Fagerland, of the company NorForge; of the companies named, two say they dealt with an incident on a website.
Amazon describes a general trend: AI-assisted analysis makes it cheaper to go from a fix or a security advisory to a working attack, and more attackers can act within hours, or even minutes, of a vulnerability’s details being published. Amazon does not say that the PHP2Shell attackers used AI, and says it does not know how the attacker obtained information about the vulnerability before it was published.
Big Sleep and AIxCC show that AI systems find vulnerabilities in real code; according to Wiz, a model can help adapt an attack; and according to Microsoft, AI agents are already carrying out attacks against organisations. AI therefore serves those who fix vulnerabilities as well as those who exploit them. We treat this as a hypothesis: the time between the discovery of a vulnerability and the first attacks could shrink further.
Updates: automatic, or by decision
We advise against the automatic updates WordPress applies on its own to plugins and themes, without any testing. Instead, a WordPress site is updated one plugin at a time.
On a bespoke-built application, every update is a deliberate decision, and then goes through the deployment pipeline.
WordPress updates only update WordPress. None of them touches PHP. PHP is supplied by the host or by the server’s operating system: that is why the PHP team refers people to the Linux distribution or the vendor that maintains PHP over the long term. So for a WordPress site, PHP is updated by the host, or in the environment the site is deployed from.
On shared hosting (the server is shared between several sites) or managed hosting (the host administers the server), the host applies PHP fixes to the version you have chosen. On shared hosting, switching PHP version is still your call; some managed WordPress hosts move you to a newer version themselves when yours is no longer maintained. On a dedicated server, a virtual server or a cloud server, it is up to you, unless you are on a managed plan.
We recommend choosing a host that applies PHP fixes for you, and checking with them that your version is still maintained.
During PHP2Shell, Combell patched PHP on its own from the evening of the same day. On its virtual servers, Hostinger reminded customers that they manage PHP themselves.
Before choosing a host, ask them these questions:
- Who applies PHP fixes on my plan, and how quickly?
- Do you publish your incidents on a public status page? Hostinger did so during PHP2Shell.
- How can I check that PHP has been fixed? A fix can leave the version number unchanged, as happened at Infomaniak with PHP2Shell.
- Do you restart PHP after a fix? CloudLinux, which supplies PHP versions to hosts, asks for PHP services to be restarted for the fix to take effect.
- What happens to my PHP version when the PHP team no longer maintains it?
WordPress site hacked or vulnerability discovered: what to do, in order
On the day a vulnerability hits your software, the course of action comes down to eight steps. Read them before that day comes, and agree on who does what.
1. Find out whether you are exposed. Which sites and applications use the affected component, in which version, on which servers, with which host? For PHP2Shell, the question also applies to products that bundle PHP without it being visible. If a provider or a host manages your site, this is the first question to ask them. Keep a log of every action taken, stored outside the affected system.
2. Update, or isolate. Complete protection means updating: for PHP2Shell, PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or a later version of the same branch, or your distribution’s fix. As support for PHP 8.2 ends on 31 December 2026, it is better to move to PHP 8.3 or later. If updating is not possible right away, isolate the applications exposed to the Internet until it is, as CERT-EU advises.
Watch out for a trap: for PHP2Shell, the maintenance mode of a WordPress site or a Laravel application does not protect against this vulnerability. The vulnerability is triggered while PHP prepares the request, before the site’s code runs. Blocking has to happen before PHP: on the web server or the reverse proxy, which returns a static page, or at network level.
3. Look for signs of intrusion. Amazon advises searching back to at least 17 October, not from the publication date. For PHP2Shell: unusual file upload requests followed by memory errors or repeated 500 errors, abnormally long or malformed session cookies, unexplained PHP restarts (Patchstack). More generally, signs on the server: new files in the site’s folders, programs started by the web server, unknown outbound connections, new administrator accounts. Patchstack recommends treating a targeted server as potentially compromised. Wiz warns that, for PHP2Shell, application logs may contain little information: look at the web server and PHP-FPM logs too.
Steps 4 to 8 apply to any vulnerability and draw on public documents: preserve evidence before cleaning up, change every secret the server held, rebuild from a clean source if the server was compromised, report the incident, then learn the lessons.
How we work
A security fix is a change like any other: it goes through the same pipeline as everything else. We do not look for vulnerabilities; that research belongs to researchers. Our role is to limit what the next vulnerability will let an attacker reach, to be alerted as soon as it is exploited, and to apply its fix as soon as it is published.
The same team develops, tests, deploys and maintains your software continuously, in the same pipeline. Every production deployment goes through a deployment pipeline: security and accessibility are verified automatically before reaching production, and performance is monitored in production. We put one change at a time into production, after it has been checked by the pipeline. If there is an incident, we roll back to the previous version.
For the applications we develop, we pin every dependency to its exact version, check every day whether a known vulnerability affects the components in use, and monitor the servers.
A PHP update like the one PHP2Shell made necessary is part of the maintenance included in our offer: custom software on a fixed monthly budget, with a zero-regression guarantee.
We also offer software production chain audits and training for technical teams. The audit checks whether a security update to your software can be applied and delivered to your customers the same day, and what remains to be put in place.
Further reading
A security update reaches production on the day it is published when every change already gets there in small steps. Our article on Continuous Delivery and Continuous Deployment explains how this works, and our article on the predictive or adaptive approach why this way of delivering belongs to an adaptive approach.
To take over an application whose PHP version is no longer maintained, our application takeover and redesign page explains how we go about it.
Do you have an application to get developed, or to take back in hand? Shall we talk?