On October 21, 2026, the PHP project pushed an emergency security release for two memory-safety bugs that allow unauthenticated remote code execution. Both are rated CVSS v4.0 9.2. The flaws live in the PHP engine itself, not in WordPress, which means a vulnerable server is exposed before a single line of your theme or plugin code runs.
The practical version: if your site runs PHP 8.5 before 8.5.12, 8.4 before 8.4.27, 8.3 before 8.3.36, or 8.2 before 8.2.35, you are on a vulnerable build. Update to the fixed release and restart your PHP workers. There is no WordPress core update for this one, and none is planned.
The security community calls it PHP2Shell. Wiz Research, which found and reported the bugs, says every PHP version released in the last decade is affected by at least one of them, going back to PHP 5.4. It demonstrated working pre-authentication exploits against current WordPress, Drupal and Joomla containers. Cloudflare saw attack traffic before the patch was even published.

What PHP2Shell actually is
Two bugs, one root cause: PHP mishandles its own memory when a request dies badly.
CVE-2026-109618, the out-of-memory corruption. An out-of-memory condition can interrupt PHP while internal request data is only partially initialized. The cleanup routine then treats invalid data as valid. An attacker who can force that failure can corrupt the memory of the worker handling the request.
CVE-2026-109619, the stale global state. Request-owned internal state can survive after the memory behind it has been freed. The next request handled by the same worker can use that stale state before normal initialization resets it. That is the one that makes remote code execution practical, because the attacker gets a second request to shape the corrupted state.
The impact is not only code execution. Wiz demonstrated reading a PHP worker’s memory without executing anything, and that memory can contain passwords, session tokens, API keys and certificates belonging to other requests on the same server.
The PHP advisory lists every common way of serving PHP as exposed: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. PHP rates the risk highest for mod_php, where an unauthenticated request can trigger the attack before any application code runs. The flaws are in the interpreter, so the CMS on top does not matter. WordPress, Drupal, Joomla, Magento, Laravel and a plain Hello World script are all in scope.

Are you affected?
Three questions decide it.
1. Which PHP version is your site actually running? Use the table below. “Latest” is not a version. Check the branch and the patch number.
| PHP branch | Vulnerable | Fixed release |
|---|---|---|
| 8.5 | 8.5.0 to 8.5.11 | 8.5.12 |
| 8.4 | 8.4.0 to 8.4.26 | 8.4.27 |
| 8.3 | 8.3.0 to 8.3.35 | 8.3.36 |
| 8.2 | 8.2.0 to 8.2.34 | 8.2.35 |
| 8.1 and older | all releases | no upstream fix, upgrade or use a vendor backport |
2. How is PHP being served? If you are on mod_php, the attack can fire before WordPress boots. PHP-FPM is also exposed, but the request passes through a process manager first. Ask your host if you do not know, because the answer changes how urgent this is.
3. Was the patch applied and were the workers restarted? This is the step people miss. Replacing the PHP binary on disk does nothing for workers that are already running. A patched server can keep serving vulnerable processes until PHP-FPM, Apache or LiteSpeed is restarted and the opcode cache is cleared.

How to check your PHP version in 60 seconds
Inside WordPress, go to Tools > Site Health > Info and open the Server section. It prints the exact PHP version the application is using, which is the one that matters.
If you have SSH or WP-CLI, the terminal is faster and harder to fake.
The fix, depending on how your site is hosted
There is no plugin that fixes this. The patch has to land at the server level, and the right path depends on who controls PHP.
Managed WordPress hosting
Most managed hosts were given the patches in advance and rolled them out automatically. “Most” is doing a lot of work in that sentence. Verify the version yourself, then open live chat and ask two specific questions: which PHP build is this site on, and were the PHP workers restarted after the patch. If the answer does not match what Site Health shows, send them the version string and ask them to reconcile it.
Kinsta, the host this site runs on, is a useful example of what that looks like when it goes right. It emailed customers on October 22 with a dated, network-wide patch confirmation for PHP2Shell, said its edge WAF and Patchstack rules were already blocking exploit attempts while it waited for the PHP release, and said it has seen no evidence of any breaches.
Four questions to ask your host this week
- Which exact PHP build is my site on, and when was it patched?
- Were the PHP workers restarted after the patch?
- What blocked exploit attempts between disclosure and the patch?
- If the site is compromised, how fast can you restore a clean backup?
If your host cannot answer those with dates, that is your answer. Kinsta handles PHP version management for you, keeps automatic daily backups with one-click restore, and backs it with top tier support. Its 24/7 live chat is staffed by WordPress engineers who will work the actual problem with you, so you are not stuck waiting on your developer to reply. Plans start at $35 per month.
Not sure Kinsta fits? Compare the top WordPress hosting options first
cPanel or shared hosting
Look for MultiPHP Manager or Select PHP Version in the panel. Pick the fixed release for your branch: 8.3.36, 8.4.27, 8.5.12 or 8.2.35. If the fixed build is not in the list yet, open a ticket and ask for the rollout date. Do not jump to a new minor branch on a production site without a staging check, because extensions and older plugins can break across branches.
Self-managed servers
Use your distribution packages first, since most distros and LTS vendors received the patches in advance. If you build from source, compile the fixed release and restart PHP-FPM along with the web server. If you use the volunteer-maintained remirepo.net repository, PHP says it will not have updates on day one and urges you to switch to distribution packages or build from source.
PHP 8.1 and older
These branches no longer receive security releases from the PHP project. Some distributions and LTS vendors provide backported fixes, and PHP published minimal source backports for 7.4, 8.0 and 8.1. If neither option is available to you, the honest answer is that the server cannot be made safe. The UK National Cyber Security Centre says organisations should consider taking the system offline until it can be fully mitigated, and that advice is echoed by several national agencies.
If you cannot patch today
PHP published temporary mitigations, and the wording matters: they reduce exposure to specific attack paths, they do not make an installation safe. Use them to buy hours, not weeks.
- For CVE-2026-109618: set
memory_limit=-1in a place the application cannot override, such asphp_admin_valuein the FPM pool or Apache config. Then confirm no pool, directory or application setting puts a finite limit back. - Cap request size: set
post_max_size = 8Mif the site does not need uploads, or 32M if it does, and keepupload_max_filesizebelow it. Enforce decoded request size, field count, multipart part count and header count at the proxy as well. - For CVE-2026-109619: set
session.upload_progress.enabled=0and restart every worker. Do it in php.ini, an FPM pool or server config that applies before request parsing.ini_set()and.user.iniare too late. - Use container or cgroup limits as an availability boundary, preferably one that kills only the affected worker. Do not substitute
RLIMIT_ASorRLIMIT_DATA, because those can cause the vulnerable allocation failure. - Put a WAF in front. Cloudflare shipped rules for known exploit vectors to all plans, including free, and describes them as a stopgap. The rules only help if your origin accepts traffic exclusively from Cloudflare.
How to tell if you were already hit
There is no clean signature, and absence of evidence is not evidence here. Patchstack reported active exploitation incidents from hosting partners before the patch was public, and said its telemetry showed widespread probing within minutes of the release. Assume the window between the October 20 leak and your patch was a live window.
Look for PHP fatal errors about memory exhaustion followed by unusual successful requests, spikes in 500s or worker restarts, new administrator accounts, unknown scheduled events, modified core files, unexpected outbound connections and processes you cannot account for. Our breakdown of the Ninja Forms and WooCommerce XSS campaign shows the kind of persistence an attacker leaves behind, including a hidden admin and a secret login URL.
Because this flaw can expose memory from other requests, a server that was unpatched and reachable should be treated as a credential exposure even if you find no shell. Rotate WordPress salts, the database password, API keys, SMTP and payment credentials, and SSH or SFTP keys. If you find tampering, do not clean by hand and hope. Restore from a clean backup taken before October 20, patch PHP, then put the site back online.
Why this one is different
The bugs are old. Wiz says the underlying flaws had been present for decades, and that building a working exploit required an exceptionally complex chain at the edge of what human researchers could practically do. Frontier AI models collapsed that barrier, letting the team adapt exploits across multiple applications in hours instead of weeks. OpenAI and Calif are credited alongside Wiz for the discovery, disclosure and patch verification work.
That is the part site owners should sit with. The gap between “a bug exists” and “a working exploit is in the wild” just got shorter, and it will not get longer again. A patch window that felt acceptable in 2024 is now a liability.
The response is boring and effective: know your exact PHP version, let your host apply security releases automatically, verify that workers restarted, keep a web application firewall in front of the origin, and keep tested backups. If you have been putting off a PHP branch upgrade, the Events Calendar 9.8 RCE from September was the warning shot. This is the reason to finish the job.
PHP2Shell FAQ
No. The vulnerabilities are in the PHP interpreter, not in WordPress core. WordPress published a notice on October 21 saying no WordPress update is required or planned. The fix is a PHP update on the server, followed by a restart of PHP workers.
Yes. Restart PHP-FPM, Apache or LiteSpeed and clear the opcode cache. Running workers keep the old, vulnerable code in memory even after the binary on disk is replaced. Confirm the new version in Tools > Site Health > Info > Server after the restart.
No. A plugin can add firewall rules or virtual patching, which may block known exploit attempts, but it cannot change the PHP engine. Only a patched PHP release removes the flaw. Treat plugin protection as a stopgap while you schedule the update.
Verify it. Open Tools > Site Health > Info > Server and compare the version to the fixed releases: 8.5.12, 8.4.27, 8.3.36 or 8.2.35. If it shows an older build, send the exact version string to your host and ask when the patch and worker restart will land.
The PHP project no longer ships security fixes for those branches. Some distributions and LTS vendors provide backports, and PHP published minimal source backports for 7.4, 8.0 and 8.1. If you cannot get a fixed build, the NCSC advises considering taking the system offline until it can be mitigated.
Assume you were exposed, then prove you were not
A server-level flaw like this one can hand over worker memory full of credentials. If your site was on a vulnerable PHP build and reachable this week, work through the full compromise checklist instead of checking for one obvious symptom. Our security fix guide walks through the files, users, database and logs to inspect, and what to do when you find something.
Final thoughts
PHP2Shell is not a WordPress plugin bug that will blow over when the developer ships 6.0.1. It is a flaw in the floor everything is standing on, it has been there for years, and the exploit is now public. The fix is a version number and a restart, and the check takes less time than reading this post.
Go to Site Health, look at the PHP version, and if it does not say 8.5.12, 8.4.27, 8.3.36 or 8.2.35, open a ticket with your host before you do anything else today.
Disclosure: this post contains affiliate links. If you buy through them, we may earn a commission at no extra cost to you.


