Short answer: If your website runs on PHP (most WordPress, Drupal, Joomla and Magento sites do), ask whoever looks after it to update PHP today and restart it, then check the server for signs of a break-in. Switching the site off is only needed if it can’t be updated or protected today.
In plain English
What happened
On 21 October 2026, the people who maintain PHP released urgent fixes for two flaws that let an attacker take control of a website’s server without a password. Attacks have already been seen.
Are you affected?
Probably, if your website or web app runs on PHP. Your website’s login and plugins don’t protect you, because the attack happens before your website’s own code runs.
What to do today
Send the questions below to your developer, agency or hosting provider, and get a written answer. If you manage the server yourself, go straight to the steps for IT teams.
Questions to send your developer or host
- Do our website and any other systems we run use PHP?
- Has PHP been updated to a fixed version, and were the PHP services restarted afterwards?
- Have you checked our server for signs of a break-in since 17 October?
- If it can’t be updated today, how are you protecting it until it can?
Should we switch the website off? Only if it can’t be fixed today. If your provider can update it today, there’s no need: updating is the fix. If it can’t be updated and it’s open to the internet, limiting who can reach it or taking it offline for now is reasonable, and it’s what the UK’s national cyber security agency advises. Australia’s ASD has not told organisations to shut down.
What’s affected
The PHP project rates both flaws 9.2 out of 10. Both allow remote code execution with no authentication, and the attack can be triggered before any application code runs.
- CVE-2026-109618: an out-of-memory condition mid-request can leave memory corrupted, and a crafted upload request can use that to run code.
- CVE-2026-109619: state from a crashed request can survive in a worker, and a later request handled by the same worker can use it to run code.
In scope: any PHP installation that serves web requests: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. The PHP project considers mod_php the highest risk. The advisories don’t say whether PHP run only from the command line (CLI) is affected, so don’t assume it isn’t.
Researchers have shown working exploits against Apache with default PHP settings, and against WordPress, Drupal, Joomla and Magento sites.
Australian context: ASD’s ACSC issued a critical alert on 21 October, before the fixes were public. As reported, it said all versions from PHP 5 onwards may be affected, and advised organisations to find where they run PHP, follow PHP’s official guidance, prepare to patch, and watch PHP systems for malicious activity. cyber.gov.au and several other government sites were briefly unavailable on 21–22 October while mitigation work was carried out.
Fixed versions
Check the version the web server actually runs (a phpinfo() page or your package manager), not only php -v: the command line and the web server can use different PHP builds.
| PHP branch | Fixed in | What to do |
|---|---|---|
| 8.5 | 8.5.12 | Update and restart workers |
| 8.4 | 8.4.27 | Update and restart workers |
| 8.3 | 8.3.36 | Update and restart workers |
| 8.2 | 8.2.35 | Update and restart workers |
| 8.1, 8.0, 7.4 | No official release (out of support) | Install your Linux distribution’s or LTS vendor’s patched package, apply PHP’s source backport if you build from source, or move to a supported branch |
| 7.3 and older, including PHP 5 | No fix | Move to a supported branch; until then, restrict access (see below) |
A known side effect: PHP 8.4.27 and 8.5.12 can crash some applications that use SimpleXML, because of an unrelated fix in the same release. A correction has been merged but, as of 26 October, not released. Update anyway, and test SimpleXML-heavy applications after updating.
Distribution packages often keep the old version number and add the fix as a backport, so a Debian, Ubuntu or Red Hat package can be patched while still showing an older version. Check your distribution’s security notice for these two CVE numbers rather than comparing version strings. Ubuntu has published updated packages; check your own distribution’s tracker for its status.
PHP bundled inside an appliance, a hosting control panel or a vendor product is patched by that vendor, not by you. Ask them.
What to do now, in order
- Find every PHP system. Start with anything reachable from the internet: websites, CMS sites, admin portals, APIs, and appliances or hosted services that run PHP behind the scenes. Include the forgotten ones: old staging sites, marketing microsites, test servers.
- Update. Install the fixed release for your branch, or your distribution’s patched package.
- Restart every PHP worker. PHP-FPM pools, Apache with mod_php, LiteSpeed. Running workers keep the old code in memory until they restart, so an update without a restart has not fixed anything.
- Confirm. Check the version after the restart on every server behind a load balancer and in every container image. Rebuild and redeploy images built on an old PHP base image.
- Check for compromise (below). Exploitation started before the fixes were public.
- Ask your suppliers. For hosted platforms, managed WordPress, SaaS and appliances, ask the provider whether they have patched, and get the answer in writing.
If you can’t patch today
The PHP project’s position, as reported by watchTowr and NCSC-NL, is that no configuration change fully mitigates these flaws. The measures below reduce exposure; they do not make a server safe.
| Measure | What it does | Limit |
|---|---|---|
session.upload_progress.enabled = Off, then restart workers | One of the PHP project’s suggested temporary measures | Partial mitigation only |
memory_limit = -1, enforced so applications can’t override it, with a container or cgroup memory limit as the outer boundary; cap request size at the web server | Removes the attacker-triggered memory failure behind CVE-2026-109618 (Red Hat’s guidance) | Reduces but doesn’t remove the flaw. Without an outer memory limit, one request can use all the server’s memory |
PHP 8.5 only: turn off fatal_error_backtraces | Exploitation of CVE-2026-109619 has been confirmed with it on | Narrow; doesn’t address CVE-2026-109618 |
| WAF rules (Cloudflare has published some, including on free plans) | Blocks known exploit requests | Known patterns only; Cloudflare calls its rules a stopgap. No help if attackers can reach the origin server directly |
Block multipart/form-data requests | Blocks the upload path | Breaks every file upload and many forms |
| Restrict network access (VPN, IP allowlist, take off the internet) | Stops untrusted users reaching PHP at all | The only stopgap that removes the attack path; the service is unavailable to the public |
Two false comforts: hiding the PHP version (expose_php = Off) or renaming .php files is obscurity, not protection. And an application login doesn’t help, because the attack runs before the application does.
Is shutting down a service extreme?
As a first response, yes. As a fallback for a server you can’t fix, no. For most systems, updating and restarting causes less disruption than a shutdown. For an internet-facing server that can’t be updated or mitigated quickly, taking it offline is proportionate, and several national agencies advise it.
| Agency | Advice on shutting down |
|---|---|
| ASD’s ACSC (Australia) | Doesn’t mention it, as reported. Its alert was issued before the fixes were out and focused on finding PHP, preparing to patch and monitoring |
| NCSC (UK) | If you can’t apply the temporary mitigations, or they would take too long, consider taking the system offline until it is fully mitigated |
| CERT-EU | Where patching isn’t feasible, consider isolating internet-facing applications from public networks |
| CCB (Belgium) | Advisory headline: patch immediately or take offline |
Several European public bodies took services offline as a precaution, including Finland’s state IT provider and France’s Interior Ministry for some local government sites.
A middle path is usually available: restrict access rather than switch off. Put admin sites behind a VPN, allowlist known IP addresses, or serve a static maintenance page from a server without PHP.
- Can you update and restart now? Do that. Don’t shut down.
- Can’t update today, but the system is internal or can be limited to known users? Restrict it, apply the partial measures, and update as soon as you can.
- Internet-facing, must stay public, and can’t be updated today (including PHP 7.3 and older)? Take it offline or put a static page in front until it is fixed or replaced.
Check for compromise
Patching stops new attacks. It doesn’t remove anything an attacker already left behind, and exploitation began before the fixes were public. The UK NCSC advises checking for compromise and looking for backdoors.
- Look for PHP files created or changed since mid-October that you didn’t deploy, especially in upload, cache and plugin directories.
- Look for new admin users, scheduled tasks or cron jobs, and unexpected outbound connections from web servers.
- Review web server logs for unusual POST and upload requests from 17 October onwards.
- Rotate credentials the server could read: database passwords, API keys, cloud access keys.
- If a server shows signs of probing, capture the PHP worker processes’ memory before restarting them if you can: a restart erases that evidence (Google Cloud’s guidance, as reported by Tenable).
- If you find anything, treat it as an incident: preserve logs and disk images before cleaning up, and rebuild from a known-good source rather than deleting files one at a time. In Australia, report it to ASD at cyber.gov.au.
None of the official advisories reviewed here list indicators of compromise. Treat lists from unverified sources with caution.
What’s still unknown
- Whether the PHP command line (CLI) is affected isn’t stated in the advisories reviewed.
- How reliable the public exploit code is across different setups. Early on, SANS said it didn’t appear reliable; since then, Trail of Bits has said its exploits work against unpatched PHP 8.2 to 8.5, and a researcher reported break-ins on test servers running PHP 8.4.26 on 24 October.
- The scale of exploitation. Reports come from security vendors (watchTowr, Cloudflare, Hadrian, Amazon). On 26 October, CISA added both CVEs to its Known Exploited Vulnerabilities catalogue, confirming active exploitation.
- Which vendor products bundle vulnerable PHP. NCSC-NL keeps an inventory.
This guidance will change. Check the PHP project and ASD for updates before acting on any figure here.
Sources
- ASD’s ACSC: Critical vulnerabilities in PHP
- PHP: security release
- NCSC (UK): Critical security issue affecting PHP
- NCSC-NL: php2shell operational information
- CCB (Belgium): advisory
- SANS Internet Storm Center
- watchTowr: PHP2Shell FAQ
- Help Net Security: PHP2Shell patched
- iTnews: Critical flaws strike PHP as disclosure embargo is broken
- Tenable: php2shell FAQ (updated with dated developments)
- Red Hat: RHSB-2026-013 mitigations
- The Hacker News: CISA adds PHP2Shell to KEV
- ABC News: Australian government sites exposed
- The Mandarin: ASD alert
- Australian Cyber Security Magazine: ACSC warning
See also AWS security and A minimum AWS security baseline for startups.
Keep reading
Related articles
Next step
Not sure whether you’re exposed?
On a 30-minute call we’ll help you work out where you run PHP and what to fix first.