AI found a PHP vulnerability, so why did it take two years to fix?
Chanwoo Song 9 min read

On October 21 (US time), PHP released 8.5.12, 8.4.27, 8.3.36 and 8.2.35 all at once. The security update fixes two vulnerabilities (CVE-2026‑109618, CVE-2026‑109619) that let an attacker run code on a server without logging in. The severity score (CVSS) is 9.2. The security firms that found the flaws call the pair PHP2Shell. On Hacker News, the PHP 8.2.35 release post got 1,077 points and 558 comments. In Korea, the Ministry of Science and ICT raised the private-sector cyber crisis alert from “Interest” to “Caution” as of 12:00 on October 22.
This vulnerability became widely known as a bug that AI found. But the PHP Foundation's post shows that the first sign of the same problem appeared back in 2024. Why did a bug found by AI go unfixed for nearly two years? I read through posts from the PHP Foundation, the security firms Calif and Wiz, OpenAI and Amazon.
The short answer: AI made finding the bug faster, but fixing it was still up to people.
The root of the problem is how PHP handles running out of memory (OOM). If a request hits PHP's memory limit (memory_limit) at exactly the wrong moment, half-built internal data is left behind. When PHP later treats that data as valid, memory gets corrupted. The second vulnerability is that internal state pointing to a previous request's memory survives even after a fatal error, so the next request handled by the same worker process uses memory that has already been freed. With Apache and mod_php, an attack can start from a single request with no login, before any application code even runs.

Both problems sit in places that almost every request passes through, such as memory management and error handling. The PHP Foundation explained that this is exactly what made them dangerous, and also what made them hard to fix without breaking compatibility or hurting performance.
The first sign came in 2024.
In 2024, PHP had its first external security audit in years, with support from Germany's Sovereign Tech Agency. A PHP core developer who was fixing another issue from that audit found the first sign of this OOM problem. However, no path to a real attack was found, and the problem was pushed aside by other issues with clearer impact.
The security team came up with several possible fixes, but each had a cost. They would break backward compatibility, open room for new denial-of-service attacks, or require changes to many third-party extensions as well. The security team works by consensus and could not settle on any of them, and the few core developers who know the engine deeply were busy with other work. Work on the fix stalled for months at a time and then started again, over and over. The PHP Foundation openly called the delay a “structural failure” caused by the security team's way of making decisions and by a lack of resources.
Calif traces the history back even further. In 2004, security researcher Stefan Esser first found a remote vulnerability that abused PHP's memory limit. In 2020, a bug report (#78876) said long variables could cause PHP to run out of memory, but it got little attention.
AI brought the bug back in August 2026.
OpenAI invited Calif to Patch the Planet, its program that supports security work on open-source projects, and Calif began auditing PHP on July 30. According to OpenAI, Calif used GPT-5.6 Sol. On August 11, Calif researcher Ryan Austin reported to PHP a remote code execution bug with the same root as the 2024 OOM problem, and OpenAI separately reported the same cause. Wiz then reported more attack paths on August 24, and OpenAI did the same on September 18.
Wiz used its own tool, Wiz Atlas, along with Gemini 4 Argon and GPT-5.6 Sol, and said Gemini 4 Argon contributed the most to finding the vulnerabilities and verifying the fixes. Wiz wrote that one researcher working with frontier AI finished in a week what would once have taken a world-class team months. The PHP Foundation said it also worked with Alpha-Omega this year to scan PHP with Anthropic's Claude Mythos, and that it now uses OpenAI's Daybreak Red to verify reports and exploit code.
The interesting part is Calif's account. It says it did not use any special tools or models unavailable to the public when it first found the bug. Instead, it knew PHP's 20-year history of vulnerabilities, so it could ask questions in that direction. Calif wrote that AI models left to themselves start with recent, well-known bugs, not with a 20-year-old attack technique. The model was fast, but someone who knew the field decided where to dig.
People did the fixing, with no weekends off.
After August 11, this bug became the top priority for everyone on the PHP Foundation's security staff. With the foundation's support, several people worked on it full-time, day and night, weekends included. Even so, it took about 70 days from the first report to the fix release. That is how long it took to build fixes for every supported version and hand patches in advance to Linux distributions and long-term support vendors.
AI both helped with this work and added to it. Since July 1, the PHP security team has issued 15 CVEs and handled more than 100 reports that turned out to be invalid, duplicates or not reproducible. The foundation said AI helps verify reports and group those with the same cause, but people make every judgment and write every patch.
Attacks were already being attempted four days before disclosure.
The original plan was to disclose at 14:00 UTC on October 22. But around 15:00 UTC on October 20, the two CVE numbers began circulating on Hacker News and social media first. They came with a wrong disclosure time and a wrong score of 10.0. PHP moved disclosure up by a day, to 14:00 UTC on October 21. In the meantime, Calif accidentally posted an attack demo video and then deleted it, and at 07:41 UTC on October 21, Chainguard shipped patched images a little over six hours before disclosure. The foundation criticized this as breaking the embargo (the agreement to hold back disclosure) on its own.
Amazon's report is more serious. Amazon Threat Intelligence said it found a PHP2Shell attack attempt on October 17, four days before disclosure, on MadPot, its decoy servers (honeypots) built to lure attackers. The attack came from an anonymization network, and Amazon said it does not know how the attacker got the information in advance. On disclosure day, too, several attackers made attempts before the embargo lifted.

After the patch came out, new exploit code appeared within hours and was put to use right away. Amazon said AI has made it cheaper to turn a patch diff or an advisory into exploit code, and that for serious vulnerabilities in internet-facing systems, patch deadlines should be set in hours, not 7 or 30 days. It is the same pattern I described earlier in “OpenCode Console hack: are the API keys you give coding agents safe?”, with attackers keeping AI agents running nonstop.
Still, exploiting it is not easy.
There is a counterargument too. In a post titled “There isn’t an easy exploit for this PHP vulnerability”, developer Elias Taylor argued that most of the thousands of proof-of-concept (PoC) exploits posted on GitHub do not work on an ordinary PHP server. Many only work if the server already has another vulnerability, such as file inclusion (LFI). He pointed out that people are trusting fake exploit code generated by LLMs, and his post also got 609 points and 439 comments on Hacker News. Korea's Ministry of Science and ICT also warned that many of the PoC exploits circulating online are fakes with malware hidden inside.
However, Calif and Wiz did demonstrate remote code execution without login on WordPress, Drupal and Joomla. “Not easy” and “impossible” are two different things.
In Korea, servers left off the management list come first.
The Ministry of Science and ICT and KISA urged an immediate update, noting that website tools widely used in Korea, such as WordPress and Gnuboard, also run on PHP. They said PHP may also be hiding in websites built long ago and left unmaintained, in online stores built by outside contractors, and in device management screens. PHP 8.1 and earlier get no official update, so they must be upgraded to a supported version, and the update only takes effect after the web service is restarted. Bae Kyung-hoon, Deputy Prime Minister and Minister of Science and ICT, said, “The usual vulnerability management cycle of manual checks followed by patching within several days cannot defend against attacks.”
Working on client systems as an FDE, I find this hits home. A newly built service has a deployment pipeline and can ship a fix within a day. But with an event page or admin screen outsourced years ago, often no one even knows who maintains it. As AI gets faster at finding vulnerabilities and writing exploit code, the first thing a company needs is to know where PHP runs inside it, and on which versions.
The gap between finding and fixing will keep growing.
OpenAI said this bug is only one of many serious vulnerabilities it has already found and is fixing, and that similar discoveries will surge over the coming months. It also pledged $1 billion in grants for defenders to use Daybreak. The PHP Foundation points to people. Tools find bugs faster than ever, but deciding how to fix the engine's old design, weighing compatibility and reviewing patches is work for engineers who know the whole PHP codebase, and there are far too few of them.
It seems AI will keep getting faster at finding bugs. What closes that gap, I think, will be people who can fix them and an operations setup that can ship the fixes within hours.