Technology
Oct 22nd, 2026

PHP2Shell: AI-Found Bug Forces Governments to Pull Websites Offline

Written By | Torch Media Africa
A flaw hiding in the software behind roughly 70% of the web was cracked open by artificial intelligence, triggering emergency patches, shuttered government sites and a global scramble to update
A flaw hiding in the software behind roughly 70% of the web was cracked open by artificial intelligence, triggering emergency patches, shuttered government sites and a global scramble to update


LONDON 

The internet's quiet workhorse just threw a very loud tantrum. On Wednesday, government websites across Europe and beyond went dark, cybersecurity agencies on four continents issued urgent warnings, and millions of site owners were told to stop what they were doing and update their software. The culprit is a pair of critical flaws in PHP, the programming language that quietly powers an estimated 70 percent of all websites. Researchers have nicknamed the bugs "PHP2Shell," and the most startling part of the story is who, or rather what, helped find them: artificial intelligence.

Governments in the Netherlands and Finland took sites offline as a precaution, and the Dutch cybersecurity agency itself briefly went dark, according to reporting from CNBC and Global News. Australia and France were reported to have pulled some services as well. Cloudflare, the web infrastructure giant, rushed out emergency firewall rules and warned that it was already "seeing early attacks emerging." The US National Security Agency told organisations that if they could not update immediately, they should consider taking systems offline altogether. It is, by the account of the people who found it, one of the most consequential software vulnerabilities in years.

AI discovers critical bug that could put 70% of world's websites at risk:  What we know about PHP2Shell

What exactly is PHP2Shell?

PHP is not a glamorous household name, but you have almost certainly used it today. It runs behind WordPress, Drupal, Joomla and Magento, the platforms that host everything from local bakeries to major news outlets and online shops. Security firm Huntress put it plainly: PHP "quietly powers" those sites. Wiz, the cloud security company now part of Google, estimates PHP runs roughly 70 percent of websites.

The two flaws are tracked as CVE-2026-109618 and CVE-2026-109619, and both carry a severity score of 9.2 out of 10 on the CVSS v4 scale, firmly in "critical" territory. Both are memory-safety bugs buried deep in the PHP engine itself, not in some obscure plugin. According to technical write-ups, one involves how PHP handles out-of-memory errors, the other how it handles fatal errors. In both cases, the way the engine jumps out of a failing operation can leave memory in a dangerous state: uninitialised in one case, pointing to already-freed memory in the other. A clever attacker can exploit that mess to run their own code on the server.

The scariest part is the word "unauthenticated." The US Cybersecurity and Infrastructure Security Agency (CISA) said the flaws allow unauthenticated remote code execution. Translation for non-techies: an attacker does not need a password, an account, or any special access. They just need to send the right request to a vulnerable server. The PHP Foundation says the risk is highest for servers running Apache with mod_php, where a request can trigger the flaw before any of the website's own code even starts to run.

Researchers say the problem reaches back a very long way. Wiz, Calif and Cloudflare put the affected range at PHP 5.4 and later, which means nearly every PHP version in the wild is potentially vulnerable. Palo Alto Networks, according to TechTarget, identified more than 22.6 million potentially exposed instances.

The AI detective story

Here is where the story takes a turn that security professionals have long predicted and also dreaded. The bugs were found with help from frontier AI models.
OpenAI says its GPT-5.6 Sol model helped researchers detect the underlying flaws. According to The Next Web, a security research firm called Calif found the first bug in August while auditing PHP's source code, an audit funded through OpenAI's "Patch the Planet" initiative. Calif said it used only generally available models and no special tooling. Separately, Wiz said it independently found the flaws weeks later using its own Wiz Atlas tool, Google's Gemini 4 Argon model and GPT-5.6 Sol. PHP's official advisory credits Calif, Wiz and OpenAI. Reporting suggests credit for the discovery is somewhat contested, but the key point stands: more than one team, working with AI, reached the same buried problem.

OpenAI did not hold back on the significance. The company said it considers the bug "one of the most impactful vulnerabilities in recent memory" and that the episode "marks a new phase" for AI finding security holes. It also stressed a line that will be repeated in security circles for months: "To our knowledge, frontier AI was able to find this vulnerability ahead of attackers." Notice the careful phrasing, though. "To our knowledge" does not rule out the possibility that someone with bad intentions got there first.

Calif offered a more sober take, saying that knowing PHP's history mattered more than the model itself. In other words, AI is a powerful assistant, but human expertise still points it in the right direction.

OpenAI also said it had committed $1 billion in subsidised access to its Daybreak cyber programme for under-resourced defenders, a signal that the company sees AI-assisted defence as a race the good guys need to win quickly.

Two months of secret work, then a leak

Behind the scenes, this was not a sudden discovery. OpenAI says a coalition of maintainers, researchers, security providers and governments spent roughly two months preparing fixes and protections before going public. The fix was no simple patch: reports describe it as requiring a significant change to the PHP engine, which is a delicate operation when millions of sites depend on it behaving exactly as expected.

The plan was an orderly, coordinated disclosure. Reality had other ideas. According to The Next Web, around 15:00 UTC on 20 October, the two CVE identifiers began circulating on forums and social media, listing an incorrect release time and an inflated severity of 10.0. No technical details had leaked yet, but the cat was out of the bag. The PHP Foundation scrambled, moving its announcement and release forward by a day, from 22 to 21 October, even though some distributors were still packaging the fix.

Then came a second slip. Later that evening, Calif mistakenly published a video of its proof-of-concept working against real targets. It was deleted, but copies spread and, by the report's account, sped up the arrival of public exploit code the next day. Security firm watchTowr confirmed the bugs were real before any patch existed. And the PHP Foundation also criticised Chainguard for publishing built software images containing the fix more than six hours before the official release, saying this "disregarded weeks of work by many parties toward a coordinated disclosure" and let attackers study the fix in binary form.

The PHP team reported no working exploit by the time of release, but with proof-of-concept material floating around, the clock was ticking loudly. Cloudflare switched on protective firewall rules for all customers, including free-tier users, at 03:02 UTC on Wednesday, about nine hours before disclosure. Its chief technology officer, Dane Knecht, was blunt: "This is a STOPGAP only. Patch as soon as PHP releases the update."

A flaw PHP knew about in 2024

Perhaps the most uncomfortable twist is that part of this problem was not entirely new to PHP's maintainers. A separate report from The Next Web says a core PHP developer spotted one of the two memory-handling bugs back in 2024 while fixing a different issue from PHP's first external security audit. Someone theorised a possible exploit, but nobody found a concrete attack path, and other priorities took over.

The security team then drafted several competing fixes, each with a catch. One broke backward compatibility. Another added a risk of denial-of-service attacks. A third would have required changes to thousands of third-party extensions. The small team works by consensus and feared choosing wrongly, so work stalled and restarted for months. The PHP Foundation itself called the delay "a structural failure" caused by its decision-making process and lack of resources.

That admission lands hard. PHP sits underneath a huge slice of the modern internet, yet it is maintained by a small, stretched team. It is a familiar pattern in open-source software: critical infrastructure built on volunteer time and thin budgets, until an AI-powered spotlight makes the gaps impossible to ignore.

The patch and how to get it

Emergency patched releases landed on Wednesday, 21 October. According to The Next Web, the fixed versions are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, with backported fixes for the unsupported 7.4, 8.0 and 8.1 branches. TechTarget notes that upstream support for PHP 8.1 and older has ended, so those users get only minimal source backports and should work with their Linux distribution vendors or plan an upgrade. The PHP team called updating "the only safe choice."

Guidance from security teams is consistent. Inventory every PHP system, including forgotten legacy ones. Apply the official patches promptly. If you cannot patch right away, put temporary web server protections in place or take high-risk internet-facing systems offline. And crucially, preserve server logs from 20 October onward and check for backdoors or odd activity before you patch or rebuild, because patching does not evict an attacker who is already inside. There are no vendor-published indicators of compromise yet, so a clean scan does not guarantee a clean server.

WordPress security firm Wordfence added a warning that matters to millions of small site owners: automatic WordPress updates will not apply this fix, because the problem lives in the server's PHP installation rather than in WordPress itself. Site owners should find out who is responsible for updating PHP on their hosting, and ask them directly.

Expert perspective

"Start from the assumption that you're exposed," advised Moshe Siman Tov Bustan of Ox Security, adding that if exploitation is found, organisations should assume they have been compromised. His firm's verdict on the scale: "This is about as broad as a critical vulnerability gets." Japan's Prime Minister Sanae Takaichi, in an unusual public intervention, made an "urgent request for everyone to take action tonight."

Some caution is warranted. Several details remain unverified. A viral claim that around 1.5 million servers remain unpatched has not been corroborated, and not every deployment is equally exploitable. The Global News report noted early reports of hackers already exploiting the flaws, while the PHP team said it had seen no working exploit at the time of release. When facts conflict, the sensible reading is simply that the danger is real and the window is short.

What this means for you

If you run a website, the message is simple: check your hosting provider today. Managed WordPress hosts and large platforms are generally racing to patch behind the scenes, and many will handle it for you, but do not assume. Ask. If you self-host, update PHP now, check your logs, and treat any strange behaviour since 20 October as suspicious.

If you are a regular internet user, you may notice some sites flicker offline or display maintenance notices over the coming days. That is a feature, not a bug: it is administrators choosing a few hours of downtime over a possible breach. Be wary of sites that look odd, and expect a fresh wave of phishing emails that cite the PHP scare to trick you into clicking links. Use strong, unique passwords and turn on two-factor authentication anywhere you can, because the real risk to individuals is stolen data from compromised sites.

The bigger picture: defenders versus attackers in the AI era

PHP2Shell is a turning point mostly because of how it was found. For years, experts have debated whether AI would help attackers or defenders more. This episode offers an early, uncomfortable answer: both, and fast. The same tools that let a small research team dig up a long-buried class of bug in a sprawling codebase are available to anyone with an internet connection. OpenAI calls the gap between defenders finding a flaw and attackers weaponising it the "Defender's Window." This time, defenders say they got through that window first. The leaks and the proof-of-concept video show how narrow it was.

The lesson for the software industry is stark. If AI can find critical bugs this quickly, then slow, consensus-driven patching, under-resourced maintainers and unsupported legacy versions become glaring liabilities. Expect more of these stories, and expect governments to take a harder look at who funds the open-source code the modern economy runs on.

Conclusion

For now, the job is practical, not philosophical. Patches exist. Protections are in place. The websites that went dark this week will, in most cases, be back soon, a bit safer than before. But the PHP2Shell saga has delivered a message that will outlast this week's emergency: the age of AI-found vulnerabilities has arrived, it is moving faster than our habits, and the most important security update may be the one we make to how we maintain the internet itself. Check your PHP. Check your logs. And keep an eye out, because this will not be the last time artificial intelligence knocks on the internet's back door before the attackers do.

Published By | Tech Wiz

More Related News