PHP2Shell: two critical PHP flaws and what to do now
PHP2Shell exposes critical flaws in PHP itself. Here's why security agencies are sounding the alarm, which versions are patched, and what site owners should do.

A vulnerability in a WordPress plugin affects websites using that plugin. A vulnerability in PHP itself puts an enormous part of the web under scrutiny.
On October 21, 2026, the PHP team released emergency patches for PHP2Shell, the name given to two critical flaws: CVE-2026-109618 and CVE-2026-109619. Both carry a 9.2/10 severity score and can allow an attacker to execute code on a vulnerable server without logging in.
The warnings are unusually blunt. The U.S. National Security Agency (NSA) has urged organizations to update, or take affected systems offline if they cannot be secured promptly. European authorities have issued similarly urgent guidance.
What makes PHP2Shell so serious?
The problem is not a badly written website, an outdated WordPress plugin, or a weak password. It sits inside the PHP runtime that processes requests for websites and applications built on PHP.
Researchers at Wiz demonstrated unauthenticated code execution against test deployments of WordPress, Drupal, and Joomla. They also demonstrated access to sensitive data in PHP process memory, including credentials and API keys.
In simple terms, a vulnerable server may be exposed even if the application running on it has no known security flaw.
The two vulnerabilities involve errors in how PHP handles memory when requests fail:
- CVE-2026-109618: An out-of-memory failure can leave internal request data in a corrupted state, opening a path to remote code execution.
- CVE-2026-109619: PHP can retain references to memory that has already been freed, allowing later requests to misuse that stale state.
Researchers say versions dating back to PHP 5.4 are affected by at least one of the issues. That does not mean every PHP website has been compromised, but it makes identifying unpatched installations a priority.
Why the NSA and security agencies are raising the alarm
On October 21, the NSA issued a public advisory urging organizations using PHP to prepare for immediate updates. Its guidance went further: where systems could not be promptly secured, organizations should consider taking them offline.
CERT-EU separately advised isolating internet-facing PHP applications when immediate patching was not possible. Government websites were temporarily taken offline as a precaution.
The concern is straightforward: once attackers have working techniques for vulnerabilities in such widely deployed software, exposed servers can become targets at scale.
The AI angle is the bigger warning
PHP2Shell is also a glimpse of what AI could change about cybersecurity.
According to Wiz, these weaknesses existed for more than a decade, but developing reliable exploits required unusually difficult memory analysis and repeated testing. Its researchers used frontier AI models to help discover, develop, adapt, and verify the attack paths.
That is good news for defenders who can find dangerous bugs sooner. But the same capability can reduce the time and specialized expertise attackers need to adapt exploits to different systems.
The troubling shift is not that AI invents vulnerabilities. It’s that AI can make previously impractical vulnerabilities practical to exploit.
What website owners should do now
The fix is already available. PHP’s October 21 security advisory identifies these patched releases:
| PHP branch | Patched version |
|---|---|
| 8.5 | 8.5.12 |
| 8.4 | 8.4.27 |
| 8.3 | 8.3.36 |
| 8.2 | 8.2.35 |
If you operate or manage PHP-based systems:
- Find every PHP runtime. Check production sites, staging servers, containers, and bundled PHP installations—not just the version shown in your terminal.
- Apply the security update now. Use the releases above or security-fixed packages supplied by your Linux distribution or hosting vendor. Verify that the web-serving processes actually restarted with the patched runtime.
- Treat older versions separately. PHP 8.1 and earlier no longer receive regular updates from the PHP project. Check whether your vendor provides a verified backport, or migrate to a supported version.
- If you cannot patch immediately, restrict exposure. Put affected services behind access controls or isolate them until they can be updated. Monitor for unusual PHP worker failures and suspicious requests.
The takeaway
PHP2Shell is an urgent reminder that a secure application can still depend on vulnerable infrastructure.
For businesses, the priority is not panic. It is knowing what software is running, who is responsible for updating it, and how quickly a critical fix can reach production.
As AI accelerates both vulnerability research and exploitation, that response time is becoming part of the security boundary.
Sources
- PHPSecurity advisory: Critical remote code execution vulnerabilities, update now
- NSANSA Advisory: PHP Updates
- CERT-EUSecurity Advisory 2026-018: Critical Vulnerabilities in PHP
- Wiz ResearchPHP2Shell: AI uncovers critical RCE vulnerabilities affecting 70% of the Internet
- CloudflareCloudflare deploys protections against php2shell vulnerability
- ReutersGovernment websites go dark as software flaw sparks security scramble



