The NSA said in an advisory on Wednesday that the two critical flaws allow attackers to infiltrate a server's file system or a database used by a web application. Patches have already been issued by the PHP Foundation, and the agency recommends updating web servers to the current version, PHP 8.5.12. Versions 8.1 and older are no longer supported, meaning many sites will have significant updating work to do.
The holes have been tucked away in all versions of PHP since version 5, which was released in 2004. PHP is a server-side programming language widely used for web applications and powers popular content management systems such as WordPress.
The discovery came through artificial intelligence. OpenAI said that security testing company Calif, working within its "Patch the Planet" initiative to find flaws in open-source software, found one of the flaws using GPT-5.6 Sol. Separately, the Wiz team, part of Google, used its Wiz Atlas security AI agent, along with Gemini 4 Argon and GPT-5.6 Sol, to find multiple vulnerabilities in PHP.
Both OpenAI and Wiz followed responsible security research practices, coordinating with the PHP Foundation on patches before publicly disclosing the flaws. Wiz thanked Automattic, Akamai, AWS, Cloudflare, Fastly, Imperva, Microsoft and Vercel for help testing the fixes. WordPress, which runs on PHP, said the flaw is not WordPress specific and that sites using its CMS must patch their servers and work with their hosting companies to ensure protection.
OpenAI says the flaws were found before hackers discovered them, and there have been no reports of exploits in the wild. That is in part because, before AI, the flaws were too hard for hackers to exploit. "With AI this is no longer a barrier. LLMs can help adapt an exploit to different PHP versions, configurations and memory layouts," Wiz warned in its blog post about the flaws.
Now that the issues are public, the race is on for the internet to patch tens of millions of websites before attackers can strike unpatched systems. Hence the NSA's guidance: if a PHP website cannot be patched right away, it is better off taken offline until it can be.
