On October 21, 2026, PHP shipped an emergency release for two flaws that can let an attacker run code on a web server without logging in. PHP runs on roughly 70% of websites, according to the AP’s reporting, and that includes most WordPress, Drupal and Joomla sites. Within hours, governments were taking pages offline to patch.
What made the news bigger than another critical bug is how it was found. Two separate research teams found the flaws with help from AI models, and OpenAI described it as a case of AI finding a serious bug before attackers did. A month earlier, an autonomous AI agent had used two unknown flaws to break into a Dutch security nonprofit.
This article covers both cases: what happened, what is confirmed, what is still unclear, and what to do if you run a website.
The short version
- PHP2Shell is two critical PHP bugs, CVE-2026-109618 and CVE-2026-109619, each rated 9.2 on CVSS v4.0. An attacker does not need an account.
- Fixed versions are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released October 21. PHP says updating is the only complete fix.
- AI helped find the bugs. Calif used OpenAI’s GPT-5.6 Sol during a source-code audit. Wiz found them separately with its own AI system plus Gemini 4 Argon and GPT-5.6 Sol. People chose the target, checked the results and wrote the fixes.
- Attackers moved fast. Cloudflare’s CEO reported millions of exploitation attempts within hours of disclosure. As of October 22 the AP had no confirmed breaches.
- An AI agent breached a security group. In September, an agent chained two unknown flaws in the Zammad helpdesk to get into the Dutch Institute for Vulnerability Disclosure (DIVD) and took data. Nobody has claimed it.
- The pattern: AI is finding more bugs, mostly for defenders, and the gap between a fix and an attack is getting shorter.
What PHP2Shell is
Both bugs sit in how PHP cleans up after a fatal error, mainly when a request runs out of memory. PHP’s security advisory describes them this way:
- CVE-2026-109618, out-of-memory corruption. Running out of memory can stop PHP halfway through setting up internal request data. The cleanup code can then treat that half-built data as valid.
- CVE-2026-109619, stale global state. Some internal state belonging to a request can survive after its memory is freed. The next request on the same worker can use it before it is reset.
In plain terms, one bad request can leave a mess behind, and a second request can use that mess to take control of the process.
PHP lists every installation that serves web requests as at risk: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. It considers mod_php the highest risk, because there the attack can start before any of your application code runs. Wiz demonstrated unauthenticated code execution on WordPress, Drupal and Joomla, and says every PHP version from the last decade is affected by at least one of the bugs, going back to 5.4.
This is a flaw in PHP itself, not in a plugin or theme. A site with perfectly written code is still exposed if the PHP underneath it is old.
How AI found it
Two teams found the same root cause independently, and both used AI.
Calif. In its write-up, Calif describes an audit of PHP’s source code that started around August 1. The researcher chose PHP and pointed the model at a known weak spot: PHP’s memory limit, which was behind a famous remote-code-execution bug back in 2004. The model found ways to push a request past the memory limit. An agent then found a bug in PHP’s memory manager and traced it to mod_php. The team turned that finding into a reusable skill file, and running it turned up a second bug in session upload handling. Calif reported the first bug to PHP on August 11.
Calif’s lessons are useful for anyone trying this on their own code:
- The model did better when a person told it where to look, based on the history of past bugs.
- The first bug found was not the most serious one. Looking for variants of it paid off.
- No special harness or private model was needed for the first find. They are also clear that no model finds every bug from a simple prompt.
Wiz. Wiz says it first found the bug on August 19, using Wiz Atlas, its own AI research system, together with Gemini 4 Argon and GPT-5.6 Sol. It confirmed code execution on Drupal the next day and on WordPress the day after, and reported to PHP on August 24.
OpenAI credited Calif’s find to GPT-5.6 Sol as part of its “Patch the Planet” program and said it coordinated maintainers, researchers and security companies over the two months before release. The PHP Foundation also thanked OpenAI’s Codex Security team.
What is still unclear
The PHP Foundation makes a fair point: the public material does not show how much the AI tools did on their own at each step. In both write-ups, people chose the target, framed the questions, checked the output and wrote the patches. “AI found it” is true. “AI found it by itself” is not established.
The Foundation is also open about its own side. It says the out-of-memory fix stalled for months because of how the security team made decisions and how few people it had. The release was moved forward one day, to October 21, after the CVE numbers leaked.
How the world reacted
PHP announced the release a day ahead and shipped it on October 21. According to the AP’s report:
- The FBI warned that the bugs allow remote code execution and advised taking sites offline if they could not be updated immediately.
- Japan’s prime minister asked site operators to check whether they use PHP and patch it. Some government sites went offline as a precaution.
- Some UK government services were briefly limited. The EU’s cybersecurity agency, ENISA, told organisations to act immediately.
- Cloudflare put firewall rules in place, and its CEO reported millions of attack attempts within hours.
There was a follow-up two days later. On October 23, PHP published a notice about a third issue, CVE-2026-115560, in session upload progress. It only applies to an unusual setup: an app that switches the session serializer to php at runtime with ini_set() before calling session_start(). PHP will fix it in the next regular release. Until then it recommends turning off session upload progress, which was already one of its suggested mitigations.
The other story: an AI agent broke into DIVD
The PHP case is AI helping defenders. The DIVD case is the other side.
The Dutch Institute for Vulnerability Disclosure is a volunteer nonprofit that scans the internet for exposed systems and warns their owners. On September 21, an attacker got into its self-hosted Zammad helpdesk. DIVD described the attacker as an autonomous AI agent that picked each next step on its own, at machine speed.
- It hijacked a session and ran code as the Zammad service user (CVE-2026-102489).
- It became root within seconds through a second flaw (CVE-2026-102490).
- It then tried password spraying and a man-in-the-middle attack. The spraying broke its own man-in-the-middle attempt.
- Its scripts had comments explaining what they did. DIVD called the attack loud and messy.
Network segmentation and a quick response stopped it from going far beyond the helpdesk. Even so, DIVD confirmed on October 1 that data was taken, including volunteer email addresses and parts of its incident-ticket system. No person or group has been identified or has claimed the attack.
For Zammad users, the advice is to upgrade to 7.2.0 or later or take the instance offline. Versions 6.5 and older no longer get security fixes. As of October 5 there was no fix yet for the privilege-escalation flaw, so check Zammad’s advisories for the current status before you assume you are covered.
This attack was not subtle, and it was not a nation-state operation. That is the worrying part. A noisy agent with two unknown bugs was enough to get into an organisation whose whole job is security.
The bigger picture: more bugs, not yet more attacks
It is easy to read October as “AI hackers are here.” The numbers say something more measured.
- More reports, many of them bad. The PHP security team says it has published 15 CVEs since July 1 and worked through more than 100 reports that were invalid, duplicates or could not be reproduced. It now uses AI to sort and group reports, with people making every decision.
- AI-found bugs are not being exploited more often. VulnCheck’s first-half 2026 report attributed 1,061 vulnerabilities to AI-assisted discovery. Fourteen of them, 1.3%, were confirmed exploited, which is about the same rate as bugs in general.
- But the clock is faster. The median time from a CVE being published to it appearing in VulnCheck’s known-exploited list fell from 120 days in 2025 to 80 days in the first half of 2026.
So far, AI is helping defenders find bugs at least as much as it helps attackers. The cost is on the response side. Maintainers get more reports than they can handle, and site owners get less time between “a fix exists” and “someone is using this against me.” The same theme came up when we looked at GLM-5.3’s cyber capabilities: once a fix is public, it is also a recipe.
What to do if you run a website
If your site uses PHP
-
Find your PHP version. On a server, run
php -v. On shared or managed hosting, look in the control panel or ask your host. WordPress shows it under Tools, then Site Health, then Info. -
Update to a fixed release: 8.5.12, 8.4.27, 8.3.36 or 8.2.35 or later. Restart PHP-FPM or Apache afterwards so no old workers keep running.
-
If you are on PHP 8.1 or older, plan an upgrade. PHP published small backported fixes for 7.4, 8.0 and 8.1, but those versions no longer get regular updates, and PHP 8.2 reaches end of life on December 31, 2026.
-
If you cannot update today, use PHP’s interim settings in
php.ini, not in.user.iniorini_set(), and restart every worker:session.upload_progress.enabled = 0 memory_limit = -1 post_max_size = 8M ; 32M if you accept file uploadsPHP is clear that these reduce the risk but do not make a server safe. A firewall rule from your CDN helps for the same reason. Neither replaces the update.
-
Look for signs of an attack. Wiz suggests watching for unusual multipart requests followed by memory-limit errors or bursts of HTTP 500 responses, very large or malformed
PHPSESSIDcookies, and PHP workers restarting for no clear reason.
For any self-hosted tool
The DIVD breach is a reminder that a helpdesk, wiki or CI server is part of your attack surface.
- Put it on its own network segment and block outgoing connections it does not need.
- Alert on behaviour, not just CVE numbers. A service user opening a shell, downloading tools or connecting to new hosts is suspicious whatever the bug was.
- Decide on automatic containment in advance. An agent can go from first access to root in seconds. Killing a process or isolating a host on a high-confidence alert is better decided before an incident than during one.
If you write code
Use the same tools on your own projects. Calif’s approach of pointing a model at the known weak spots in your stack, then searching for variants of whatever it finds, works on application code too. Only test systems you own or have written permission to test.
Where Feemag stands
Our own sites, Feemag Tools, this journal and www.feemag.com, do not run PHP, so PHP2Shell does not affect them. If you have a WordPress site or a PHP app and are not sure what version it runs or how to update it safely, get in touch and we can help.
Frequently asked questions
Is my WordPress site affected?
Probably, unless your host has already updated PHP. The bugs are in PHP, not WordPress, so updating WordPress plugins does not fix them. Check your PHP version in Site Health and make sure it is 8.2.35, 8.3.36, 8.4.27, 8.5.12 or newer.
My host manages PHP for me. Do I need to do anything?
Check that they have patched. Most large hosts updated quickly, but some shared hosts lag, and older PHP versions selected in a control panel may need you to switch to a supported one.
Were the PHP bugs exploited?
Attempts started within hours of disclosure, according to Cloudflare. As of October 22, the AP reported no confirmed breaches. Treat any unpatched PHP server exposed to the internet as at risk.
Did AI find the bugs by itself?
No one has shown that. Both research teams used AI models heavily, but people chose the target, guided the search, checked the results and wrote the fixes. The PHP Foundation says the public materials do not show how independently the tools worked.
Was the DIVD attack really carried out by an AI?
That is DIVD’s assessment, based on how the attacker behaved: fast, step-by-step decisions, scripts with explanatory comments, and noisy mistakes. No operator has been identified, so who started it and why is unknown.
Sources
- PHP: news archive and security advisories, October 20, 21 and 23, 2026
- PHP Foundation: Today’s PHP security release and how we’re strengthening PHP security, October 21, 2026
- Wiz Research: PHP2Shell: AI uncovers critical RCE vulnerabilities
- Calif: PHP2Shell write-up
- AP via PBS NewsHour: AI discovered a software vulnerability that could impact 70% of websites, October 22, 2026
- Sysdig: AI agent exploits Zammad zero-days in DIVD breach
- Infosecurity Magazine: Just 1% of AI-discovered vulnerabilities exploited in the wild, on VulnCheck’s State of Exploitation H1 2026