
PHP2Shell is two critical flaws in the PHP runtime that let attackers take over unpatched web servers without logging in. Attacks started before the 21 October 2026 fix, and the UK’s Office for Budget Responsibility pulled its website. For most leadership teams, the hard part is finding the PHP servers nobody has checked.
What Is PHP2Shell? The Five-Point CTO Briefing
- What broke: CVE-2026-109618 and CVE-2026-109619, each rated 9.2 (critical) under CVSS v4.0.
- Who is exposed: Any server where PHP handles web requests, including WordPress, Drupal and Magento sites, intranets and vendor appliances.
- How to fix it: Upgrade to PHP 8.2.35, 8.3.36, 8.4.27 or 8.5.12. PHP 8.1 and older get no official patch.
- How urgent it is: Cloudflare logged millions of exploit attempts after disclosure, and the NSA told organisations that can’t patch to take PHP systems offline.
- What to do first: Inventory every PHP binary, including containers and vendor appliances, and patch internet-facing systems before internal ones.
What Is PHP, and Why Is Your Business Probably Running It?
PHP is a server-side scripting language that builds each page before it reaches the browser. It powers WordPress, Drupal, Joomla and Magento, and through them a large share of corporate sites, online shops and public-sector portals.
Most organisations run more PHP than their records show. It arrives through acquisitions, marketing agencies and third-party products, so it rarely appears in architecture diagrams. When the supplier who built a system moves on, knowledge of what runs underneath usually leaves too, which is why UK firms often pay three times for the same platform.
PHP2Shell affects all five common ways of serving PHP, and each has its own patching trap:
| Execution Mode | Typical Setting | Patching Detail to Watch |
| Apache with mod_php | Traditional Apache servers | Highest risk, because the flaw can trigger before any application code runs. Restart Apache after upgrading. |
| PHP-FPM | Nginx and modern hosting stacks | Restart every FPM pool after upgrading, or old workers keep serving requests. |
| php-cgi | Older CGI-based deployments | Common on legacy hosts that asset inventories miss. |
| FrankenPHP | Containerised application servers | PHP is bundled inside FrankenPHP, so upgrade FrankenPHP itself. |
| LiteSpeed | Shared and managed hosting | Runs its own lsphp builds, which update separately from the system PHP. |
PHP2Shell at a Glance: The Two Flaws Explained
CVE-2026-109618: Memory Corruption Under Pressure
When a request pushes PHP past its memory limit, PHP can leave that request’s memory half set up. Wiz traced the attack path to session upload progress, a feature PHP enables by default. A related bug can leak worker memory to an attacker.
CVE-2026-109619: Memory That Should Be Gone
PHP’s internal state can keep pointing at request memory after that memory is freed, a flaw known as use-after-free. An attacker who controls what refills that memory can steer what PHP does next.
What This Means for Your Servers
- Access needed: None. The attacker doesn’t need an account or password.
- Control gained: Code runs with the same permissions as the web server.
- Proven targets: Wiz demonstrated working attacks against WordPress, Drupal and Joomla.
The CERT-EU advisory has the full technical detail for security teams.
Why Your Application Security Can’t Stop a Runtime Flaw
Most critical vulnerabilities live in one product, so teams scope them by checking whether that product is installed. PHP2Shell breaks the memory and error handling that nearly every PHP request passes through, so even a fully hardened WordPress site inherits the flaw from the interpreter underneath.
How common defences hold up:
| Defence Layer | Stops PHP2Shell? | Why |
| CMS plugins and framework input checks | No | They run on top of the vulnerable runtime |
| Cloud and CDN edge filters | Partly | Emergency rules from providers block known attack patterns while you patch |
| Taking systems offline | Yes, temporarily | The NSA’s advice for any system that can’t be patched straight away |
| Patched PHP runtime | Yes | The only complete fix |
Exposure follows the PHP binary. Your inventory has to start there, whatever applications run on top.
PHP2Shell Timeline: From a 2024 Audit to Live Attacks
PHP2Shell took two years to surface and less than a week to go global.
- 2024: Quarkslab ran PHP’s first external security audit in years, funded by Germany’s Sovereign Tech Agency. It flagged early signs of the memory flaw, but no working attack was found and the issue stayed open.
- August 2026: A researcher at security firm Calif turned the flaw into a working exploit with help from an OpenAI model, according to the Wall Street Journal.
- 20 October: The PHP team scheduled an emergency release for 14:00 UTC the next day. Both CVE numbers had already leaked on Hacker News.
- 21 October, 07:34 UTC: Hosting partners reported active attacks to Patchstack, more than six hours before the scheduled fix.
- 21 October: Chainguard published patch details six hours early and broke the embargo, according to the PHP Foundation. The patches shipped later that day.
- 21 to 23 October: French prefecture websites and the UK’s Office for Budget Responsibility went offline. Cloudflare recorded millions of exploit attempts.
The PHP Foundation later called the two-year delay “a structural failure”. The lesson for CTOs is that every security finding marked “theoretical” needs an owner and a review date.
Why PHP2Shell Sent Governments and Enterprises Offline
One Runtime, Thousands of Products
A product flaw affects that product’s customers. A runtime flaw affects everything built on the runtime. That is why Singapore’s Cyber Security Agency told organisations to check their web servers even where their main websites don’t use PHP.
Your move: Ask every vendor whose product handles web traffic whether it bundles PHP, which version it runs, and when it will be patched.

Leaks Moved the Deadline Forward
With every leak, attackers had less work to do to rebuild the exploit. For defenders, the real patch window opened at the first credible leak, well before the official release.
Your move: Subscribe to the PHP announcements list and your national CERT alerts. In the UK, that means the NCSC. Also agree on an emergency change process in advance, so a critical patch can go live within hours.
AI Turns Small Weaknesses Into Attack Chains
Security experts warned that AI bots can chain several low-severity weaknesses together with a critical flaw like PHP2Shell. A backlog of “medium” findings on internet-facing systems now carries more risk than its scores suggest.
Your move: Re-review open medium- and low-severity findings on any public PHP system, starting with those that touch authentication or file uploads. A Deployflow test of Prowler on AWS found the same pattern: after a 40% drop in total findings, the real risk sat in the few left on exposed systems.
PHP2Shell vs Log4Shell: Is This the Same Crisis Again?
Security researchers have compared PHP2Shell to Log4Shell, the December 2021 Java flaw that set off a global security scramble. Both share the same severity level and lack login barriers. They differ in how hard they are to find and fix.

The benchmark to set: Easier discovery takes away the excuse for slow patching. Patch or isolate every internet-facing PHP system within 72 hours of the release. A system still exposed after a week points to a process gap that will show up again with the next runtime flaw.
Your 72-Hour PHP2Shell Response Plan
Run the response in three phases. Each phase ends with an exit check, so leadership knows when the team can move on.
Hours 0 to 24: Find and Contain
- Build one list. Record every PHP binary across servers, containers, base images and vendor appliances, including intranets and staging. Give each entry an owner, a version and a status.
- Patch in order of risk. Start with internet-facing Apache servers running mod_php, then other public systems, then internal ones.
- Take unpatched systems offline. Follow the NSA’s advice for anything that can’t be fixed today.
Exit check: Every internet-facing PHP system is patched or offline.

Hours 24 to 48: Prove the Fix Works
- Replace running containers. A patched base image in the registry protects nothing until you redeploy every container built from the old one.
- Confirm live versions. Package lists show what is installed, so check the version each live host actually serves.
- Scan from the outside. Run an external scan of public IP ranges to catch PHP hosts the inventory missed.
Exit check: Every entry on the list shows a fixed version confirmed on the live host.
Teams with automated pipelines can finish this phase in hours. If older applications have no pipeline, this guide to [CI/CD for legacy codebases](URL: Deployflow blog, CI/CD for legacy codebases) shows where to start.
Hours 48 to 72: Assume Compromise
Attacks began before the fix shipped, so an attacker may have already breached a patched server. Check every exposed host using the five checks in the graphic below. Before cleaning anything, preserve web server and system logs, because investigators and regulators may need them later.

Next, rotate every credential the web server can reach, including database passwords and API keys. The NSA warned that the flaw could give attackers a direct path to databases. Finally, record which systems surfaced late, and why. That list should set next quarter’s priorities.
Exit check: Every exposed host is cleared or isolated, and all reachable credentials are rotated.
Teams that follow [SRE incident practices](URL: Deployflow blog, SRE vs DevOps) will find this phase quicker to run and easier to audit. For hands-on support, Deployflow’s [DevOps services](URL: Deployflow DevOps Services page) cover patch rollout, image rebuilds and runtime checks.
Still Running PHP 8.1 or Older? Your Three Options
PHP 8.1 and older branches are out of official support, so the PHP project will not patch them. The right choice depends on who maintains the system and how soon it can change.
| Option | Choose It When | Watch Out For |
| Vendor backport | Your Linux distribution or platform vendor offers extended PHP support | Confirm the vendor has shipped PHP2Shell fixes for your exact build |
| Migrate | The application is still maintained and has decent test coverage | Outdated extensions and frameworks often break on newer branches |
| Isolate | Migration will take weeks or months | Isolation reduces exposure but leaves the flaw in place |
Plan one move: PHP 8.2 leaves security support on 31 December 2026. Teams migrating off 8.1 should aim straight for 8.4 or 8.5, so they don’t repeat the work within months.
PHP2Shell has turned deferred technical debt into a live security risk. A planned legacy modernisation programme lets you move old PHP applications on your schedule, before the next emergency sets it for you.
Four Questions Every Board Should Ask After PHP2Shell
PHP2Shell exposed a governance gap that reaches well beyond PHP. Put these four questions to your leadership team and compare the answers with what good looks like.
Does our software bill of materials list runtimes and interpreters? Good answer: Yes. It records the PHP, Java, Python and Node.js versions on every production host and container image.
How fast can we rebuild and redeploy every production image? Good answer: Within a day, through automated pipelines with no manual steps.
Who owns patch deadlines for foundational components? Good answer: A named owner for each runtime, with a written deadline for critical fixes on internet-facing systems.
Do we support the open-source projects our revenue depends on? Good answer: Yes, through a set sponsorship budget, engineering time or foundation membership.
Any “no” or “not sure” belongs on next quarter’s risk register.
Fix Today’s Exposure and Prepare for the Next One
PHP2Shell tested how quickly organisations could see and change their own infrastructure. If finding your PHP estate took days, the next runtime flaw will find the same gap. Pick the starting point that matches where you are:
Still not sure what’s exposed? Start with a DevSecOps health check. It assesses your pipelines, cloud posture and vulnerability handling, and gives you a prioritised fix list.
Running PHP 8.1 or older? Map a phased upgrade with Deployflow’s app modernisation team, keeping live services running throughout.
Want critical patches live within hours? See how CI/CD automation services turn image rebuilds and redeployments into one routine pipeline run.
PHP2Shell Frequently Asked Questions
Is PHP still safe to use after PHP2Shell?
Yes, PHP is safe to use when it runs a supported and fully patched version.
Every widely used language has critical flaws from time to time, and PHP’s security team shipped fixes the day after announcing this one. The bigger risk comes from versions that no longer receive updates. Each PHP branch now gets two years of active support, followed by two years of security fixes. PHP 8.2 reaches end of life on 31 December 2026. Teams on 8.2 should plan a move to 8.4 or 8.5 now, even after patching.
What is remote code execution?
Remote code execution (RCE) means an attacker can run their own commands on your server from anywhere on the internet.
It is one of the most serious vulnerabilities because it hands over control of the machine. With PHP2Shell, the attacker gets the same permissions as the web server process. From there, they can read configuration files, steal database credentials, plant hidden backdoors or move to other systems. Unauthenticated RCE, as in this case, is worse still. The attacker needs no account, password or prior access to begin.
What does a CVSS score of 9.2 mean?
A CVSS score of 9.2 means the flaw is rated critical, the highest severity band.
The Common Vulnerability Scoring System rates vulnerabilities from 0 to 10, and anything 9.0 and above is critical. The score reflects how easy the flaw is to exploit, whether it requires a login, and how much damage it could cause. PHP2Shell is scored under CVSS version 4.0, the latest edition of the standard. Treat the score as a starting point. Your exposure, such as internet-facing servers running mod_php, should determine what to patch first.
How do I update PHP on a Linux server?
Use the same package manager that installed PHP. On Ubuntu or Debian, run apt update followed by apt upgrade. On Red Hat-based systems, run dnf upgrade.
After the upgrade, restart PHP-FPM or Apache so the new version loads. Then confirm the running version with php -v.
Many teams install PHP from third-party repositories, which may release fixes on a different schedule from the operating system vendor. Check which repository each server uses before assuming a patch is ready. For containers, update the base image tag and redeploy.
Do I need to report a PHP2Shell compromise to the ICO?
You must report it to the Information Commissioner’s Office if attackers accessed personal data and the breach poses a risk to people’s rights and freedoms. Under UK GDPR, you have 72 hours from the moment your organisation becomes aware of the breach.
Patching a vulnerable server without evidence of access does not require a report. Keep a written record of your investigation either way. The ICO expects organisations to document all breaches, including those they decide not to report. Regulated firms may also have separate duties to notify bodies such as the FCA.

PHP2Shell is two critical flaws in the PHP runtime that let attackers take over unpatched...
read full article

AWS still holds the largest share of global cloud infrastructure spending: 26% in Q3 2026,...
read full article

Every current Claude model failed at once on 25 October 2026, the worst of five...
read full article

