On 21 October 2026 the NCSC told UK organisations to take immediate action on two critical PHP vulnerabilities, CVE-2026-109618 and CVE-2026-109619, known as PHP2Shell.
Both can allow unauthenticated remote code execution on web servers running PHP, and the NCSC says organisations using any version of PHP are affected.
Update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35 now. If you can't patch or apply the temporary mitigations, the NCSC advises considering taking the system offline until it's fixed.
PHP2Shell is the name given to two critical vulnerabilities in the core PHP runtime, the server-side scripting language behind a huge share of websites, content management systems, e-commerce platforms and web applications. Both are rated 9.2 under CVSS 4.0.
In plain terms, an attacker who can send HTTP requests to your PHP application may be able to run their own commands on the server without logging in. You can read the full NCSC alert here.
Three things make PHP2Shell more serious than a routine patch cycle:
It also reaches beyond websites. PHP is embedded in appliances, network devices, management interfaces and other vendor products, where you may not be able to update it yourself.
Every PHP installation that serves web requests is in scope, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. PHP considers the risk highest for mod_php, where exploitation can happen before your application code even runs.
| PHP branch | Vulnerable | Fixed in |
|---|---|---|
| 8.5 | Before 8.5.12 | 8.5.12 |
| 8.4 | Before 8.4.27 | 8.4.27 |
| 8.3 | Before 8.3.36 | 8.3.36 |
| 8.2 | Before 8.2.35 | 8.2.35 |
| 8.1 and older | All versions (end of life) | No official release. Minimal source backports for 7.4, 8.0 and 8.1, or distribution/LTS vendor packages |
If you're on PHP 8.1 or earlier, you're running an unsupported version. Given the severity, the PHP project has published minimal source backports for 7.4, 8.0 and 8.1, and some Linux distributions and LTS vendors backport fixes too. The NCSC's advice is still to move to a fully supported version.
Severity ratings can also vary by vendor. Red Hat, for example, rates CVE-2026-109618 as Important for standard RHEL deployments, which use PHP-FPM where exploitation is harder in practice. That isn't a reason to wait. Patch on your vendor's timeline and follow their advisory.
The NCSC recommends following vendor best practice and sets out these priority actions:
The hardest PHP to patch is the PHP you don't know about. It sits behind marketing websites, WordPress and Magento builds, customer portals, hosted SaaS platforms, firewalls and device management consoles. Ask your hosting provider, web agency and key software suppliers to confirm in writing that they've patched, and add PHP2Shell to your supplier assurance questions this week.
PHP's temporary mitigations reduce risk by tightening memory and request limits at the PHP and web server or proxy level. They're there to buy time until you can patch. Take the exact settings for your configuration from PHP's advisory, then schedule the upgrade.
For organisations working with the NHS or the MOD, how you respond is a compliance question as well as a security one.
As a CREST-accredited penetration testing provider, Periculo can help you find exposed PHP across your estate, confirm that patches and mitigations have actually taken effect, and test the web applications that sit on top. If you suspect a system has already been compromised, engage an NCSC-assured incident response provider first, then talk to us about validating your fixes.
PHP2Shell is the name for two critical vulnerabilities in the core PHP runtime, CVE-2026-109618 and CVE-2026-109619. Both are rated 9.2 (CVSS 4.0) and can allow an unauthenticated attacker to run code on a web server running PHP.
Which PHP versions fix CVE-2026-109618 and CVE-2026-109619?The fixes are in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP 8.1 and older are end of life and receive no official release, although the PHP project has published minimal source backports for 7.4, 8.0 and 8.1. The NCSC advises moving to a fully supported version.
Is PHP2Shell being exploited?Details of both vulnerabilities leaked online on 20 October 2026, before patches were available, and early attack activity was reported on 21 October. Assume exposed, unpatched PHP systems are being targeted.
What should we do if we cannot update PHP straight away?Apply the temporary mitigations published by PHP. If you cannot apply them, or it would take too long, the NCSC says you should consider taking the system offline until it is fixed, and check it for signs of compromise and backdoors before you remediate.
Does PHP2Shell affect Cyber Essentials?Yes, if PHP is in scope. Cyber Essentials requires critical and high-risk security updates to be installed within 14 days of release, and unsupported software must be removed or kept out of scope. Running PHP 8.1 or older, or leaving PHP2Shell unpatched beyond 14 days, would put certification at risk.
Are we affected if we do not host PHP ourselves?Possibly. PHP sits inside hosted websites, SaaS platforms, CMS and e-commerce tools, appliances and management interfaces. Ask your hosting provider and key suppliers to confirm they have patched, and monitor vendor advisories for products that bundle PHP.