PHP2Shell: the 14-year-old flaw under 70 percent of the web
24 October 2026· AFQY News

For fourteen years, a flaw sat inside the software that runs most of the world’s websites. In August 2026, artificial intelligence found it. By the end of October, it had become the most urgent patch on the internet, a race between the people fixing it and the people trying to use it first.
The flaw is called PHP2Shell, and it lives in PHP, the language behind WordPress, Magento, Drupal, Joomla, MediaWiki and a long list of the tools organisations run every day. By most estimates PHP powers around 70 percent of websites whose technology is known. That is why a bug in PHP itself, rather than in one product built on it, matters to almost everyone with a website.
This is what happened, in order: what the vulnerability is, how it came to light, what followed, and where things stand now.
TL;DR
- PHP2Shell is a pair of critical flaws in the PHP engine (CVE-2026-109618 and CVE-2026-109619) that can let an attacker run their own commands on a web server, without logging in, under certain conditions.
- Every PHP version back to 5.4, released in 2012, carries at least one of the two bugs. PHP rated both 9.2 out of 10; watchTowr rated it 10.
- AI found it. Researchers at Calif and Wiz, working with OpenAI and Google models, found the bugs independently in August and reported them to the PHP security team.
- Details leaked on 20 October, a day before the planned release, and attacks began before the fix: Amazon saw an attempt on 17 October, and Cloudflare reported millions of attempts on release day.
- PHP released fixed versions on 21 October: 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Older versions have only source patches or none at all.
- Patching is slow. Infrawatch’s live tracker showed about 12 percent of visible PHP servers patched three days after the release.
What is the vulnerability?
PHP2Shell is two related bugs in the PHP engine itself, which is why it reaches far beyond any single product. As the security firm Sansec put it, stores built on Magento, Shopware and WooCommerce are affected “even when their own code is clean.”
Both bugs come down to what happens when a request runs out of memory partway through. When PHP hits its memory limit, it can stop before it has finished tidying up. One bug can leave data half set up; the other can leave a request’s leftovers alive after their memory has been handed back, so the next request on the same server picks up stale data. In the wrong conditions, that becomes a way for an attacker to read memory they should never see, including passwords, session tokens and keys, or to run their own code on the server.
The UK’s National Cyber Security Centre summarised the risk plainly: the flaws “may allow attackers to execute commands on any web server running PHP.” There are caveats. Researchers say an attack needs specific conditions on the target server, and some public exploits only work alongside another weakness in the website. But the vulnerable code sits in default configurations of the most common ways PHP is run, and the attack needs no username or password.
How did it come to market?
PHP2Shell was found by AI, twice, at almost the same time.
Calif, a security research firm, found the first problem on 1 August 2026 using OpenAI’s GPT-5.6 Sol model, as part of OpenAI’s “Patch the Planet” project, and reported it to the PHP security team on 11 August. Separately, Wiz Research identified the issue on 19 August using a combination of Google’s Gemini and OpenAI’s models with its own tooling, and reported it on 24 August. OpenAI then investigated on its own and found further parts of the bug. Greg Brockman of OpenAI told Fortune the bug had been present in PHP for 14 years, and that a limited version of it had been found in 2024 but never fixed.
What followed was a standard coordinated disclosure: the researchers and the PHP security team worked on fixes in private, with an industry group including Google Cloud, Cloudflare, AWS, Microsoft and Vercel preparing defences, and a public release set for 21 October.
It did not hold. On 20 October, details leaked online. The security firm watchTowr confirmed publicly that the rumoured remote code execution in PHP was real, and early patched builds from one vendor let attackers compare old and new code. The PHP security team brought forward a public notice of its release for 14:00 UTC on 21 October.
What happened as a result?
The attacks. Attackers did not wait for the release. Amazon Threat Intelligence found an exploitation attempt in its honeypot network dated 17 October, four days before public disclosure, and said it remained unclear how the attacker had the information. On release day, Amazon saw several proof-of-concept exploits from around 02:00 UTC, from what looked like multiple actors. Cloudflare reported attacks from 07:43 UTC, hours before the fix was published, and told Fortune the attempts ran to tens of thousands within 45 minutes and millions by that evening.
In the days that followed, SecurityWeek reported that operators of the Mirai botnet had joined the attacks and that exploits able to get past a standard memory protection, address space layout randomisation, were emerging.
Not everyone saw the same picture. Sansec, which specialises in e-commerce security, said on 22 October that mass exploitation was “less likely than we expected on release day,” because the public exploits it examined needed extra conditions to work. Both things can be true: a flood of attempts, many of which fail.
The fixes. PHP released fixed versions on 21 October: 8.5.12, 8.4.27, 8.3.36 and 8.2.35. For older versions the picture is harder. Versions 7.4, 8.0 and 8.1 received source code patches but no official releases, leaving it to operating system vendors and commercial support providers to ship fixes. Versions 7.3 and older, including PHP 5, have no fix at all. Upgrading is the only complete remedy; AWS said there are “no configuration-only workarounds that fully address both issues.”
Some organisations chose the safest option available: switching off. Sites including the Internet Archive went temporarily offline, and in the Netherlands sites including Tweakers and the House of Representatives were taken down as a precaution. Governments moved quickly. The UK NCSC told organisations to update immediately, the Dutch NCSC published a shared inventory of affected software on GitHub, and agencies in Singapore, Japan and Canada issued their own warnings.
What has happened since
The question has shifted from “is it real” to “how fast is the world patching.” The answer, so far, is slowly.
Infrawatch, an internet intelligence company, built a live public tracker, the PHP2Shell Patch Uptake Tracker, that scans the whole internet, over both IPv4 and IPv6, and counts servers that advertise their PHP version. When AFQY checked it on 24 October, it showed 11.93 percent of visible PHP servers running a fixed release, with 263,591 patched servers observed since the release. Its country leaderboard was led by the Netherlands at about 32 percent, followed by Austria and Germany. Servers that hide their version are not counted, so the true picture may differ, but the direction is clear: three days after the fix, most PHP on the internet had not yet been updated.
Other trackers tell a similar story from different angles. One public checker, built from websites people chose to test, found 57 percent of sites revealing their PHP version still unpatched, and a third of them on end-of-life versions with no official fix.
What it means
PHP2Shell will be remembered for two things. It is one of the first critical, internet-wide vulnerabilities found by AI, and it showed how quickly the window between disclosure and attack is closing: here, the attack came first.
For most organisations the practical question is not technical. It is whether you know where PHP runs in your business, including the websites, plugins, hosting and suppliers you rely on but do not manage yourself, and who is responsible for making sure each one is updated.
Sources
- Wiz Research: PHP2Shell
- Fortune: AI helped discover the PHP vulnerability that could take down 70% of the internet
- AWS Security Blog: Amazon Threat Intelligence identifies PHP2Shell exploitation prior to public disclosure
- Sansec: PHP2Shell research
- UK NCSC: Critical security issue affecting PHP
- Tenable: PHP2Shell frequently asked questions
- SecurityWeek: Mirai botnet operators join PHP2Shell attacks as ASLR bypass exploits emerge
- Infrawatch: PHP2Shell Patch Uptake Tracker
- NCSC-NL: PHP2Shell software inventory on GitHub
- Wikipedia: PHP2Shell
