How to Fix PHP2Shell (CVE-2026-109618 & 109619) PHP Sites

Several security firms report attacks in the wild, although CISA said on Oct 21 it had not yet observed exploitation. Many hosts have patched since Oct 21, but not all. Check your host · Read today’s news
- Check your PHP version (Step 1, or use the checker below).
- Update PHP to 8.5.12, 8.4.27, 8.3.36 or 8.2.35 (or a vendor-patched package), then restart it.
- Ask your host to confirm the fix, then scan for unknown files.
A critical flaw in PHP, the language behind WordPress, WooCommerce, Drupal and Joomla, lets attackers take over a web server without logging in. It is called PHP2Shell and covers two bugs, CVE-2026-109618 and CVE-2026-109619. This guide explains it in plain English and walks you through protecting your site, from zero to done.
Type your version (for example 8.3.35). Nothing is sent anywhere.
What is PHP2Shell, in plain English?
Every web page on a PHP site is built by PHP on the server. The researchers found that when PHP runs out of memory in a certain way while handling a request, it can leave its internal state damaged. A skilled attacker can abuse that damage to run their own commands. Because this happens before any login, passwords do not protect you.
The bugs sat in PHP for more than a decade. Researchers at OpenAI, Wiz and Calif used advanced AI to find them and show a working exploit against fresh WordPress, Drupal and Joomla installs. That matters: AI makes old, hard-to-exploit bugs practical to attack.
What has already happened (real-world timeline)
- August 2026Researchers at Wiz, OpenAI and Calif find the flaws with AI tools and report them privately to the PHP team.
- October 17Amazon’s honeypots log the earliest known exploit attempt, four days before disclosure. Amazon described it as largely a one-off probe.
- October 20Details leak online ahead of the planned disclosure. PHP announces an emergency release for the next day, and CERT-EU publishes an advisory.
- October 21, 14:00 UTCPHP releases 8.5.12, 8.4.27, 8.3.36 and 8.2.35, plus source-only fixes for retired 7.4, 8.0 and 8.1. CISA urges immediate patching, and Cloudflare reports attack attempts within hours.
- October 21, same dayHosts announce firewall protection while they roll out patches. Some government sites in Finland, the Netherlands and France went offline temporarily. A separate Node.js remote-code-execution flaw is announced.
- October 22More hosts finish. Trackers list Cloudways, Kinsta and GoDaddy Web Hosting as patched, while Bluehost and DreamHost were still rolling out.
- October 23Security firms keep publishing scanning and detection guidance, and Qualys updates its exposure numbers.
Latest news: October 23, 2026
Amazon logged the earliest attempt on October 17. More proof-of-concept attempts followed on release day, and Cloudflare reported attack attempts rising fast within hours. CISA said on October 21 it had not yet observed exploitation, so reports differ. Assume you are a target.
Source: The Hacker News · Cloudflare
Qualys analysed data from 12,000 customers and found about 110 million PHP installations (71%) on end-of-life or end-of-support versions, from 5.4 to 8.1. Only about 199,000 were patched in the first 12 hours.
Source: Qualys
Researchers also showed that an attacker with no login can read PHP worker memory, which can hold passwords, authentication tokens and API keys. That is why this guide tells you to rotate secrets.
Source: Qualys
Setups using mod_php face the greatest danger, and the attack can run before WordPress or any plugin loads, so a security plugin never sees it. Wordfence told owners the fix cannot arrive through automatic updates.
Source: Help Net Security · Martin Cid
A tracker updated on October 22 lists Cloudways, Kinsta and GoDaddy Web Hosting as patched, GoDaddy VPS as self-managed, Bluehost still patching and DreamHost in final tests. Status changes hourly, so confirm with your host.
Source: ActiveSet tracker · Meow Apps
OpenAI says it is fixing other significant bugs found with its models, including the Node.js remote-code-execution flaw announced the same day, and expects many more findings in coming months.
Source: Decrypt
Which PHP versions are fixed?
PHP’s security team also published minimal source backports for 7.4, 8.0 and 8.1, and some Linux vendors ship patched packages even for retired branches. One scan counted roughly 884,000 internet-facing servers advertising PHP 8.1 or older, which is why old versions are the biggest worry.
Am I at risk? Pick your hosting type
You cannot patch PHP yourself. Switch to the newest PHP in your panel and ask your host in writing to confirm they applied the fix. If they have no plan, that is a sign to consider moving.
You own the patching. Update packages, restart PHP-FPM, check every site on the box including staging and forgotten subdomains.
Your provider usually patches the runtime. Check their status page or open a ticket, and still update WordPress and plugins yourself.
Rebuild from a fixed tag (8.5.12, 8.4.27, 8.3.36 or 8.2.35) and redeploy. Updating a running container does not change the image it came from.
Contact your hosting provider: what to ask
The fix lives on the server, so your host has to install it. Many hosts first added a firewall rule or switched off risky PHP features. That helps, but PHP says such measures block only some routes, so keep asking until you hear that PHP itself is updated.
Hi, my website (yourdomain.com) runs PHP [your version]. Has the PHP fix for PHP2Shell (CVE-2026-109618 and CVE-2026-109619) been installed on my server? If yes, please tell me the PHP build or package version and when it was installed. If not, when will it be? Please reply in writing. Thank you!
- Is the fixed PHP build installed on my server? Which package or version?
- When was it installed, and were all PHP workers restarted?
- Is my site served by mod_php or PHP-FPM?
- Is my PHP version (for example 7.4 or 8.1) covered by a vendor backport, and which newer version can I switch to?
- Did you scan my account for signs of compromise, and can you restore a clean backup if needed?
Tips: use live chat or a support ticket so you get a written record, and keep a screenshot of the reply. If there is no clear answer in 24 hours, take a backup, put Cloudflare in front of the site as a temporary layer, and start comparing other hosts.
Top hosting providers: PHP2Shell status
Reported by each host and by independent trackers on October 22–23, 2026. These change by the hour, so always confirm on the host’s own page or by ticket. Local or smaller hosts are not listed: use the message above.
| Host | Status | What it means for you | Official page |
|---|---|---|---|
| SiteGround | Protected | Server-level protection, affected PHP features switched off. Host says customers need do nothing. | Host blog |
| Hostinger | Mostly patched | Firewall rules first, then patched PHP on managed plans. VPS customers must update themselves. | Check hPanel and Hostinger’s own blog |
| Bluehost / HostGator | Rolling out | Most servers updated as of Oct 21–22, rest still in progress. Ask support; VPS or dedicated: update packages. | Ask support |
| Cloudways | Patched | Patched on Autonomous and Flexible (Oct 22). | Status page |
| Kinsta | Patched | Tracker shows the incident resolved Oct 22. Kinsta emails you when your site is patched. | Community post |
| WP Engine | Patched (reported) | Fix reported fully deployed Oct 22, covering the PHP versions it runs. | Status page |
| GoDaddy | Hosting patched | Web Hosting patched. VPS is self-managed, so update PHP yourself. | Announcement |
| Namecheap | Almost done | Public services protected, patch nearly deployed Oct 22. Own VPS or dedicated: update yourself. | Status page |
| DreamHost | Rolling out | Fixed PHP on much of the fleet, rest in final testing. Old PHP versions have mitigations meanwhile. | Status page |
| InMotion | Rolling out | Dedicated done, VPS in progress, shared hosting protected while waiting for the patch. | Status page |
| OVHcloud | Patched | Web hosting patched on all clusters, PHP 7.4 to 8.5. | Status page |
| Liquid Web | Rolling out | Fixed builds out for cPanel and Plesk servers, deploying across hosting. | Status page |
| Pantheon | Patched | Live sites on PHP 8.2 to 8.5 patched. Older versions wait for vendor fixes. | Status page |
Step-by-step: protect your site
Follow the steps in order. Total time is roughly one hour, and most of it is waiting on backups.
WordPress: Tools → Site Health → Info → Server.
Hosting panel: cPanel MultiPHP Manager, Plesk PHP Settings, or the PHP section of your host’s dashboard.
VPS / server: php -v shows the command-line PHP, which can differ from the PHP that serves your website. Check the web one too (the name varies by setup):
php -v php-fpm8.3 -v
Note the version, then use the checker above.
Back up files and database, and keep a copy off the server. Many hosts offer one-click snapshots. A backup you have never restored is only a hope, so try a test restore on staging when you can.
- Shared hosting: choose the newest PHP your panel offers (8.3 or 8.4 is a good target), then open a ticket asking the host to confirm the PHP2Shell patch is applied. A panel label like “8.3” does not show the patch level.
- VPS / dedicated: update through your package manager.
- Managed WordPress hosting: check the provider’s status page or ask support.
- Docker: change to a fixed image tag such as
php:8.4.27-fpm, then rebuild.
# Debian / Ubuntu sudo apt update && sudo apt upgrade # AlmaLinux / RHEL / Rocky sudo dnf upgrade 'php*' # Docker Compose docker compose pull && docker compose up -d --build
An update does nothing until the old PHP workers are replaced. On a server, restart PHP-FPM, or Apache if you use mod_php. On shared hosting, switching the version in the panel does this for you.
sudo systemctl restart php8.3-fpm # Apache with mod_php: sudo systemctl restart apache2
Check the version again, then open your homepage, login page and (for stores) the checkout. Linux vendors sometimes patch PHP without changing the version number, so also look for the CVE numbers in the package changelog or your vendor’s advisory.
php -v apt changelog php8.3-fpm | grep -i 109618 rpm -q --changelog php | grep -i 109618
PHP is the engine, but old plugins are still the most common way sites get hacked. Update core, themes and plugins, and delete anything you do not use. With WP-CLI:
wp core update wp plugin update --all wp theme update --all
- Turn on two-factor login for every admin and use unique passwords.
- Keep only the admin accounts you really need.
- Disable the dashboard file editor:
define('DISALLOW_FILE_EDIT', true);inwp-config.php. - Block PHP from running inside the uploads folder. On Apache, put this in
wp-content/uploads/.htaccess(test your site afterwards):
<FilesMatch "\.php$"> Require all denied </FilesMatch>
A firewall such as Cloudflare WAF is a useful extra layer, but PHP says no setting fully fixes these bugs. Patching is the fix.
Details leaked and attack attempts were reported around disclosure, so look after patching. These WP-CLI and shell commands are read-only:
wp core verify-checksums wp user list --role=administrator find wp-content/uploads -name "*.php"
Any PHP file inside uploads, unknown admin user, or changed core file needs attention. See the warning signs below.
Can’t patch today? Temporary protection
PHP is clear that only an update is a complete fix. If you must wait for your host, these stopgaps reduce risk for a short time. Keep them until PHP is updated, restarted and verified.
- Cloudflare turned on PHP2Shell protection for every plan with its WAF on, including Free, from Oct 21 at 03:02 UTC, about nine hours before public disclosure.
- It only helps if your visitors really go through Cloudflare (site proxied).
- Free plan: the rules arrive automatically in the Managed Free Ruleset. Pro, Business, Enterprise: check your Managed Ruleset is deployed in block mode.
- See what was blocked under Security → Security Analytics → Events.
- Keep it on after patching. Cloudflare itself says to update PHP as well.
Put these in php.ini or the FPM pool (not ini_set() or .user.ini), then restart every PHP worker. They block only some attack paths.
memory_limit = -1 post_max_size = 8M ; 32M if you need uploads upload_max_filesize = 2M ; keep below post_max_size session.upload_progress.enabled = 0 ; PHP 8.5 only: fatal_error_backtraces = 0
memory_limit=-1 looks odd, but PHP lists it. Pair it with a container or cgroup memory limit, and do not use RLIMIT_AS or RLIMIT_DATA. Also limit request size and multipart parts at your web server or proxy.
Ask your host to apply them, or better, to confirm the real PHP patch. Use the message earlier in this guide.
Let an AI assistant audit your server (copy-paste prompt)
If you use a coding agent such as Claude Code or Codex that can read your repo or reach your server, this prompt tells it to inventory every PHP install, classify each as patched, vulnerable or unknown, and report back. It is built from PHP’s advisory, works read-only and must ask before changing anything.
- Give it read-only access first. Do not hand an AI root access to production.
- Read every command it proposes before approving it.
- It cannot see inside shared hosting, so your host still has to confirm the patch.
- Treat its report as a starting point and verify the versions yourself.
Show the full prompt
TASK: Audit my PHP setups for PHP2Shell (CVE-2026-109618 and CVE-2026-109619) and help me fix them. SOURCE OF TRUTH: re-read the official advisory first, it may have been updated: https://www.php.net/archive/2026.php#2026-10-21-5 Fixed releases: 8.5.12, 8.4.27, 8.3.36, 8.2.35. PHP 8.1 and older get no official release (PHP also published source backports for 7.4, 8.0 and 8.1). RULES - Read-only discovery is fine. ASK ME before changing anything, restarting services, or touching production or shared hosting. - Do not guess. If you cannot confirm a version, mark it UNKNOWN. - Do not stop at the first finding. Inventory everything, then report. STEP 1 - INVENTORY every place PHP runs - Repo files: composer.json / composer.lock (require.php, config.platform.php), Dockerfile*, docker-compose*, .php-version, .tool-versions, .devcontainer, CI files (setup-php, image: lines), Terraform / Ansible / Helm / k8s, PaaS config. - Base images: every FROM php:*, wordpress:*, bitnami/*, serversideup/*, dunglas/frankenphp* with its tag. - Machines and containers I can reach: php -v, php-fpm -v, php -i | grep -i "server api", apachectl -M | grep -i php, docker ps and docker exec <container> php -v. - Note the SAPI of each (FPM, mod_php, CGI, FrankenPHP, LiteSpeed, CLI-only) and any long-running workers (Octane, RoadRunner, Swoole, FrankenPHP worker mode). - If no PHP exists anywhere, tell me and stop. STEP 2 - CLASSIFY each instance as PATCHED, VULNERABLE or UNKNOWN - Upstream builds are vulnerable below 8.5.12 / 8.4.27 / 8.3.36 / 8.2.35. - 8.1 and older: vulnerable unless a vendor backport is confirmed. - Distro packages often backport fixes without changing the version, so check the changelog for the CVE IDs: apt changelog <pkg> | grep -E "CVE-2026-10961[89]" rpm -q --changelog <pkg> | grep -E "CVE-2026-10961[89]" - rpms.remirepo.net: PHP says it will not have same-day updates. Recommend distro packages or building from source. - Managed or shared hosting, or PaaS: mark UNKNOWN and tell me to ask the provider. STEP 3 - FIX (only after I approve the plan) - Upgrade to a fixed version or vendor-patched package: bump Docker tags and rebuild, update CI pins, run apt / dnf / apk upgrades. - Restart EVERY PHP worker (FPM pools, Apache, FrankenPHP, LiteSpeed, Octane / RoadRunner / Swoole). Old processes keep running vulnerable code. - Re-verify each instance (version and changelog) and show me the evidence. STEP 4 - TEMPORARY MITIGATIONS, only if patching must wait (they reduce exposure but do NOT make anything safe) - Set them in php.ini / the FPM pool / server config, never ini_set() or .user.ini, then restart all workers. - CVE-2026-109618: memory_limit=-1 set so apps cannot override it; post_max_size 8M (no uploads) or 32M (uploads) with a lower upload_max_filesize; request-size, field-count, multipart-part and header limits at the web server or proxy; container/cgroup memory limits (do NOT use RLIMIT_AS or RLIMIT_DATA). - CVE-2026-109619: session.upload_progress.enabled=0; on PHP 8.5 fatal_error_backtraces=0; remove invalid or deprecated per-request settings that emit early diagnostics; fix attacker-reachable fatal errors and timeouts. - If the site is behind Cloudflare, confirm the WAF Managed Ruleset is in block mode. This is an extra layer, not a fix. STEP 5 - LOOK FOR SIGNS OF COMPROMISE (read-only; keep evidence, delete nothing) - Error logs: segfaults, "Allowed memory size exhausted", worker crashes, especially near very large POST or multipart requests. - New or modified files in web roots (possible webshells), new cron jobs, unexpected processes or outbound connections from PHP users. FINAL REPORT Give me a table: location | how PHP is provided | SAPI | version | status | action taken or needed. Then list: what you changed, what still needs my approval, what needs my hosting provider, any stopgap mitigations and when to remove them, and any compromise indicators.
Update WordPress and old plugins (login and database)
Updating plugins does not fix PHP2Shell, because the bug is in PHP. You still need to do it for two reasons. First, the PHP upgrade is where outdated plugins break, and that is the main reason sites stay on old PHP: one monitoring firm found 22.7% of the WordPress and Joomla sites it watches on PHP 8.1 or older the day before the release. WordPress recommends PHP 8.3 but still lists 7.4 as compatible. Second, plugins that handle login and the database hold the keys to your site, so they decide how bad a break-in gets.
| Plugin type | What it does | Risk when old | What to do |
|---|---|---|---|
| Login & security | Security and firewall plugins, 2FA, social login (for example Google sign-in), custom login URL, captcha, membership and WooCommerce accounts | Auth bugs, or a lock-out when an old version breaks on new PHP | Update first, and set up emergency access before changing PHP (see below). |
| Database & data | Backup, migration and cloning, database cleaners, search-replace, import/export, form-entry and cache plugins | They read and write your whole database, so they are attractive targets when old | Update or delete. Never leave database-admin tools installed. Test a restore. |
| Store & orders | WooCommerce plus payment, shipping and courier plugins | Often the reason a store is stuck on old PHP | Test checkout on staging, ask the developer for a PHP 8.3+ release, or replace. |
- Open its WordPress.org page and check Last updated, Tested up to and Requires PHP.
- Read recent support threads for PHP 8 errors.
- Search it in the Patchstack or Wordfence vulnerability databases.
- No update in about two years? Treat it as abandoned and plan a replacement (rule of thumb).
In January 2026, host Tiger Technologies reported that older versions of the Wordfence security plugin were incompatible with newer PHP releases, so it auto-updated Wordfence for customers. Lesson: turn on auto-updates for trusted plugins. Read the note
- Back up files and database (
wp db export before-update.sqlwith WP-CLI). - Update WordPress core, theme and plugins, on staging if you have it.
- Replace any plugin that is abandoned or says it needs old PHP.
- Switch PHP to 8.3 or 8.4, or let your host apply the fixed build.
- Test login (including 2FA and social login), checkout, forms and backups, then read the PHP error log.
- Locked out? Rename the plugin folder in
wp-content/pluginsthrough File Manager or FTP to switch it off.
wp plugin list --update=available wp plugin list --fields=name,status,version,update_version wp db export before-update.sql
Because attackers can read PHP memory, treat passwords and keys as possibly exposed if your site ran unpatched PHP on or after October 21. Change WordPress admin, hosting and SFTP passwords, the database password (and update wp-config.php), the security salts (generator), and payment, courier and API keys.
The 6 layers of protection
Install the fixed release or a vendor-patched package. This is the real fix.
Restart PHP-FPM or Apache, then check the version and package changelog.
Update core, themes and plugins, and delete what you do not use.
Two-factor login, fewer admins, no file editor, no PHP in uploads.
Cloudflare WAF or your host’s firewall as a temporary extra layer.
Off-site backups, a tested restore, and regular file and log checks.
Patching comes first. Every other layer reduces damage if something slips through.
Running a store? Extra tips for WooCommerce
- Test on staging before jumping PHP branches. Old payment, shipping and courier plugins are the usual reason stores stay on old PHP. If a plugin only works on an old version, ask its developer for an update or replace it.
- Short-term safe move: the latest patch of your current supported branch (for example 8.2.35) is better than waiting. Plan the move to 8.3 or 8.4 afterwards, since 8.2 security support ends Dec 31, 2026.
- If you suspect a breach: rotate payment-gateway and courier API keys, and check recent admin and order exports for anything odd.
- Keep a recent off-site backup of orders so you can restore quickly.
Warning signs you may have been hacked
Especially inside wp-content/uploads, where only images and documents should live.
Check Users → Administrators for names you do not recognise.
wp core verify-checksums compares WordPress files with the originals.
Search site:yourdomain.com for pharma, casino or foreign-language pages you never wrote.
Sudden spikes, or a host warning about outgoing spam or resource use.
Visitors sent to strange sites, sometimes only on phones or from Google.
- Save a copy of the suspicious files and logs first, and tell your host.
- Restore from a clean backup or rebuild, then patch PHP before going live again.
- Change all passwords, database credentials, salts in
wp-config.phpand API keys. - On a store, contact your payment provider and check your local privacy-law duties if customer data may be exposed.
6 common beginner mistakes
Old PHP workers keep running the vulnerable code. Restart PHP-FPM or Apache.
php -v on a server shows command-line PHP, not always the web one.
Staging copies, old subdomains and abandoned test installs are easy targets. Make an inventory.
A WAF helps, but the vulnerability is in PHP. Patch first.
No WordPress plugin can patch PHP. Expect scam emails and fake fixes during big news like this; only follow your host, php.net and official advisories.
Turning off version headers is fine hygiene, but it does not close the hole.
The A to Z of PHP2Shell protection
Bookmark this glossary. Each letter is one idea you can act on.
Your 12-point checklist
0 of 12 done
More bugs are coming: how to be ready
OpenAI says PHP2Shell is one of several major issues its models have found and expects findings to rise sharply. Reports also note that powerful open AI models are now freely downloadable, so attackers get the same speed-up. Nobody has published a list of the next bugs, so ignore anyone who claims to know exactly what is coming. What you can do is make patch day routine:
- Update core, plugins and themes
- Check your PHP version and its support end date
- Review admin users
- Confirm backups exist and one restore works
- Enable automatic security updates for your OS
- Turn on auto-updates for trusted plugins
- Subscribe to your host’s status and security emails
- Follow php.net and CISA alerts
Frequently asked questions
Is my Blogger or Blogspot blog affected?
No. Blogger runs on Google’s servers, not on a PHP server you manage, so there is nothing for you to patch. This guide is for self-hosted PHP sites such as WordPress, WooCommerce, Drupal and Joomla.
Will updating PHP break my site?
Patch releases inside the same branch (for example 8.3.35 to 8.3.36) are meant for fixes only, but always back up first. Jumping to a newer branch is where old plugins can break, so test on staging.
Does Cloudflare or a firewall protect me?
Cloudflare says its WAF protection covers every plan with the firewall on, but it only helps if your visitors go through Cloudflare, and it is a stopgap. PHP says no configuration change fully mitigates these flaws, so update PHP.
My host still offers only an old PHP. What now?
Ask for a vendor-patched package or backport in writing. If they cannot give one, move to a host with supported PHP.
Is shared hosting safe?
Only if your host has patched. Ask them, and switch to the newest PHP version in your panel.
How do I know I am safe after patching?
You can never prove zero risk, but a patched version, a restart, clean file checks and 2FA cover the basics. Keep logs and backups for later.
Trusted sources and live trackers
Every claim above comes from these pages. Bookmark the official ones and re-check, because the story is still changing.
This guide is general information, not a security audit. For business-critical or breached sites, involve your host or a security professional.

Comments