//security advisory
PHP2Shell: Remote Code Execution in PHP
PHP2Shell is a pair of critical flaws in PHP itself, CVE-2026-109618 and CVE-2026-109619, that let an attacker run code on a web server by sending crafted requests, with no login and no bug in your application needed. Attacks began before the fix and are now widespread. Update PHP, restart it, and check your logs back to 17 October.
On this page
Are you affected by PHP2Shell?
Find the row that describes you. If PHP serves anything on the internet, assume you are affected until you have checked.
You run PHP websites or APIs on your own servers or containers
PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, LiteSpeed
Act nowUpdate to a fixed version today and restart every PHP process. Apache with mod_php is at the highest risk. Find your fixed version
You run PHP 8.1 or older
Including 7.x and 5.x
Act nowThese versions are affected and the PHP project will not release a fix. Install your vendor’s backported package if one exists, or upgrade to PHP 8.2 or later.
Your PHP runs on a managed host or platform
Shared hosting, cPanel, Plesk, App Engine, Laravel Cloud
Update neededConfirm with your provider that PHP is patched. Several platforms patched automatically, but custom images and containers must be rebuilt and redeployed by you. Platform status
You run products that bundle PHP
Appliances, control panels, Windows software with php-cgi.exe
Update neededAsk the vendor for a fixed build. The Dutch NCSC keeps a list of products that embed PHP. Attackers have already used PHP2Shell against internet-facing PAN-OS management interfaces.
Your site sits behind Cloudflare, Akamai or another firewall
A CDN or web application firewall in front of PHP
Update neededThese services now block known attacks automatically, which buys you time. They do not fix PHP, so update anyway. What each provider covers
You only use PHP on the command line
Scripts, Composer, cron jobs that do not serve web requests
Low riskPHP2Shell targets web requests. Separately, Windows CLI tools using cURL automatic response decompression can reach the Brotli flaw: install the 26 October -1 package rebuilds.
PHP on a developer laptop is mostly low risk. What to do there is in the device security checklist.
What to do
Work through these in order. Most teams can finish the first three today.
Find every PHP that serves web traffic
Include servers, container images, control panels and products that bundle PHP. Check the PHP that serves requests, not only the one on the command line: they are often different installs. How to checkUpdate to a fixed version
Install 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or your distribution’s patched package. Rebuild container images on a patched base image. Patched versionsRestart every PHP process
Restart PHP-FPM, Apache, and any long-running PHP workers such as queue workers or Laravel Octane. A process that started before the update keeps running the vulnerable code.If you cannot update today, reduce the exposure
Apply PHP’s temporary measures and update as soon as a package is available. They block the known attack paths, not all of them.Check for signs of compromise and rotate secrets
Exposed servers may already have been attacked, and one of the flaws can leak server memory. What to look for
Patched versions
The upstream PHP2Shell fixes remain 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Windows package guidance includes the 26 October Brotli rebuilds. Distribution entries identify the original fixes; check each vendor’s current package status. We rechecked Ubuntu, Debian, Red Hat, Amazon Linux, Alpine and Plesk on 5 November.
PHP releases
| Branch | Affected | Fixed in |
|---|---|---|
| 8.5 | 8.5.11 and earlier | 8.5.12 |
| 8.4 | 8.4.26 and earlier | 8.4.27 |
| 8.3 | 8.3.35 and earlier | 8.3.36 |
| 8.2 | 8.2.34 and earlier | 8.2.35 |
| 8.1 and older | All versions | No official release |
For PHP 7.4, 8.0 and 8.1, the PHP security team published minimal source backports for people who build PHP themselves, but no official releases. PHP 8.2 reaches end of life on 31 December 2026.
Operating systems and images
| Software | Fixed in | Source |
|---|---|---|
| Ubuntu 22.04, 24.04, 26.04, 26.10Ubuntu Pro also has fixes for 14.04, 16.04, 18.04 and 20.04. | php8.1 8.1.2-1ubuntu2.28, php8.3 8.3.6-0ubuntu0.24.04.13, php8.5 8.5.4-0ubuntu1.5, php8.5 8.5.9-0ubuntu2.1 | Ubuntu CVE tracker |
| Debian 13 trixie | php8.4 8.4.27-1~deb13u1 | DSA-6574-1 |
| Debian 12 bookworm | php8.2 8.2.35-1~deb12u1 | DLA-4848-1 |
| Amazon Linux 2023 and Amazon Linux 2 (PHP 8.2 Extra)php8.2 to php8.5 on Amazon Linux 2023, released 22 October. No fix is planned for Amazon Linux 2 core php or the AL2023 php8.1 package. | ALAS2023-2026-3301 to 3304, ALAS2PHP8.2-2026-015 | Amazon Linux security center |
| Debian testing and unstable | php8.4 8.4.27-1 | Debian security tracker |
| Remi’s repositoryIn remi-modular for Fedora 43 and later and Enterprise Linux. | 8.5.12, 8.4.27, 8.3.36 | Remi’s blog |
| Red Hat Enterprise Linux 8.10, 9.8 and 10.2RHSA-2026:87070, 87071, 87072, 87073, 87079, 87080 and 87151 cover the php streams on each release. Fixes for the EUS, AUS, E4S and TUS releases followed from 23 to 26 October. As of 5 November, the RHEL 9 php:8.4 module stream is still listed as affected. RHEL 7 is not affected by CVE-2026-109618; RHEL 7 ELS received a fix for CVE-2026-109619 in RHSA-2026:88693 on 23 October. RHEL 6 is out of support. | Seven RHSAs, 21 October | Red Hat CVE page |
| SUSE Linux Enterprise 15 SP7 and 16.0 | php8 8.3.36-150700.3.24.1 (15 SP7), php8 8.4.27-160000.1.1 (16.0) | SUSE CVE page |
| Fedora 43 to 46 | php 8.4.27-2 (Fedora 43), php 8.5.12-1 (Fedora 44 to 46) | Fedora updates |
| Alpine Linux 3.22 to 3.24 and edge3.22 has no php85 package. The 3.22 and 3.23 packages were built on 22 October. | php85 8.5.12, php84 8.4.27, php83 8.3.36, php82 8.2.35 (3.22) | Alpine packages |
| Ondřej Surý PPA (Ubuntu 22.04 and 24.04)Also used by Laravel Forge. | 8.5.12, 8.4.27, 8.3.36, 8.2.35 | Launchpad |
| Homebrew | php 8.5.12, php@8.4 8.4.27, php@8.3 8.3.36, php@8.2 8.2.35 | Homebrew php formula |
| Arch Linux | php 8.5.12-1 | Arch package |
| Docker Official php imagePull again and rebuild. The RC1 tags do not contain the fix. | 8.5.12, 8.4.27, 8.3.36, 8.2.35 tags | docker-library/php #1694 |
| Windows builds (windows.php.net)26 October package rebuilds also fix Brotli CVE-2026-111497 through cURL response decompression. The PHP runtime version does not change; check the downloaded package build. | 8.5.12-1, 8.4.27-1, 8.3.36-1, 8.2.35-1 | PHP advisory |
Distributions often backport the fix without changing the PHP version number. Ubuntu 24.04’s fixed package is still PHP 8.3.6, for example. Check the package version, not only php -v.
Hosting platforms
| Platform | Fixed in | Source |
|---|---|---|
| cPanel EasyApache 4EA4 v25.91 also backports the fix to ea-php74, ea-php80 and ea-php81. | ea-php85 8.5.12, ea-php84 8.4.27, ea-php83 8.3.36, ea-php82 8.2.35 | EasyApache 4 changelog |
| Plesk Obsidian on Linux and WindowsOn Linux, PHP 7.4.33, 8.0.30 and 8.1.34 are fixed in builds dated 21 October with unchanged version numbers. Plesk’s own PHP engine is fixed in 18.0.80 Update 11 and 18.0.81 Update 4. | 8.5.12, 8.4.27, 8.3.36, 8.2.35 | Plesk support article |
| Google App Engine and Cloud RunApplies to the standard environment and to Cloud Run with automatic base image updates. Flexible environment and custom images must be redeployed. PHP 8.1 and older stay vulnerable. | PHP 8.2 and later, patched automatically | Google Cloud blog |
| Laravel VaporCustom and Docker runtimes must be rebuilt. | Native runtimes for PHP 8.3 and later | Laravel blog |
Not yet fixed
| Software | Status | Source |
|---|---|---|
| Amazon Linux 2 core php and Amazon Linux 2023 php8.1 | No fix planned. Move to a supported PHP package. | Amazon Linux security center |
| Red Hat Enterprise Linux 6 and some RHEL 9 packages | RHEL 6 is affected and out of support. As of 5 November, the RHEL 9 php:8.4 module stream is listed as affected with no fix available. | Red Hat CVE page |
Until a package arrives for these, apply the temporary measures. We could not confirm the status for Bitnami, AlmaLinux, Rocky Linux, AWS Lambda or Azure App Service from their own pages.
Check your version
The PHP that serves web requests can be a different install from the one on the command line, with its own version and settings. Check both.
On the server
php -v # the command-line PHP
php-fpm -v # may be named php-fpm8.3, php-fpm84 and so on
apachectl -M | grep -i php # any output means Apache loads mod_phpCompare the result with the fixed versions. If PHP came from your distribution, check the package changelog for the CVE numbers instead. A match means the fix is installed.
zgrep -E "CVE-2026-10961[89]" /usr/share/doc/php*-common/changelog.Debian.gzrpm -q --changelog php-common | grep -E "CVE-2026-10961[89]"Through the web server
To see the version and settings that live requests actually use, save this as a PHP file with a hard-to-guess name in your web root, open it once in a browser, then delete it.
<?php
echo PHP_SAPI, " ", PHP_VERSION, "\n";
echo "session.upload_progress.enabled=", var_export(ini_get("session.upload_progress.enabled"), true), "\n";
echo "memory_limit=", ini_get("memory_limit"), "\n";
echo "post_max_size=", ini_get("post_max_size"), "\n";The first line shows the server interface, for example fpm-fcgi or apache2handler for mod_php, and the version. The other lines show whether the temporary measures below are in effect. Do not leave the file in place or use a public phpinfo() page instead.
If you cannot update today
PHP is clear that there is no complete workaround: these measures block the attack paths that are known, not every variant. Use them until the update is installed, with one exception below.
Keep session upload progress off after updating
On 23 October PHP published an informational advisory for CVE-2026-115560, a separate session flaw that the 21 October releases do not fix. It needs an unusual setup: the application sets session.serialize_handler to php_binary or php_serialize, then switches it to php at runtime. PHP suggests setting session.upload_progress.enabled=0 until its next regular release, even after updating. Applications that never change the serializer at runtime can keep the feature on.
As of 5 November that release has not shipped. PHP has tagged 8.5.13 RC1 and 8.4.28 RC1 for testing only, and has not yet published the full advisory, so keep the setting in place. Cloudflare says its existing WAF rule covers known attempts against CVE-2026-115560, but only for sites that keep the default session.upload_progress.name.
Change three PHP settings
From PHP’s advisory. Turning off session upload progress blocks the confirmed paths for CVE-2026-109619. Removing PHP’s memory limit and capping request size reduces exposure to CVE-2026-109618. Set them in server configuration so applications cannot change them, then restart every PHP process.
PHP-FPMAdd to each pool file, for example /etc/php/8.3/fpm/pool.d/www.conf
php_admin_flag[session.upload_progress.enabled] = off
php_admin_value[memory_limit] = -1
php_admin_value[post_max_size] = 8MApache with mod_phpAdd to the server or virtual host configuration
php_admin_flag session.upload_progress.enabled off
php_admin_value memory_limit -1
php_admin_value post_max_size 8Mphp.iniFor other setups. Check that no pool or virtual host overrides it
session.upload_progress.enabled = 0
memory_limit = -1
post_max_size = 8M- Use
post_max_size = 32Mif your application accepts uploads, and keepupload_max_filesizebelow it. - On PHP 8.5, also set
fatal_error_backtracesto off the same way. - With no memory limit, a single request can use all the memory on the server. Cap memory with a container or cgroup limit instead. Do not use
RLIMIT_ASorRLIMIT_DATA: PHP says these can trigger the flaw. - Setting these with
ini_set()or a.user.inifile does not work.
We checked that each snippet takes effect, using the official PHP 8.4 images with PHP-FPM and Apache. We did not test them against the exploits.
Block file upload requests at the web server
The known attacks arrive as multipart form requests, the format browsers use for file uploads. If your site does not accept uploads, Sansec suggests rejecting them outright. This is not part of PHP’s advice, and it breaks every upload form and some checkout forms.
nginxInside the server block
if ($http_content_type ~* "multipart/form-data") { return 403; }ApacheInside the <Directory> block for your web root. Requires mod_rewrite
RewriteEngine On
RewriteCond %{HTTP:Content-Type} multipart/form-data [NC]
RewriteRule ^ - [F]In our tests, both rules returned 403 for upload requests, including unusual spellings of the content type, and let ordinary form posts through. The Apache rule only worked inside a <Directory> block: placed in the global server configuration, it was silently ignored by the virtual host and blocked nothing. Send a test upload to confirm it is working.
Automatic protections from security providers
Several security providers have added rules that block the known attacks, some of them switched on for every customer without any action. They are worth having while you patch. Do not depend on them.
Why a firewall rule is not enough
- The rules recognise the attacks known so far. Cloudflare reports attackers already changing their payloads to get past its rules, and Wiz says there are more variants of the flaw than the published ones.
- They only see traffic that passes through the provider. If your server can be reached directly, the rules do nothing, so allow connections only from the provider’s IP ranges.
- Some are off until you turn them on, or only log matches instead of blocking them.
- Cloudflare calls its rules a stopgap, Fastly calls its virtual patch partial protection, and the PHP2Shell researchers say not to treat a protective rule as a substitute for updating PHP.
What each provider has announced
| Provider | What it does | What you need to do | Source |
|---|---|---|---|
| Cloudflare WAF | Managed rules switched on by default for every plan, including Free, since 03:02 UTC on 21 October, plus a new rule that inspects the server’s response. | Free: nothing. Pro, Business and Enterprise: confirm the Cloudflare Managed Ruleset is set to block, not log. | Cloudflare blog |
| Akamai App & API Protector | Adaptive Security Engine rule 3000991, plus existing command injection rules that Akamai says stop weaponised payloads. | Akamai does not say whether the rule is on by default. Check that it is active and blocking. | Akamai blog |
| Fastly Next-Gen WAF | A virtual patch for both CVEs that looks for the request shapes these attacks use. | Apply the virtual patch to each service yourself. Fastly then updates it automatically. | Fastly blog |
| Cisco Snort | Intrusion prevention signatures 67359 and 67360, also in the free Community Ruleset. | Update your ruleset and make sure the signatures block rather than alert. | Cisco Talos |
| WordPress VIP | Automattic says every site on its platform was protected before the release. | Nothing. | WordPress VIP notice |
| CrowdStrike Falcon | Detects what attackers do after getting in, such as web shells and shells started by PHP. It does not block the attack itself. | Make sure someone acts on the alerts. | CrowdStrike blog |
| Wiz Sensor | A response policy that stops processes behaving like a PHP2Shell exploit. | Turn the policy on. It needs sensor version 1.0.12768 or later. | Wiz blog |
Wiz also credits AWS, Microsoft, Imperva and Vercel with preparing mitigations, but none of them had published anything about these flaws on their own sites at the time of writing. The general PHP rule groups in AWS WAF and Google Cloud Armor are not specific to these flaws. If your provider is not listed, ask it directly.
Signs of compromise
These attacks happen inside PHP before your application runs, so application logs usually show nothing. A missing signal does not prove a server is safe.
During an attack
- Unusual multipart requests followed by memory errors or repeated HTTP 500 responses (Wiz).
- Unexpectedly large or garbled
PHPSESSIDcookies in responses, which can mean server memory is leaking. - PHP workers crashing or restarting for no clear reason.
According to CrowdStrike, the one trace an attempt reliably leaves in the server log is an out-of-memory error reported in Unknown on line 0, meaning no PHP file was running when it happened. Adjust the log paths to match your server.
grep -E "Allowed memory size of [0-9]+ bytes exhausted .* in Unknown on line 0" \
/var/log/apache2/error.log /var/log/php*-fpm.logA match is a reason to investigate, not proof of compromise.
After a successful attack
Huntress recommends looking for:
- PHP or web server processes starting shells or tools such as
sh,bash,curl,wget,python,cmd.exeorpowershell.exe. - Reconnaissance commands such as
whoami,idoruname -arun by the web server user. - New PHP files in the web root, upload, cache or temporary folders.
- New cron jobs, scheduled tasks or user accounts.
- New outbound connections from web servers to unknown hosts.
Because one of the flaws can leak server memory, rotate passwords, API keys and tokens held by internet-facing PHP servers once they are patched.
Search back to 17 October
Start log reviews from 17 October, not from the disclosure date. AWS published these source addresses. They belong to shared anonymising services, so AWS advises investigating any match rather than blocking them.
103.216.220.92 17 October
31.223.184.166 21 October
37.19.200.5 21 October
134.209.159.64 21 October
103.114.163.188 21 October
95.217.98.37 21 OctoberWhat is PHP2Shell?
PHP2Shell is two critical flaws in the core of PHP, the code that handles every web request before an application runs. PHP fixed them on 21 October 2026. Because the flaws sit below the application, even a one-line “Hello World” page on an affected version can be attacked, according to Wiz. No login is needed. The name comes from the exploit Wiz built; it is not an official PHP name.
PHP considers the risk highest for Apache with mod_php, where an attack completes before any application code runs. Remote code execution has also been demonstrated on PHP-FPM.
The two flaws
CVE-2026-109618, out-of-memory corruption. A crafted request can make PHP run out of memory while it is still setting up the request. PHP then abandons the work and cleans up memory that was never properly prepared, which an attacker can turn into code execution. The technical advisory confirms this on Apache with mod_php using default settings.
CVE-2026-109619, stale state. When a request ends abruptly, PHP can leave behind references to memory it has already freed. The next request handled by the same worker uses them. The confirmed paths go through session upload progress, which is on by default, and the fatal error backtraces added in PHP 8.5. The technical advisory confirms code execution on both Apache with mod_php and PHP-FPM.
Is it being exploited?
Yes, and it started before the fix. Amazon Threat Intelligence recorded an exploitation attempt against its honeypots on 17 October, four days before disclosure, from an anonymising network. More attempts from several actors followed on 21 October, before the embargo lifted at 14:00 UTC. AWS now says PHP2Shell is being broadly exploited in the wild, and Cloudflare reports attack traffic against its customers.
Products that embed PHP are targets too. On 29 October Palo Alto Networks reported attackers exploiting PHP2Shell against PAN-OS management interfaces exposed to the internet, then chaining it with a Linux kernel flaw to gain root. Palo Alto says patched devices are not affected and that management interfaces should not be reachable from the internet.
Community proof-of-concept code is public. Treat unofficial exploit repositories as untrusted: some may contain malware. CISA added both PHP2Shell CVEs to its catalog on 26 October: CISA Known Exploited Vulnerabilities catalog.
CISA’s updated PHP alert includes a Sigma detection rule and urges immediate patching. Its KEV entries set 29 October as the federal remediation due date and require forensic triage. Apply the relevant requirements to your environment; patching alone does not remove an existing compromise.
How PHP is responding
The PHP Foundation calls the time it took to ship a fix “a structural failure”. First signs of the memory problem surfaced in a 2024 audit, and work on the fix stalled repeatedly until the reports in August 2026. The Foundation says it has created an Ecosystem Security Team, hired security staff, commissioned further audits, and is changing how the security team makes decisions. It is asking companies and governments that depend on PHP to fund that work.
Timeline
Times are UTC. Discovery dates come from the PHP Foundation’s account.
- 2026-07-30
2026-07-30
Security firm Calif begins an audit of PHP under the Patch the Planet program.
- 2026-08-11
2026-08-11
Calif reports an unauthenticated remote code execution flaw. OpenAI independently reports the same root cause on the same day.
- 2026-08-24
- 2026-09-18
- 2026-10-17
2026-10-17
Amazon Threat Intelligence records a PHP2Shell exploitation attempt against its honeypots, four days before disclosure.
- 2026-10-20
2026-10-20 · about 15:00 UTC
The CVE numbers leak on forums and social media, with an incorrect score of 10.0. No technical details leak.
2026-10-20 · 19:30 UTC
PHP pre-announces the release and brings it forward from 22 to 21 October.
2026-10-20 · about 20:00 UTC
Calif mistakenly publishes a video of a working exploit. It is deleted, but copies circulate.
- 2026-10-21
2026-10-21 · 03:02 UTC
Cloudflare switches on WAF rules for all plans, including Free, and later reports attack traffic against its customers.
2026-10-21
PHP releases 8.5.12, 8.4.27, 8.3.36 and 8.2.35 and publishes its advisory. Ubuntu, Debian, Arch, cPanel and Plesk ship fixes the same day.
2026-10-21 · 15:24 to 17:29 UTC
Posts on oss-security relay an unconfirmed claim that the 8.5.12 fix is incomplete. On 22 October PHP’s Jakub Zelenka replied that it is an unrelated, low-impact crash.
2026-10-21 · 15:53 to 20:36 UTC
Red Hat ships fixed PHP packages for RHEL 8, 9 and 10. Fedora, SUSE, Alpine, Homebrew and the Ondřej Surý PPA follow during the day.
- 2026-10-22
2026-10-22
Amazon Linux ships fixed php8.2 to php8.5 packages for Amazon Linux 2023, and PHP 8.2 for Amazon Linux 2.
- 2026-10-23
2026-10-23 · 10:12 UTC
PHP publishes an informational advisory for CVE-2026-115560, a separate session flaw in an unusual configuration, and suggests keeping session upload progress off until the next release.
- 2026-10-26
2026-10-26
PHP publishes Windows -1 rebuilds for the separate Brotli CVE-2026-111497; php --version remains unchanged.
2026-10-26
CISA adds both PHP2Shell CVEs to its Known Exploited Vulnerabilities catalog and updates its patching and detection guidance.
- 2026-10-29
2026-10-29
Palo Alto Networks reports PHP2Shell exploitation against internet-facing PAN-OS management interfaces, chained with a Linux kernel privilege escalation to gain root.
- 2026-11-03
2026-11-03
PHP tags 8.5.13 RC1 and 8.4.28 RC1 for testing. These are not production releases, and the full CVE-2026-115560 advisory is not yet published.
Where the sources differ
Early reporting on these flaws disagrees in places. Here is what each source says and how we read it.
| Question | What the sources say | Our reading |
|---|---|---|
| Which versions are affected | PHP’s CVE records list only 8.2 to 8.5. Wiz, Cloudflare and Sansec say every version since PHP 5.4 is affected, and PHP itself published source backports for 7.4, 8.0 and 8.1. | Treat every version before the fixed releases as affected. |
| Which bug belongs to which CVE | PHP’s advisory places the session upload progress bug under CVE-2026-109619. The table in Wiz’s blog post places it under CVE-2026-109618. | We follow PHP. Both CVEs are fixed by the same release, so it does not change what you do. |
| How severe it is | PHP scores both CVEs 9.2 under CVSS 4.0. NVD scores them 9.8 under CVSS 3.1, treating the attack as easy to carry out. Red Hat, SUSE and Amazon Linux give 8.1, treating it as hard. The 10.0 score that leaked on 20 October was wrong. | The scores use different systems. Treat it as critical for anything serving web traffic. |
| Whether it is being exploited | Cloudflare reports attack traffic and attackers adapting payloads to evade its rules. Hadrian reports exploitation at scale. Huntress had seen none among its customers by the morning of 21 October. AWS later reported attempts from 17 October and broad exploitation. | Assume internet-facing servers are being attacked, and investigate from 17 October. |
Several posts written before PHP’s advisory describe the attack as only the upload progress path, and recommend switching that setting off as a complete fix. PHP’s own advisory says it is not. The Swiss NCSC also notes that a firewall alone is not sufficient.
Recording it for compliance
For most organisations this is an emergency patch of a third-party component. Keep a dated record: an auditor will ask how you learned of it, what you found and how quickly you fixed it.
| Framework | Control | What to record |
|---|---|---|
| ISO 27001:2022 | A.8.8 | Management of technical vulnerabilities. Record the assessment, the systems found and the patch dates. |
| ISO 27001:2022 | A.8.32 | Change management. Record the emergency change and any temporary configuration you applied. |
| ISO 27001:2022 | A.5.25, A.5.26 | Assessment of and response to security events, if you find signs of compromise. |
| SOC 2 | CC7.1 | Identifying newly discovered vulnerabilities. |
| SOC 2 | CC7.2 | Monitoring for anomalies, including the log review. |
| SOC 2 | CC8.1 | Authorising and recording the emergency change. |
Evidence to keep: the date you assessed it, the list of systems and images that run PHP, the versions before and after, the restart times, any temporary settings and when you removed them, the log review, and any secrets you rotated.
For how these controls work day to day, see our guides to ISO 27001 vulnerability management, SOC 2 vulnerability management, and incident response plans for ISO 27001 and SOC 2.
PHP2Shell FAQ
Short answers to the questions we are hearing most. The sections above have the detail and sources.
What is PHP2Shell?
PHP2Shell is the name Wiz gave to an exploit for two critical flaws in the core of PHP, CVE-2026-109618 and CVE-2026-109619. They let an attacker who sends crafted web requests run code on the server or read its memory, without logging in. The flaws are in PHP itself, so an application with no bugs of its own is still exposed.
Which PHP versions fix PHP2Shell?
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix PHP2Shell. On Windows, install the 26 October -1 rebuild of the matching package as well; it fixes the separate Brotli CVE-2026-111497 without changing php --version. PHP 8.1 and older need a vendor backport or a supported release. Check distribution changelogs for the CVEs.
Is PHP2Shell being exploited?
Yes. Amazon Threat Intelligence recorded an exploitation attempt on 17 October 2026, four days before disclosure, and reports broad exploitation. CISA added both CVE-2026-109618 and CVE-2026-109619 to its Known Exploited Vulnerabilities catalog on 26 October, and on 29 October Palo Alto Networks reported attacks on internet-facing PAN-OS management interfaces. Review logs from 17 October and follow CISA's PHP forensic-triage guidance as applicable.
Does Cloudflare or another firewall protect me from PHP2Shell?
Only partly. Cloudflare and Akamai block known attacks automatically, and Fastly offers a virtual patch you have to apply, but these rules cover only the attack paths known so far and only traffic that passes through the provider. They buy time. Update PHP anyway.
Is there a workaround if I cannot update PHP yet?
Not a complete one. PHP recommends turning off session.upload_progress.enabled, setting memory_limit to -1 with a container or cgroup memory limit instead, and lowering post_max_size, all in server configuration, then restarting every PHP process. These block the known attack paths only.
Is there a new PHP vulnerability after the 21 October releases?
Yes, a narrower one. On 23 October 2026 PHP published an informational advisory for CVE-2026-115560, which the 21 October releases do not fix. It needs an application to change its session serializer at runtime, so PHP calls it unlikely in practice. As of 5 November the fix has not shipped: 8.5.13 RC1 and 8.4.28 RC1 are test builds only. Keep session.upload_progress.enabled=0 until the stable release; applications that never change the serializer at runtime can keep the feature on.
Do I need to restart PHP after updating?
Yes. Restart PHP-FPM, Apache and any long-running PHP workers such as queue workers. A process that started before the update keeps running the vulnerable code.
Sources
- CISA PHP alert, revised 26 OctoberConfirmed KEV additions, patching guidance and Sigma detection resource.
- PHP security advisory, 21 October 2026Who is at risk, fixed versions and temporary measures.
- Amazon Threat Intelligence, AWS Security BlogExploitation from 17 October, before disclosure, and source addresses to investigate.
- Unit 42 threat brief, updated 29 OctoberPHP2Shell exploitation against internet-facing PAN-OS management interfaces.
- Red Hat security bulletin RHSB-2026-013Affected RHEL releases, including RHEL 7 for CVE-2026-109619 only, and mitigation steps.
- php-src release tags8.5.13 RC1 and 8.4.28 RC1, tagged 3 and 4 November for testing.
- GHSA-w8hw-w9fx-j79w (CVE-2026-109618)Technical advisory for the out-of-memory flaw.
- GHSA-6wmf-4rv5-p3rp (CVE-2026-109619)Technical advisory for the stale state flaw.
- PHP Foundation blog, 21 October 2026Disclosure timeline and the Foundation’s security plans.
- Wiz ResearchExploitation research and detection signals.
- php2shell.comWiz’s summary site, with answers to common questions.
- Cloudflare blogWAF rules and observed attack traffic.
- CERT-EU advisory 2026-018Affected versions and recommended measures.
- CrowdStrikeThe log line left by an attack attempt.
- HuntressPost-exploitation behaviour to hunt for.