You updated WordPress last week. Your plugins are current. None of that covers PHP2Shell, because the problem is not in WordPress at all.
Short answer: PHP2Shell is two critical flaws in PHP itself that let attackers run code on your server without logging in. Every WordPress and WooCommerce site on an unpatched PHP build is exposed, however up to date WordPress is. Update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, then restart every PHP worker.
At a glance
- What it is: CVE-2026-109618 and CVE-2026-109619, unauthenticated remote code execution in the PHP runtime.
- Who is affected: Every PHP installation serving web requests below the fixed version on its branch.
- Fixed in: PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, all released on 21 October 2026.
- No official fix: PHP 8.1 and older received no release from the PHP project.
- Being exploited: Yes. CISA added both CVEs to its Known Exploited Vulnerabilities catalog on 26 October 2026.
- Do this first: Check your PHP version in Site Health, update, then restart every PHP worker.
Last reviewed: 8 November 2026 by Ali Shan, founder of WPRobo. We update this post when PHP publishes new fixes.
This guide is the hub of our PHP security series. When you need the detail on one step, these three guides go deeper:
- How to check your PHP version and confirm PHP2Shell is patched: the hands-on verification guide.
- CVE-2026-115560: turning off PHP session upload progress safely: the one setting change, step by step.
- PHP 8.2 reaches end of life on 31 December 2026: a WordPress upgrade plan for the next few weeks.
What is PHP2Shell?
PHP2Shell is the name for two critical flaws in PHP, tracked as CVE-2026-109618 and CVE-2026-109619. Both allow unauthenticated remote code execution (RCE): someone running their own code on your server without a login.
A CVE is a public ID for a known security flaw. It lets vendors, hosts and developers talk about the same bug.
The PHP project gave advance notice on 20 October. On 21 October 2026 it published the PHP security advisory, titled “Critical remote code execution vulnerabilities, update now”.
Attack code runs with the privileges of the PHP web worker. That is the process that reads your wp-config.php, talks to your database and writes to your uploads folder.
Both flaws score 9.2 on CVSS v4.0. CVSS is a 0 to 10 severity scale, and 9.2 sits in the critical band. Early reports of 10.0 came from incorrect pre-release identifiers.
The two bugs in plain English
- CVE-2026-109618, “RCE via OOM corruption”. When PHP runs out of memory, it can be interrupted while internal request data is half set up. The cleanup step may then treat that broken data as valid.
- CVE-2026-109619, “RCE via stale global state”. Internal state from one request can outlive the memory behind it. A later request on the same worker may then use it. This is called a use-after-free.
You do not need to understand memory handling to act on this. The flaw sits in PHP, below every application that runs on it.
Is PHP2Shell being exploited?
Yes. Amazon’s threat intelligence team saw an exploitation attempt on honeypots on 17 October, four days before disclosure. That comes from Tenable’s PHP2Shell FAQ.
Cloudflare and watchTowr observed early attacks on 21 October. Amazon later reported broad exploitation attempts in the wild.
On 26 October, CISA added both CVEs to its Known Exploited Vulnerabilities catalog. US federal agencies had until 29 October to fix them.
Trail of Bits built working exploits against pre-patch PHP 8.2 to 8.5. Their demo shells ran on MediaWiki, Symfony, Laravel and phpBB. WordPress was not among the published demos. That is no comfort, because WordPress runs on the same PHP.
Is my WordPress site affected by PHP2Shell?
If your server runs a PHP version below the fixed release on its branch, yes. No WordPress core release, theme update or wp-admin setting can change the PHP build your server runs.
Every PHP installation serving web requests is affected. That includes PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed.
Two of those terms come up a lot. mod_php runs PHP inside the Apache web server process itself. PHP-FPM runs PHP as a separate pool of worker processes that the web server hands requests to.
Who is most exposed
- Apache with mod_php. The PHP project rates this setup as highest risk. A researcher confirmed successful exploitation of honeypots running PHP 8.4.26 on single-worker Apache mod_php.
- PHP 8.1 and older. The PHP project shipped no release for these branches. It published minimal source backports for 7.4, 8.0 and 8.1 on GitHub. The vulnerable code path goes back to PHP 5.4.0.
- Servers that were updated but never restarted. The old code stays in memory. We cover this in step 3 below.
PHP-FPM is not off the hook. FPM ends the worker when request startup fails, and the advisory reports no complete FPM exploit for 109618. But Rapid7’s analysis describes a confirmed session-lifecycle RCE for 109619 against both mod_php and FPM.
Public proof-of-concept code only works on specific mixes of operating system, PHP version and web server. None of it is broadly reliable yet. We would not plan around that, because attackers only need your combination to work once.
On shared or managed hosting
On many plans you never chose your PHP build, and you cannot patch it yourself. You can confirm your host did, and switch versions if the control panel allows it.
Why are WooCommerce stores at higher risk?
Because code running as the PHP worker can usually read everything WooCommerce stores. On a shop, that is customer data and payment settings, not just blog posts.
- Customer data: names, addresses, email addresses and order history.
- Payment settings: gateway configuration and API keys stored in the database.
- Files: checkout templates and scripts that load on payment pages.
A modified checkout template or an injected script on the payment page can run quietly for weeks. If you take card payments, the stakes are higher than a defaced blog.
What should I do this week? A PHP2Shell checklist
Update PHP to a fixed release, restart every PHP worker, and turn off session upload progress. Do the steps below in order, because each depends on the one before.
1. Check which PHP version serves your site
In wp-admin, open Tools โ Site Health โ Info โ Server. The PHP version listed there is the one serving your site.
The command line can use a different PHP build from the web server. Treat these commands as a hint, not proof:
# Version used by the command line (may differ from the web server)
php -v
# Version and environment as WP-CLI sees it
wp --info
Our guide on how to check your PHP version and confirm PHP2Shell is patched covers every method in detail.
2. Update to a fixed release, or confirm a backport
The fixed versions, all released on 21 October 2026, are:
- PHP 8.5.12
- PHP 8.4.27
- PHP 8.3.36
- PHP 8.2.35
Anything below those on the same branch is affected. For example, 8.3.36 or higher on the 8.3 branch has the fix.
Linux distribution packages are trickier. Distros often backport fixes and keep an older-looking version number. Check the package changelog for the CVE IDs instead:
# Debian / Ubuntu (adjust the package name to your PHP version)
apt changelog php8.2-fpm | grep -E "CVE-2026-10961[89]"
# RHEL / AlmaLinux / Rocky
rpm -q --changelog php-fpm | grep -E "CVE-2026-10961[89]"
If both CVE IDs appear, the package carries the fix. If not, treat the server as unpatched until your host or distro says otherwise.
One note before you update. PHP 8.4.27 and 8.5.12 have a SimpleXML crash regression, tracked as php-src issue #24488. It is unrelated to the security fixes. If your site imports XML feeds or product files, test them after updating rather than staying on a vulnerable build.
3. Restart every PHP worker
This is the step people skip. Installing updated packages does not patch PHP processes that are already running. The old code stays in memory until each process restarts.
# PHP-FPM (use your version's service name)
sudo systemctl restart php8.3-fpm
# Apache, which also reloads mod_php
sudo systemctl restart apache2 # or httpd on RHEL-based systems
Restart every service that serves PHP. That includes extra FPM pools and any other PHP version running side by side.
4. Turn off session upload progress
Set session.upload_progress.enabled to 0. It is a partial mitigation for CVE-2026-109619, and PHP’s interim advice for CVE-2026-115560. The PHP manual page on session upload progress explains what the feature does.
; php.ini
session.upload_progress.enabled = 0
Or in a PHP-FPM pool file:
php_admin_flag[session.upload_progress.enabled] = off
Where you set it matters. It must go in php.ini, the FPM pool or the server config. Using ini_set() in your application, or an FPM .user.ini file, is too late. Restart the workers again afterwards.
WordPress core does not use PHP’s native sessions, and WooCommerce keeps sessions in its own database table. Neither is a reason to skip this. Other code on the server can start sessions, and most WordPress sites lose nothing by turning it off.
5. Plan your way off PHP 8.1 and 8.2
End of life means the PHP project stops shipping security fixes for a branch. PHP 8.1 reached that point on 31 December 2025, which is why it got no PHP2Shell release.
Some distributions and LTS vendors provide backported fixes for 8.1 and older. Unless you can confirm one is installed, moving to a supported branch is the real fix.
If you are on 8.2.35, you have the PHP2Shell fixes. But the PHP supported versions page confirms PHP 8.2 reaches end of life on 31 December 2026. A flaw like PHP2Shell found after that date would get no 8.2 fix. Our PHP 8.2 end-of-life upgrade plan for WordPress walks through testing and moving to 8.3 or 8.4.
What if I cannot update straight away?
Partial mitigations exist, but they only reduce risk. In PHP’s own words: “There are no complete mitigations, updating is the only safe choice.”
- For CVE-2026-109618: set
memory_limit=-1, preferably viaphp_admin_valuein the FPM pool or Apache config. Pair it withpost_max_size = 8Mif you need no uploads, or32Mif you do. Keepupload_max_filesizebelowpost_max_size. - For CVE-2026-109619: set
session.upload_progress.enabled=0, as in step 4. On PHP 8.5, also setfatal_error_backtraces=0. - Afterwards: restart every worker, or none of it takes effect.
Most WordPress sites need media uploads, so 32M is the realistic choice.
Be careful with memory_limit=-1. It removes PHP’s memory ceiling entirely. One runaway import or badly written plugin can then use all the memory on the server. We treat it as a stopgap for hours or days, not a setting to leave in place.
What should I not rely on?
Not WordPress updates, not a firewall on its own, and not an assumption about your host. Each covers a different layer from the one PHP2Shell lives in.
WordPress core updates
They do not touch PHP. Site Health showing current WordPress and plugin versions says nothing about your PHP build being patched.
A firewall on its own
A web application firewall (WAF) filters incoming requests before they reach your site. It may block known exploit patterns, but it cannot fix the memory bugs inside PHP. Attack requests can be reshaped. A firewall buys time; it is not a patch.
“My host probably did it”
Your host may well have patched. But a host can update packages and miss a worker restart. Some hosts also still let you select PHP 8.1, which has no official fix.
If you are unsure, ask your host in writing:
- Does my server have the fixes for CVE-2026-109618 and CVE-2026-109619?
- Was every PHP process restarted after the update?
- Is session upload progress turned off at server level?
What is CVE-2026-115560?
It is a separate, newer PHP flaw in session upload progress, and it has no fix yet. PHP disclosed it on 23 October 2026 and calls it “an unlikely RCE vector”.
The trigger is narrow. An application sets session.serialize_handler to php_binary or php_serialize in configuration. It then switches it to php with ini_set() before session_start(), while upload progress is still on. The PHP session configuration reference documents these settings.
The 21 October releases do not fix it. As of 8 November, PHP says a full advisory will follow with the next regular release. Until then, set session.upload_progress.enabled=0 and restart workers. That is step 4 above, so one setting does double duty.
Our guide to turning off PHP session upload progress safely covers the trigger and the change in more depth.
How we handle this on client sites
We treat PHP as part of the site, not something only the host owns. After an advisory like this, our checks follow the same pattern:
- We check the PHP version the web server reports, not the one SSH shows.
- On distro builds, we search the package changelog for both CVE IDs rather than trusting the version number.
- We restart every PHP-FPM pool and Apache process, then compare process start times with the update time.
- We set
session.upload_progress.enabled=0in php.ini or the pool, then confirm the value the web server reports. - On managed hosting, we ask the host in writing about both CVEs and the restart.
- We test XML imports and product feeds after moving to 8.4.27 or 8.5.12, because of the SimpleXML regression.
- On stores, we review checkout templates and payment pages for changes nobody on the team made.
None of this makes a site untouchable. It closes the known gap and confirms the fix is actually live.
What comes after the patch?
Keep PHP on your regular security checklist. PHP2Shell shows that WordPress security has layers below WordPress itself.
Once the steps above are done, work through our 25-step WordPress security checklist for everything else.
If you run a store, review checkout after any server-level incident. Look for template changes you did not make and unexpected scripts on payment pages. Our WooCommerce payment audit covers that review if you want a second pair of eyes.
If you would rather not read changelogs and restart FPM pools at 11pm, that is what our WordPress care plans are for. Watching advisories, checking PHP versions and planning upgrades should be routine work, not a late-night scramble.
