Skip to content

The php2shell vulnerability: how to check and fix your PHP site

Two critical PHP flaws fixed on October 21, 2026 are now on CISA's exploited list. Here's how to check your site, get it patched and look for signs of a break-in.

The php2shell vulnerability is the nickname for 2 critical flaws in PHP itself, CVE-2026-109618 and CVE-2026-109619. PHP is the programming language behind WordPress, WooCommerce, Laravel and many other platforms, and these bugs can let a stranger run code on your web server without logging in. PHP fixed both on October 21, 2026. On October 26, the US Cybersecurity and Infrastructure Security Agency (CISA) added them to its list of vulnerabilities exploited in real attacks.

The fix is a PHP update to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or a patched build from your host. On shared and managed hosting, your host usually does this, so your job is to confirm it in writing. On a VPS, someone has to install the update and restart PHP. Sites on PHP 8.1 or older got no official release and need a version upgrade.

Do this in 5 minutes: find your PHP version using the steps below, then send your host one message asking them to confirm that the PHP serving your site includes the fixes for CVE-2026-109618 and CVE-2026-109619.

What the php2shell vulnerability is: CVE-2026-109618 and CVE-2026-109619

Both flaws sit in how PHP handles memory during web requests, not in any plugin or theme. The PHP security advisory describes them like this:

  • CVE-2026-109618: when PHP runs out of memory partway through reading a request, its cleanup can later treat half-built data as valid.
  • CVE-2026-109619: data that belongs to one request can survive after its memory is freed, and a later request on the same PHP worker may use it.

PHP rates both 9.2 out of 10 (CVSS v4.0) and says they can allow unauthenticated remote code execution. In plain words, a stranger could make your server run their code. PHP considers the risk highest for Apache with mod_php, where it has a demonstrated attack that triggers "before any application code runs." That's why updating WordPress or your plugins doesn't fix it.

Timeline

  • October 20, 2026: php.net posts an advance notice of a critical PHP security release for the next day at 14:00 UTC.
  • October 21: PHP releases 8.5.12, 8.4.27, 8.3.36 and 8.2.35 with the fixes. CISA publishes an alert urging immediate patching.
  • October 23: php.net publishes an extra advisory recommending session.upload_progress.enabled=0 until the next bugfix release, for a related flaw (CVE-2026-115560) that needs an unusual configuration.
  • October 26: CISA adds both CVEs to its Known Exploited Vulnerabilities catalog. CISA only lists a flaw there when there is "reliable evidence" it has been exploited in the wild.

Are you affected?

Probably, if your website runs on PHP and hasn't been patched since October 21. W3Techs reports that PHP runs 69.2% of websites whose server-side language it can detect, as of October 27, 2026. CISA says the flaws affect all PHP installations serving web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. That covers WordPress, WooCommerce, Laravel, Magento, Joomla and custom PHP sites, plus staging copies and forgotten subdomains on the same account.

Who does the work depends on your hosting:

Hosting typeWho updates PHPYour job
Shared hosting (cPanel, hPanel, Plesk)Your hostGet written confirmation
Managed WordPress hostingYour hostGet written confirmation
VPS, cloud or dedicated serverYou or your developerUpdate packages, restart PHP
PHP 8.1 or olderOnly hosts that backport fixesAsk, then upgrade the version

Hostinger's php2shell update shows the split: every plan except VPS needs nothing from the customer, while VPS owners must update PHP and restart it.

Not sure what is costing you leads?

Send your website and we will record a free 2 minute video showing the 3 fixes we would make first.

Get my free video audit

How to check your PHP version

Write down the full number, like 8.3.36, not just 8.3.

cPanel

Log in to cPanel and open MultiPHP Manager in the Software section. cPanel's documentation says the list shows each domain with the PHP version it uses, and an "Inherited" label if it uses the server default. If you only see the branch, such as PHP 8.3, get the exact number from WordPress Site Health or your host.

Hostinger hPanel

Go to Websites, click Dashboard next to your site, then find PHP Info in the sidebar. The version is at the top. Hostinger's help page adds a useful check: a Build Date of October 21, 2026 or later means the fix is in place, even if the version number didn't change.

Plesk

Open Websites & Domains. Plesk's documentation says the selected PHP version appears next to the PHP icon on the domain card. Click PHP, then View the phpinfo() page.

WordPress Site Health

In your WordPress dashboard, go to Tools, then Site Health, then the Info tab, and expand Server, as described in WordPress's Site Health guide. This shows the PHP version that actually serves your pages.

One catch: a lower number doesn't always mean you're exposed. Some hosts and Linux distributions add the fix to the version they already run. CloudLinux notes that a patched build can still report an older number such as 8.4.26. Your host's written answer matters more than the number on screen.

How to fix it

Updating PHP is the only complete fix. PHP's release notes for all 4 versions say "updating is the only safe choice."

Your PHP branchFixed release (Oct 21, 2026)Security fixes until
8.58.5.12Dec 31, 2029
8.48.4.27Dec 31, 2028
8.38.3.36Dec 31, 2027
8.28.2.35Dec 31, 2026
8.1 and olderNo PHP releaseAlready end of life

Support dates come from php.net's supported versions page.

Shared or managed hosting

Your host may well have patched already. php.net says Linux distributions and long-term support vendors received the patches in advance. Don't assume, though. Open a support ticket and ask for written answers to 4 questions:

  1. Which PHP version and build is serving my site?
  2. Does it include the fixes for CVE-2026-109618 and CVE-2026-109619?
  3. Were PHP workers restarted after the update?
  4. Have you seen any signs of compromise on my account?

VPS or your own server

Install the updated PHP packages from your Linux distribution, panel vendor or PHP repository, then restart PHP-FPM, Apache or LiteSpeed. Tenable's php2shell FAQ explains why: "Installing updated PHP packages does not patch PHP processes that are already running." CloudLinux and Hostinger give the same instruction.

PHP 8.1 and older

php.net says 8.1 and older "no longer receive updates from the PHP project." It published only minimal source patches for 7.4, 8.0 and 8.1, and some vendors offer backported packages. CISA's advice is to take systems on PHP 8.1 or earlier offline until they are patched or updated. The real fix is moving to a supported version. Our guide on how to update the PHP version in WordPress walks through it, and if you're on 8.2, read what PHP 8.2 end of life means before you pick a version.

For your developer or host: check the PHP that serves web requests (phpinfo on the domain), not only php -v. On backported builds, look for both CVE IDs in the package changelog. Restart every PHP worker after updating. Until the next bugfix release, php.net recommends session.upload_progress.enabled=0 in php.ini or the FPM pool, not ini_set() or .user.ini. If PHP-FPM children crash on 8.4.27 or 8.5.12, the WordPress hosting handbook describes a SimpleXML regression and says not to downgrade.

Interim mitigations, and why they are not enough

If a server truly can't be updated today, the PHP advisory lists settings that "reduce exposure to specific attack paths but do not make an installation safe":

  • memory_limit=-1, set where applications can't override it, plus a container or cgroup memory limit
  • A conservative post_max_size (8M without file uploads, 32M with them) and request size limits at the web server or proxy
  • session.upload_progress.enabled=0, then a restart of every worker
  • On PHP 8.5, fatal_error_backtraces=0, then a restart of every worker

Why they fall short:

  • They block some paths, not the bug. The flaws stay in the code until PHP is updated.
  • Most site owners can't apply them. They belong at the server or pool level, so on shared hosting they're your host's job.
  • Firewalls only help partly. CISA says a web application firewall may give some protection until systems are patched. CloudLinux calls its Imunify360 rules "an interim mitigation, not a fix" and says no rule blocks the out-of-memory path of CVE-2026-109618 yet.

How to tell if your site was hit

Patching closes the door, but it doesn't remove anyone who got in first. CISA's catalog entries ask federal agencies to complete forensic triage, not just patch. For your site, run a short check:

  1. Ask your host. CISA tells admins to monitor for PHP worker processes launching shells or downloading tools. You can't see that on shared hosting, but your host can.
  2. Run your host's malware scan. On Hostinger, it's Malware Scanner in the website dashboard sidebar.
  3. Check your users. In WordPress, go to Users and filter by Administrator. Any account you don't recognize is a red flag. WordPress.org's hacked site guide lists new users nobody authorized as a clear sign of a hack.
  4. Look for new or changed files. WordPress's hardening guide says attacks "always leave traces" and suggests watching for changed and added .php files. A .php file inside wp-content/uploads, a folder meant for images and PDFs, deserves a close look, as do recent changes to .htaccess or your theme's header.php and functions.php.

If you find something, don't just delete the file. Make sure PHP is patched, then restore a clean backup from before the problem started, with your host's help if needed. Then change every password: WordPress admins, hosting, FTP or SFTP and the database. WordPress.org also recommends new secret keys in wp-config.php, which logs everyone out.

What to do next

Today, check your PHP version and get your host's written confirmation. This week, run a malware scan and review your admin users. If you're on 8.2 or older, plan the move to a newer branch before December 31.

If you don't have a developer, we build and maintain WordPress and Laravel sites and can handle the check and the update. Or send us your site for a free 2 minute video audit showing the 3 fixes we'd make first.

Common questions

What is php2shell?

php2shell is the nickname for CVE-2026-109618 and CVE-2026-109619, 2 critical flaws in PHP fixed on October 21, 2026. Both are rated 9.2 out of 10 and can let an attacker run code on a web server without logging in. The fixed releases are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35.

Is my WordPress site affected by php2shell?

If it runs on PHP that hasn't been patched since October 21, 2026, yes. The flaws are in PHP, not WordPress, so every PHP site is affected the same way. Check your PHP version in Site Health under the Info tab, then ask your host to confirm in writing that your PHP build includes both fixes.

My PHP version looks older than the fixed one. Am I still exposed?

Not necessarily. Some hosts and Linux distributions add the fix to the version they already run, so the number doesn't change. Hostinger says a PHP build date of October 21, 2026 or later means the fix is in place. To be sure, ask your host which build serves your site and whether it includes both fixes.

Will a security plugin or firewall protect my site from php2shell?

Only partly. PHP says that in the highest-risk setup, the attack can trigger before any application code runs, and a WordPress security plugin is application code. Server firewalls can block known attack patterns, and CISA says they may give some protection until you patch. Updating PHP is the only complete fix.

Do I need to update WordPress plugins to fix php2shell?

No. Plugin updates don't fix it, because the flaws are in PHP itself. Keep plugins updated anyway, since they get their own security fixes. The php2shell fix comes from updating PHP to a fixed release or a patched build. If you're on PHP 8.1 or older, you'll also need to move to a supported PHP version.

Get your free video audit

The 3 fixes we'd make first on your site, within 1 business day.

Send my website
Free video auditWhatsApp