Hackers got a four-day head start on epic PHP2Shell vulnerability

PHP maintainers released software updates on Wednesday to patch two security flaws, and the US National Security Agency warned that any organization running the language should update immediately or take its systems offline. Amazon, the world's largest cloud provider, said it had spotted an attempt to exploit the bug four days before the weakness became public and described the flaws as now being broadly exploited in the wild. The UK's National Cyber Security Centre issued its own warning the same day, saying the vulnerabilities could let an attacker seize control of a website's server without a password or other credentials. Some European governments were reportedly pulling sites offline while they patched.
The vulnerabilities are unusual in how they surfaced. They went undetected for more than a decade and were found with the help of models from OpenAI and Google. Researchers at two US cybersecurity firms, Calif and Wiz, are credited with the discovery. OpenAI said it worked with PHP, Calif and Wiz to verify the flaws and build the patches. Alphabet-owned Wiz estimated that the affected language powers roughly 70 percent of websites worldwide.
PHP is a server-side scripting language that runs on the machine hosting a site rather than in the visitor's browser. Its dominance is largely structural: WordPress, the most widely used site-building platform, is written primarily in PHP and depends on it to function, which spreads the language across a huge share of the web, including many small and lightly maintained sites. The NSA noted that flaws of this kind often lead straight to a server's file system or database, which is why the guidance is unusually blunt: if updating quickly is not possible, the agency recommends taking the system offline until it can be fully mitigated.
The timeline is the part defenders will focus on. A four-day gap between the first observed exploitation attempt and public disclosure means at least some attackers had a head start, though Amazon did not say whether that early probing succeeded or who was behind it. OpenAI framed the episode as a milestone, saying that to its knowledge frontier AI found these vulnerabilities before attackers did, and that the result shows AI can uncover security flaws with internet-scale impact while the same capabilities can help attackers build exploits faster. The White House said federal agencies were assessing the potential effects on government systems and critical infrastructure.
The disclosure lands amid a broader argument about model capability. New releases from Anthropic and OpenAI earlier this year with strong cyber skills drew warnings from politicians and financial regulators and led the US government to temporarily limit their rollout. This incident offers a concrete data point in that debate: automated code analysis can find long-lived bugs that human review missed, but the same tooling lowers the cost of writing attack code. A likely trade-off is speed versus coordination — the faster a flaw is found, the more value there is in a tight disclosure and patching process, since the gap between discovery and exploitation is evidently measured in days, not months.
For operators, the practical question is inventory. Because PHP typically sits behind other software and runs silently on shared hosting and legacy servers, many organizations do not have a reliable list of where it is deployed. Patching therefore becomes an exercise in finding forgotten installations as much as applying the fix. The severity implied by the agencies' advice — offline rather than merely monitored — suggests that systems exposed to the internet without current patches should be treated as compromised until proven otherwise.
Why it matters: anyone running PHP-backed sites, especially WordPress deployments and shared hosting fleets, is directly in scope, and the four-day exploitation head start means patching may not be enough on its own without checking for signs of intrusion. For developers and product teams, the episode is an argument for maintaining an accurate dependency inventory and a fast rollback-capable patch pipeline, and it signals that AI-assisted vulnerability discovery is likely to compress disclosure timelines further — an inference from the reported timeline rather than a stated outcome.
Based on reporting from the original publisher. Visit the source for full context and later updates.
Publisher excerpt
Hackers were already probing the bug before defenders were told it existed.