PHP2Shell and WordPress: are you affected, and how do you fix it?
Two critical bugs in PHP itself put almost every WordPress site on an affected runtime until the host patches it. Here’s what happened in plain English, a checker that tells you whether you’re affected, and step-by-step fixes for every kind of hosting.
By the Presscomet teamPublished 16 min read
On this page
What happened, in plain English
Your WordPress site is a pile of PHP files. Something has to read those files and run them every time a visitor loads a page: that something is the PHP runtime, a program your hosting company installs on the server. PHP2Shell is a pair of bugs in that program, not in WordPress.
A useful way to picture it: WordPress, your theme and your plugins are the furniture in your flat. PHP is the building’s front door. You can fit the best locks money can buy to your own door (security plugins, strong passwords, two-factor login) and it won’t matter if the front door of the building can be opened by anyone who knows the trick. Fixing the front door is the landlord’s job, which on most WordPress sites means your host.
The two bugs have similar shapes. Both are about PHP losing track of its own memory while it handles a web request:
- CVE-2026-109618 happens when PHP runs out of memory at exactly the wrong moment while it is still setting up a request. The clean-up code then trusts data that was never finished, and an attacker who shapes that data carefully can turn it into code execution.
- CVE-2026-109619 is a “stale state” bug: a piece of internal state outlives the memory it points to, so the next request handled by the same PHP worker can read or reuse leftovers. Besides code execution, researchers showed it could leak chunks of the server’s memory — which can contain passwords, session tokens and API keys.
Several of the demonstrated attack paths go through PHP’s file-upload handling (the “session upload progress” feature), which runs while PHP is still reading the request, before WordPress has loaded a single line. That is why WordPress updates and security plugins can’t fix this one.
- CVE IDs
- CVE-2026-109618 · CVE-2026-109619
- Severity
- Critical · CVSS v4.0 9.2
- Login needed?
- No (unauthenticated)
- Fixed in
- 8.5.12 · 8.4.27 · 8.3.36 · 8.2.35
- Released
- 21 October 2026
- CISA KEV
- Not listed (as of 23 Oct)
Why “high complexity” doesn’t mean “safe”
Timeline
The disclosure didn’t go to plan. Details leaked a day before the coordinated release, and attack attempts started even earlier.
Aug 2026
Bugs reported to PHP
Researchers from Wiz, Calif (working with OpenAI) and Quarkslab report the issues. The PHP security team receives the reports from 11 August and starts a coordinated fix with Linux distributions.17 Oct 2026
First attempt seen
Amazon’s threat intelligence team records an exploitation attempt against its sensors while the bugs are still under embargo.20 Oct 2026
Details leak; PHP announces an emergency release
Information spreads publicly ahead of the planned disclosure. PHP pre-announces a critical security release for 14:00 UTC the next day.21 Oct 2026
Fixes released
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 ship, plus source-only backports for 7.4, 8.0 and 8.1. Distributions (Debian, Ubuntu, Red Hat and others) and control panels (cPanel, Plesk, DirectAdmin) publish patched packages over the following hours.21–22 Oct 2026
Mass scanning
Cloudflare reports attempts climbing from thousands to millions after the announcement. Managed WordPress hosts roll out firewall rules and patched PHP.23 Oct 2026
Where things stand
No successful compromise has been publicly confirmed, and neither CVE is in CISA’s Known Exploited Vulnerabilities catalog. Unpatched servers remain the target.
Am I affected?
If your WordPress site runs on PHP that answers web requests — which is every self-hosted WordPress site — it was on an affected runtime until your host or you updated PHP. Every common setup is in scope: PHP-FPM, Apache mod_php, php-cgi, LiteSpeed and FrankenPHP. The PHP project rates Apache mod_php as the riskiest, because the demonstrated attack there needs nothing from your site at all.
Answer three questions and the checker will tell you where you stand. It runs entirely in your browser.
Interactive checker
Am I affected by PHP2Shell?
Runs in your browser · nothing is sent
- 1. PHP version
- 2. Server API
- 3. Hosting
- 4. Verdict
Fixed versions at a glance
| PHP branch | Vulnerable | Fixed |
|---|---|---|
| 8.5 | below 8.5.12 | 8.5.12 |
| 8.4 | below 8.4.27 | 8.4.27 |
| 8.3 | below 8.3.36 | 8.3.36 |
| 8.2 | below 8.2.35 | 8.2.35 (end of life 31 Dec 2026) |
| 8.1 · 8.0 · 7.4 | all | Only via a patched build from your host or distro (source backports exist) |
| 7.3 and older | all (believed back to 5.4) | No upstream fix — upgrade PHP |
A low version number isn’t always bad news
8.3.6 (build 8.3.6-0ubuntu0.24.04.13), and Plesk’s fixed 7.4/8.0/8.1 builds keep their numbers but carry an October 21 build date. On a host that does this, the only reliable answer is the host’s own confirmation.How to check your PHP version
Pick whichever is easiest. The first one works on every WordPress site, and it shows the PHP that actually serves your pages — which is the one that matters.
- Log in to wp-admin and open Tools › Site Health ①.
- Click the Info tab ②.
- Expand the Server panel and read PHP version ③.
- Note PHP SAPI ④ too: “apache2handler” means mod_php; “fpm-fcgi” means PHP-FPM; “litespeed” means LiteSpeed.
Site Health
Server ▴
| Server architecture | Linux 6.8.0 x86_64 |
| Web server | nginx/1.26.2 |
| PHP version | 8.3.14 (Supports 64bit values) |
| PHP SAPI | fpm-fcgi |
| PHP max input variables | 1000 |
| PHP time limit | 30 |
| PHP memory limit | 256M |
Other panels: WordPress, Directories and Sizes, Drop-ins, Active Plugins, Database…
- Log in to cPanel and open MultiPHP Manager ① (on CloudLinux hosts it may be called Select PHP Version).
- The PHP Version column ② shows the branch each domain uses, such as
ea-php81for PHP 8.1. - That shows the branch, not the patch level. Check Site Health for the exact number, and ask the host whether the server’s EasyApache packages are updated.
MultiPHP Manager
Set the PHP version for each domain. Versions marked “EOL” no longer receive upstream security updates.
| Domain | PHP Version | PHP-FPM |
|---|---|---|
| yoursite.com | PHP 8.1 (ea-php81) EOL | On |
| shop.yoursite.com | PHP 8.3 (ea-php83) | On |
Managed WordPress hosts each have their own dashboard, but the setting is usually under the site’s Tools or Settings page ①, labelled “PHP version” or “PHP engine” ②. Many hosts also let you restart PHP there ③.
yoursite.com · Tools
PHP engine
Current: PHP 8.3.36
Modify ▾Restart PHP
Reloads all PHP workers for this site.
RestartSecurity notice: PHP has been updated for CVE-2026-109618 and CVE-2026-109619.
Most managed hosts patched PHP for you within a day of the release. Don’t assume; ask. The what to ask your host guide has a copy-paste email.
On your own server, php -v shows the command-line PHP, which is not necessarily the one serving your site. Check the web-facing package too:
# Debian / Ubuntu: installed PHP packages and their exact builds$ dpkg -l | grep -E 'php[0-9.]+-(fpm|cgi)|libapache2-mod-php'# RHEL / AlmaLinux / Rocky$ rpm -q php php-fpm# Version and build date of a running FPM binary (adjust the version)$ php-fpm8.3 -v# WP-CLI runs in the CLI PHP — compare with Site Health$ wp --infoNeed more detail, such as how to switch versions safely? See how to check and update your PHP version in WordPress.
How to patch PHP2Shell
Pick your hosting type. Whichever it is, the job has two halves: get a fixed PHP build, then restart PHP so the running workers actually use it. Take a backup first if your host doesn’t do it automatically.
You don’t control PHP here; your host does. Most major managed hosts reported patching or mitigating within about a day of the release, but status varied (some deployed firewall rules first, one disabled the affected PHP feature rather than patching).
- Check your host’s status page or security blog for a PHP2Shell notice.
- Ask support to confirm, in writing, that PHP itself was updated for CVE-2026-109618 and CVE-2026-109619 on your site’s server, and when PHP was restarted.
- “We added firewall rules” is a stopgap, not an answer. Ask when the patched PHP will be live.
As a hosting customer: open MultiPHP Manager (or Select PHP Version), and if your site is on 8.1 or older, switch it to 8.3 or 8.4 after taking a backup. Then confirm with support that the server’s PHP packages are patched; that part is their job.
As the server admin (WHM): cPanel shipped fixed EasyApache 4 packages — ea-php82 to ea-php85 at the fixed versions, with backports for ea-php74, 80 and 81. Update and restart PHP-FPM:
$ sudo dnf upgrade --refresh 'ea-php*'$ sudo /scripts/restartsrv_apache_php_fpm$ sudo /scripts/restartsrv_httpdOn CloudLinux with alt-php (Select PHP Version), patched alt-php builds were released to the stable repositories; a normal dnf upgrade picks them up.
Plesk released fixed “PHP for Linux” builds: 8.2–8.5 at the fixed upstream versions, and patched 7.4, 8.0 and 8.1 builds that keep the same version number with an October 21, 2026 build date.
- As the admin, install updates from Tools & Settings › Updates (or let automatic updates run).
- Per site, check Websites & Domains › PHP and move anything on 8.1 or older to 8.3 or 8.4 when you can.
- To confirm an old-numbered build is patched, check its build date in a temporary phpinfo() page, then delete that page.
Use your distribution’s security updates (or the PHP repository you installed from, such as the ondrej/sury packages). Distro builds keep their old version number with a new package revision.
$ sudo apt update && sudo apt upgrade# Confirm the package revision against the advisory, e.g. Ubuntu 24.04: 8.3.6-0ubuntu0.24.04.13$ dpkg -l | grep -E 'php[0-9.]+-fpm|libapache2-mod-php'# Restart whichever serves your site$ sudo systemctl restart php8.3-fpm$ sudo systemctl restart apache2Fixed builds reported in the advisories include Debian 13 8.4.27-1~deb13u1 (DSA-6574-1), Debian 12 8.2.35-1~deb12u1 (DLA-4848-1), Ubuntu 24.04 8.3.6-0ubuntu0.24.04.13 and Ubuntu 22.04 8.1.2-1ubuntu2.28 (USN-8948-1). Older Ubuntu releases need Ubuntu Pro (USN-8948-2).
Red Hat and its rebuilds shipped fixes per PHP stream (RHSA-2026:87070 and related advisories). Check which stream you use, update, and restart.
$ dnf module list php --enabled$ sudo dnf upgrade --refresh 'php*'# The changelog should mention both CVEs$ rpm -q --changelog php | grep -E 'CVE-2026-10961[89]'$ sudo systemctl restart php-fpm$ sudo systemctl restart httpdA few streams lagged on release day. If yours shows no fix, check your vendor’s CVE page and apply the stopgaps below until it lands.
The official php images publish fixed tags (8.5.12, 8.4.27, 8.3.36, 8.2.35 and later). There are no maintained tags for 8.1 or older. Images built on top of them, including the official wordpress image, need pulling or rebuilding too.
# What is the running container actually on?$ docker exec <container> php -v# Pin a fixed tag in your Dockerfile, e.g. FROM php:8.4.27-fpm, then:$ docker compose build --pull$ docker compose up -d --force-recreatePulling a new image changes nothing until the container is recreated. FrankenPHP users should move to v1.13.2 or later, which bundles the fixed PHP.
Don’t skip the restart
Can’t patch yet? Stopgaps that help (a bit)
The PHP project published temporary settings that close the confirmed attack paths. They are incomplete by the project’s own description, so treat them as hours-long measures, not a fix. They go in php.ini, the PHP-FPM pool or the server config — not in .user.ini or a plugin — and need a PHP restart.
# Blocks the session upload-progress path (CVE-2026-109619)session.upload_progress.enabled = 0# PHP 8.5 only: blocks the fatal-error backtrace pathfatal_error_backtraces = 0# Blocks the out-of-memory trigger (CVE-2026-109618). Restore a finite limit once patched!memory_limit = -1- Put a CDN/WAF in front. Cloudflare and others deployed rules for PHP2Shell traffic. It only helps if traffic actually passes through them and your origin isn’t reachable directly.
- Restrict access. For sites that can’t be patched quickly, government agencies recommended taking them offline or behind a login at the network level. Maintenance-mode plugins don’t count: they run inside PHP.
- Don’t disable file uploads on a WordPress site unless you can live without the media library; that mitigation is meant for apps that never accept uploads.
How to tell if you were hacked
Patching closes the door; it doesn’t evict anyone who already got in. If your site was online on an unpatched PHP between 17 October (the first attempt on record) and the moment you patched, go through this list. Tick items as you check them, and press Found this if you see the warning sign.
Interactive checklist
PHP2Shell warning signs
0/12
checked
# PHP files where only media should be$ find wp-content/uploads -type f -name '*.php'# PHP files modified since the first recorded attempt$ find . -type f -name '*.php' -newermt '2026-10-17' -not -path './wp-content/cache/*'# Must-use plugins$ ls -la wp-content/mu-plugins# Administrators and when they were created (WP-CLI)$ wp user list --role=administrator --fields=ID,user_login,user_email,user_registered# Core files that differ from the official release$ wp core verify-checksumsIf you find something: cleanup steps
Don’t panic, and don’t start deleting files at random — you can destroy the evidence you need to find out how far it went. Work in this order. The full version, with more detail for each step, is our WordPress hacked recovery checklist.
Step 1: Patch PHP first
Otherwise whatever got in once can get in again the moment you finish cleaning.Step 2: Contain and preserve
Put the site behind maintenance at the server or CDN level, or take it offline. Snapshot the server (files, database and logs) before you change anything.Step 3: Restore from a clean backup
Choose one from before your exposure window — before 17 October at the latest, older if you’re unsure. Then re-apply content changes made since by hand. Ask your host; many keep 14–30 days of backups.Step 4: No clean backup? Rebuild from trusted sources
Reinstall WordPress core (wp core download --force --skip-content), reinstall every plugin and theme from the official source, delete PHP files in uploads, and inspectwp-config.php,.htaccess,.user.iniandmu-pluginsby eye.Step 5: Rotate every secret
Because PHP2Shell can leak server memory, assume credentials in memory were exposed: all admin passwords, new salts inwp-config.php, the database password, SFTP/SSH and hosting logins, and API keys for SMTP, payment and analytics services.Step 6: Remove unknown users and app passwords
Delete accounts and application passwords you can’t vouch for, and reassign their content to a real user.Step 7: Check how Google sees you
Fix anything listed in Search Console › Security issues, then request a review. Remove spam URLs and let them 404 or 410.Step 8: Tell people if you need to
If personal data (customers, members, form entries) could have been accessed, you may have legal notification duties depending on where you and your users are. Get advice early.
How to avoid the next PHP2Shell
PHP2Shell won’t be the last runtime bug. The sites that came through it calmly had a few things in common:
- They knew who patches PHP. On managed hosting it’s the host; on a VPS it’s you. Write that down, with a phone number.
- They were on a supported PHP branch. Sites on 8.3 or 8.4 got a normal update. Sites on 7.4 or 8.1 had to wait for a backport or rush an upgrade. PHP 8.2 leaves support on 31 December 2026.
- They had automatic security updates and restarts on their own servers (for example
unattended-upgradesplus a restart of PHP-FPM). - They had a CDN/WAF in front, which filtered a lot of the early noise while the patch rolled out.
- They had off-server, tested backups from well before the incident.
Or take PHP out of the request path entirely
There’s a more structural option. Most WordPress sites are content sites: pages change a few times a week and are read thousands of times a day. Running PHP on every one of those requests means every PHP bug is your problem. Two ways to change that:
- Serve a static copy. Static-export tools turn a WordPress site into plain HTML files hosted on a CDN. The public site has no PHP at all; you keep WordPress private for editing (and still patch it, but it’s no longer exposed to the internet).
- Run a WordPress-compatible stack that has no PHP. That’s what Presscomet is: the same wp-admin, block editor, URLs and REST API, rebuilt to run on Node.js with a single SQLite file. Your content and settings move over with a one-click migration.
Classic WordPress
- Web server (Apache / Nginx / LiteSpeed)
- PHP runtime ← PHP2Shell lives here
- WordPress core + every active plugin
- MySQL / MariaDB
PHP-free stack
- CDN / web server
- Static HTML from the cache (most requests stop here)
- Node.js app — admin, editor, API
- SQLite file
What Presscomet does — and doesn’t — change
With no PHP runtime, PHP2Shell and every other PHP-runtime bug simply don’t apply, and public pages are served from a static cache, so most requests never reach application code at all. It is not “unhackable”: Presscomet has its own software to keep updated (Node.js, its libraries and the server it runs on), its own login to protect, and those will have their own advisories some day. It also doesn’t run PHP plugins: the common ones (SEO, forms, SMTP, redirects, security, custom fields and more) are built in, but WooCommerce stores aren’t supported. Compare the details on Presscomet vs WordPress.
If you’re curious, check your site — it reads your public site and lists what would move over, and it never changes anything on your server. Or have us run it for you on managed Presscomet hosting. Read more about the approach in Can you run WordPress without PHP? and our WordPress security guide.
Sources
Facts checked against these sources on October 23, 2026. Things change quickly; the vendor advisory always wins.
- [1]PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 security releases — PHP.net
- [2]GHSA-w8hw-w9fx-j79w (CVE-2026-109618) — php-src on GitHub
- [3]GHSA-6wmf-4rv5-p3rp (CVE-2026-109619) — php-src on GitHub
- [4]CVE-2026-109618 — NIST NVD
- [5]CVE-2026-109619 — NIST NVD
- [6]PHP2Shell advisory (detection and interim mitigations) — Sophos
- [7]PHP2Shell FAQ — watchTowr
- [8]Two critical PHP flaws: find, mitigate and patch PHP2Shell — Qualys
- [9]PHP2Shell: when PHP runs out of memory at the wrong moment — Imperva
- [10]PHP2Shell exploitation started days before patches — SecurityWeek
- [11]AL26-026 Critical vulnerabilities impacting PHP — Canadian Centre for Cyber Security
- [12]Critical vulnerabilities in PHP (PHP2Shell) — Cyber Security Agency of Singapore
- [13]PHP2Shell fixes by distro, control panel and PHP version — Digital Applied
- [14]USN-8948-1: PHP vulnerabilities — Ubuntu
- [15]Debian security tracker: CVE-2026-109618 — Debian
- [16]Known Exploited Vulnerabilities catalog — CISA
Frequently asked questions
What is PHP2Shell?
PHP2Shell is the name for two critical vulnerabilities in the PHP runtime, CVE-2026-109618 and CVE-2026-109619, each rated 9.2 under CVSS v4.0. Under the right conditions they let an unauthenticated attacker run code on a server that uses PHP to answer web requests. The PHP project released fixes on 21 October 2026.
Will updating WordPress fix PHP2Shell?
No. The flaws are in PHP, the language WordPress runs on, not in WordPress core, plugins or themes. Updating WordPress is still good practice, but only updating PHP (or getting a patched build from your host) fixes PHP2Shell.
Can Wordfence or another security plugin protect me?
Not reliably. WordPress security plugins run inside PHP after the request has been parsed, and the most dangerous attack path can trigger before WordPress loads at all. A CDN or web application firewall in front of the server (such as Cloudflare) can filter some attempts and buy time, but it is not a fix.
Which PHP versions are fixed?
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released 21 October 2026. PHP 7.4, 8.0 and 8.1 received source-only backports, so you need a patched build from your host or Linux distribution. Versions older than 7.4 got no upstream fix and should be upgraded.
My host shows an older PHP version but says I'm patched. Who is right?
Possibly both. Linux distributions and some hosts backport security fixes without changing the version number; Ubuntu 24.04’s patched package still reports PHP 8.3.6, for example. Ask your host which advisory or build they applied and when PHP was restarted.
Has PHP2Shell been exploited in the wild?
Attempts, yes: Amazon reported an attempt on 17 October 2026 and Cloudflare reported millions of attempts after disclosure. As of 23 October no successful compromise had been publicly confirmed, and some researchers said circulating proof-of-concepts did not achieve code execution. Treat it as actively targeted.
Is PHP2Shell in the CISA Known Exploited Vulnerabilities catalog?
Not as of 23 October 2026. CISA urged organisations to update PHP immediately, but neither CVE had been added to the KEV catalog when this guide was last checked.
Is PHP2Shell the same as WP2Shell?
No. WP2Shell was a separate WordPress vulnerability from July 2026 that normal WordPress updates fixed. PHP2Shell is in PHP itself and needs a PHP update.
Do I need to restart anything after updating PHP?
Yes. PHP-FPM, Apache and LiteSpeed keep the old code in memory until their workers restart. After updating, restart the PHP service (or ask your host to), then confirm the new version in Tools › Site Health › Info › Server.
Is Presscomet affected by PHP2Shell?
No. Presscomet runs the WordPress admin and sites on Node.js without a PHP runtime, so PHP2Shell and other PHP-runtime bugs don't apply. It has its own software to keep updated (Node.js, its dependencies and the server it runs on), so it is not immune to vulnerabilities in general.
Presscomet keeps your wp-admin, editor, URLs and content, and serves pages without PHP or MySQL. Check your site for free, then migrate in one click — your old site is only ever read.
Keep reading
- HostingIs your WordPress host patched for PHP2Shell? What to ask (with an email template)
On most WordPress sites you can’t patch PHP yourself — your host has to. Here’s who is responsible on each kind of hosting, the four questions that get you a real answer, and a ready-to-send email.
- SecurityHow to check and update your PHP version in WordPress (2026)
Your PHP version decides whether your WordPress site still gets security fixes. Here’s how to find it in under a minute, what’s still supported, and a safe way to upgrade without breaking anything.
- SecurityWordPress hacked? A step-by-step recovery checklist
Redirects to spam sites, admin users you never created, a warning from Google or a suspension notice from your host. Here’s the order to do things in, so you clean the site once and it stays clean.