In July 2004, security researcher Stefan Esser sent a warning.
A critical flaw in PHP, the programming language that powers 70% of the world’s websites, could allow an attacker to do some seriously nefarious stuff: read passwords, steal databases or even take over entire websites.
But Esser’s warning went mostly ignored for decades. In 2020, another researcher discovered a related problem, and the PHP overseers issued a partial fix. A similar PHP vulnerability was uncovered in 2024 – but was left unfixed.
Why was one of the most severe threats to the foundation of the internet left unresolved for 22 years?
Because it would have taken mind-numbing work for a human to figure out how to take advantage of it: tedious, time-consuming, monotonous coding. That rendered the PHP vulnerability impractical to exploit.
AI just figured out how to do it in two days.
On Wednesday, OpenAI’s public revelation of the exploit was announced in conjunction with a security update to fix the problem.
Why AI agents keep breaking loose
Phew, you might think. The good guys got to it first. But the AI-assisted discovery deeply concerned cybersecurity researchers, because the next one might come from someone who wants to weaponize it.
And AI doesn’t care who’s pulling the trigger.
Security by exhaustion
The internet is held together with shoestring and bubblegum.
An apt xkcd cartoon visualizes “all modern digital infrastructure” as a giant Jenga tower supported by one, thin, vertical block with the label: “a project some random person in Nebraska has been thanklessly maintaining since 2003.”
On July 30, researchers at AI security company Calif, in conjunction with OpenAI’s new Patch the Planet security initiative, decided to point a large-language AI model at one of those Jenga blocks – PHP – and see what came of it. It didn’t expect to find anything critical.
On August 1, it found a method to attack PHP’s vulnerabilities. Days later, it found another. Then another. Later that month, Google-backed security company Wiz – another Patch the Planet participant – discovered new exploits for PHP vulnerabilities, too.
The patch went out Wednesday, and the companies publicly disclosed their findings. Wiz called it one of the most severe vulnerabilities in software history.
The security community lit up social media with I-told-you-sos.
“The security industry has long been warning about the coming security apocalypse, because AI can do these things very, very quickly – better than humans,” said Vyas Sekar, professor of computer engineering at Carnegie Mellon University. “This may be the first of many. This is a wakeup call.”
Sekar says there are more PHP-like vulnerabilities out there to discover and exploit. A lot more. Some are known, and many are unknown.
The wide availability of AI tools has significantly lowered the barrier to entry for hackers to take advantage of potential security vulnerabilities. That fact freaked out Anthropic enough that the AI company paused deployment of its Mythos model in June, as it was so good at exposing security vulnerabilities and finding vectors for attack that the US government labeled it a national security threat.
But Calif researcher Ryan Austin noted in a blog post that the company didn’t use any special AI models that weren’t generally available to the public.
That democratization of AI tools made clear that “security by exhaustion” is no longer a viable safeguard against bad guys, said Nick Rogers, CEO of Fieldwork AI.
For 22 years, PHP was like a bank with no security guards. Anyone could walk down to the vault and make off with the cash – if they had the time to try every code. It was such arduous work, it wasn’t worth anyone’s time.
But AI doesn’t get tired. And it can crack safes way faster than humans.
“Taking a theoretical (vulnerability) and proving you can exploit it is quite tedious and mechanical work,” said Rogers. “AI can keep churning until it figures it out. You don’t even need to try. You can drink coffee while it does it.”
The vulnerability
Effectively, PHP is an engine that powers most of the internet. Until it was patched Wednesday, it had a fatal flaw.
A vulnerability left open a patch for an attacker to mess around with the way PHP processes requests to run websites. If a server crashed because it ran out of memory, it would leave stale data behind that could be exploited to leak the data or execute bad code.
Think of the exploit like taking advantage of a busy restaurant kitchen. Customers could overwhelm the chef with too many complex orders – so much that she quits midway through dinner, leaving dirty pans, raw ingredients and recipes strewn about the counter. Then, when a new chef is hired, he serves the contaminated food on filthy dishes – and even sends some recipes to customers along with their dinner orders.
Although the vulnerability was long known to be theoretically exploitable, figuring out how to do it proved exceedingly difficult. Hackers had to force the server into an out-of-memory crash at a specific instant to bypass PHP’s safety limits.
When researchers pointed AI at the problem, it quickly found a couple ways around that. One solution exploits a mismatch between the way PHP measures compressed files and decoded files. Effectively, it allowed compressed files through its gates, letting the file unpack itself and take over from the inside.
Another attacks PHP with deeply nested file structures that overwhelmed PHP’s directory structure, triggering the memory failure.
The vulnerability was patched, but the threat may not be over, noted Adam Meyers, vice president of counter adversary at security company CrowdStrike. Many outdated versions of PHP are still in use, and the patch almost certainly didn’t fix all of PHP’s problems.
Also, an apparent leak about the vulnerability before the patch was released resulted in thousands of exploits in the hours ahead of the announcement, according to security company Cloudflare.
“Bad guys don’t need to find the vulnerability first – they can weaponize it after the fact,” Meyers said. “We are still waiting to see how much of this shows up in the wild.”
What’s next?
OpenAI offered several suggestions in its disclosure about the PHP patch, all of which basically boil down to: Write better, more secure code from the start.
That’s not super helpful if your web application has been written using PHP.
“Migrating away from PHP is a pretty expensive process,” noted Meyers. “It’s not like switching from Microsoft mail to Google mail; you need to rebuild the whole application.”
If the solution isn’t to migrate 70% of the web to a new programming language, then fixing its underlying problems – and all the other software problems in the world – would hardly be an easy fix, either.
What’s needed, then, may be a paradigm shift in the way the security community operates. Effectively, assume everything poses a security risk.
Companies need to treat every single business operation like air traffic controllers treat their surroundings, said Madhu Shashanka, cofounder of security company Concentric AI.
“Everything is a potential vulnerability,” Shashanka said. “Every business operation is a high-stakes operation.”
For example, companies that leave certain software unpatched – even for a few days – are exposing themselves to vulnerabilities that are no longer too difficult or expensive for bad actors to exploit.
“Lots of vulnerabilities are out there that are never exploited because it takes effort,” said Shashanka. “AI has rendered that effort meaningless.”
CNN













