php2shell: How to Check if Your Business Is Exposed to the Critical PHP Vulnerabilities
[EZ-TOC]
Two critical PHP vulnerabilities were leaked online on 20 October 2026, before a fix was available. PHP released fixes on 21 October, and attackers are already trying to exploit them. If your organisation runs a website, customer portal or business application built on PHP, you need to know which versions you run and be ready to patch today. The UK’s National Cyber Security Centre has urged organisations to update or take PHP offline.
PHP sits underneath roughly three-quarters of websites whose server language is known, including WordPress, Drupal, Joomla and Magento. A flaw in PHP’s core, rather than a single plugin, could expose far more systems. It also means many will find PHP in places they did not know about.
This guide explains how to check whether you are affected and what to do if you are running a PHP version that may not get a fix.
What are CVE-2026-109618 and CVE-2026-109619?
They are two remote code execution (RCE) vulnerabilities in PHP’s core, both rated critical with a CVSS v4.0 score of 9.2 by the PHP security team. Remote code execution means an attacker could run commands on your web server, which may lead to data theft, ransomware, or using the server to attack others.
The timeline so far:
| Date | What happened |
| 21 Oct 2026 | Linux distributions and package maintainers began shipping patched builds, including backports for older versions |
| 21 Oct 2026, 14:00 UTC | PHP released fixes in 8.5.12, 8.4.27, 8.3.36 and 8.2.35 |
| 21 Oct 2026 | Cloudflare, Patchstack and others reported exploitation attempts before the patch shipped |
| 20 Oct 2026 | PHP published advance notice of two critical fixes; watchTowr confirmed the bugs |
Attackers are already trying to use these flaws. Several security firms saw exploitation attempts before the patches were released, and watchTowr said that although none had succeeded yet, it did not expect that to last. Both bugs are memory-handling errors in PHP’s core, so updating PHP is the only full fix.
Every PHP version before 8.2.35, 8.3.36, 8.4.27 and 8.5.12 is affected. PHP is urging all users to update immediately.
| Your PHP branch | Update to at least |
| 8.5 | 8.5.12 |
| 8.4 | 8.4.27 |
| 8.3 | 8.3.36 |
| 8.2 | 8.2.35 |
| 8.1 and older | No official release; see the end-of-life section below |
Sources: Huntress, Help Net Security, SecurityWeek, AlmaLinux
Who is exposed?
Every PHP installation that serves web requests is affected unless it runs a patched version. That includes PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. Apache with mod_php is the highest risk, because a single unauthenticated request can trigger the attack before any website code runs.
The obvious places to look are easy to find; the risk usually sits in the ones nobody remembers.
| Where PHP is installed | Why it may get missed |
| WordPress, Drupal, Joomla and Magento sites | Managed by marketing or an agency, not IT |
| Shared hosting and control panels (cPanel, Plesk) | PHP version set by the host, often years old |
| Customer portals and booking systems | Built once by a contractor, rarely updated |
| Vendor appliances and Windows software | Bundle their own copy of php.exe or php-cgi.exe without advertising it |
| Old staging, test or campaign microsites | Forgotten but still online |
How to check your PHP version
The quickest method depends on how much access you have. Pick whichever applies:
- On the server (command line): run php -v. The first line shows the version, for example, PHP 8.3.x. If a server runs several versions, also check what the web server actually uses, as it can differ from the command-line version.
- Hosting control panel: in cPanel, look for “Select PHP Version” or “MultiPHP Manager”. In Plesk, open the domain’s “PHP Settings”. Note the version for every domain, not just the main site.
- WordPress: go to Tools → Site Health → Info → Server. The PHP version is listed there.
- Ask your provider: if an agency or host manages the site, email them today and ask for the PHP version of every site and service they run for you, and when they will apply the fix.
Avoid uploading a phpinfo() page to a live site to check. If you must use one, delete it immediately afterwards, because it publishes detailed configuration information to anyone who finds it.
If you are not sure what you have exposed, an external vulnerability scan will identify internet-facing services, including PHP running on systems you may have forgotten.
Is my WordPress site affected?
Potentially. WordPress runs on PHP, so if the PHP version underneath your site is affected, keeping WordPress and its plugins up to date will not protect you on its own. Your server or hosting provider needs to update PHP.
What to do:
- Check your PHP version under Tools > Site Health > Info > Server.
- Make sure it is at least 8.2.35, 8.3.36, 8.4.27 or 8.5.12, depending on your branch.
- If you use managed WordPress hosting, check your host’s status page or contact support to confirm they are patching.
- If you are on an old PHP version because a plugin or theme “needs” it, treat that as a risk to fix now, not later.
Running PHP 8.1 or older?
PHP 8.1 and earlier are end-of-life, so there is no official PHP release that fixes php2shell for them. However, PHP did publish minimal source fixes for 7.4, 8.0 and 8.1, and some package maintainers have built them into updates. For example, sury.org has shipped patched packages for Debian and Ubuntu going back to PHP 5.6, and AlmaLinux has patched every PHP stream it ships.
Check with your hosting provider or Linux distribution whether a backported update is available for your version, and apply it today if so. A backport closes this hole, but you are still running software that will miss future fixes.
If that is you, your options in order of preference are:
- Upgrade to a supported PHP version. Test the site on a staging copy first, as older code and plugins can break.
- Take it offline if the system is no longer needed. Old microsites and test environments are common culprits.
- Restrict access by putting the system behind a VPN or a web application firewall (WAF) until you can upgrade. This reduces risk but is a stopgap, not a fix.
Some Linux distributions and hosting providers backport security fixes to older PHP packages. Check with yours, but do not assume it.
Your php2shell action checklist
Work through these in order, starting with internet-facing systems.
- List every system that runs PHP, including vendor software and old microsites
- Record the PHP version for each one
- Update to PHP 8.2.35, 8.3.36, 8.4.27 or 8.5.12 (or your provider’s backport), then restart PHP-FPM or Apache and confirm the new version is running
- Upgrade, remove or restrict any end-of-life PHP systems
- Ask your web agency and hosting provider to confirm in writing that they have patched
- Ask your IT or security team to watch for unusual activity from web servers, such as PHP launching command shells or download tools
- If you see signs of compromise, isolate the server, keep the logs, and get specialist help before rebuilding
How Sencode can help
You cannot patch what you do not know you are running. php2shell reminds you that the biggest risk is often the forgotten system, not the main website.
Sencode is a CREST-accredited penetration testing company. We can help in two ways:
- External vulnerability scanning finds your internet-facing systems, including outdated PHP, so you know what to patch first.
- Web application penetration testing goes further, with our testers checking how an attacker could actually break into your applications and what they could reach.
A note for charities
Charities are often more exposed to issues like php2shell than they realise. Volunteers or small agencies often build websites, run them on low-cost shared hosting, and leave them on old PHP versions for years.
The checks above apply equally to you. If you are unsure where to start, Sencode offers free attack surface reviews to charities in the North East, plus 20% off any Sencode service for charities across the UK.
php2shell is the nickname researchers have given to two critical PHP vulnerabilities, CVE-2026-109618 and CVE-2026-109619. Both allow remote code execution and were leaked online before a patch was available.
Every version before 8.2.35, 8.3.36, 8.4.27 and 8.5.12 is affected. Any PHP installation that serves web requests should be updated.
Yes. Several security firms reported exploitation attempts even before the patches were released. Update as soon as possible.
No. The flaws are in PHP itself, so you or your hosting provider must apply the fix to PHP on your server.
PHP has no official release for these versions, but some hosts and Linux distributions have shipped backported fixes. Apply one if it is available. Otherwise, restrict access or take the system offline until you can move to a supported version.

