PHP2Shell: find, fix, hunt, prevent
Practical guidance for UK organisations on PHP2Shell (CVE-2026-109618, CVE-2026-109619). Find every PHP runtime, patch it, hunt for compromise.
PDF, 30 pages, 414 KB. Version 1.0, 24 October 2026. TLP:CLEAR, free to share with attribution.
On 21 October 2026 the PHP project fixed two critical flaws, CVE-2026-109618 and CVE-2026-109619, known as PHP2Shell. Until it is patched, any system running PHP that serves web requests can be taken over by an attacker without a password. That includes firewalls, VPN gateways, storage and monitoring appliances, not just websites.
Our free guide sets out how to find every PHP runtime, patch it and prove the fix is running, hunt for compromise, and govern the response. This page summarises it. The full guide has the commands, checklists and templates.
The situation is described as of 24 October 2026. Vendor advisories change daily, so check them for the latest status.
Key facts
- Severity: both flaws are rated 9.2 under CVSS v4.0. The 10.0 that circulated on 20 October was wrong.
- What an attacker gets: their own code running on the server with the web service’s privileges. The researchers also report that the flaws can leak memory, which may hold passwords, API keys, session tokens and certificates.
- Fixed releases: PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12, or a vendor package carrying the same patch. There is no php.net release for PHP 8.1 and older.
- How long it has been there: the vulnerable code is present in every PHP release since 5.4.0 in 2012.
- Exploitation: the first recorded attempt was on 17 October, four days before disclosure.
- Your application is not the fix: updating WordPress, Drupal or Laravel does not help. The flaw is in PHP underneath it.
- Appliances need vendor fixes: PHP is built into many products’ web management interfaces. Those fixes come from the vendor, not from a PHP upgrade you can run yourself.
The UK’s NCSC has told organisations to find every PHP installation, patch internet-facing systems first, and consider taking systems offline if they cannot be fixed or mitigated quickly.
What to do first
- Find every PHP runtime, including the ones inside firewalls, VPN gateways, NAS, monitoring tools and services your suppliers run for you.
- Patch internet-facing systems first, then anything that holds credentials or reaches many networks, then the rest. The guide’s view is that no system should be left longer than 14 days.
- Prove the fix is running, not just installed. Services have to be restarted properly, and version strings can mislead.
- Take offline or restrict access to anything you cannot patch or mitigate quickly.
- Check for compromise on every system exposed since 17 October, and keep the logs before you change anything.
- Ask your suppliers in writing whether they run PHP for you, and when the fix went live.
What’s in the guide
The guide is written for three audiences. Executives should read sections A and J and the executive checklist. IT managers should read D, H, I, J and K. Sysadmins and security teams should read B, C, E, F, G and H.
- A. Executive summary, with the decisions leadership needs to make this week
- B. Technical overview at a defensive level, with no exploitation detail
- C. Asset discovery and inventory, including why version strings mislead
- D. Prioritisation model, with target times for each tier
- E. Remediation for each way PHP is run, including containers and Windows
- F. Interim mitigations and compensating controls
- G. Compromise assessment
- H. Validation and testing
- I. Prevention
- J. Executive governance, including UK GDPR and NIS reporting duties
- K. Checklists for executives, IT managers and sysadmins, with supplier and staff notification templates
- L. References to the PHP project, the NCSC and vendor advisories
Facts in the guide carry a source and a date. Text marked JUDGEMENT is our professional view rather than a sourced fact.
About this guide
Version 1.0 was published on 24 October 2026, with the next review due on 31 October 2026 or sooner if the situation changes materially. It is classified TLP:CLEAR, so you may share it freely with attribution.
The guidance is provided in good faith and is not legal advice. Vendor and PHP project advisories take precedence over it. Test commands and configuration changes before you use them in production.