PHP2Shell: Critical PHP Flaws — What to Do Right Now
Live updates
- Oct 21, 2026, afternoon: Patch released: PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix both flaws. The PHP team's advisories confirm the CVE IDs, CVSS 9.2 and exploitation without authentication. The causes are use-after-free bugs in out-of-memory handling and in global state that survives from one request to the next on the same worker. Apache with mod_php is at highest risk; code execution has been demonstrated there. Patchstack and Aikido report first attacks, so far without technical details. We have updated the whole article.
- Oct 21, 2026, morning: First published. The patch is scheduled for today at 14:00 UTC (10:00 a.m. ET). Affected and fixed versions and the technical cause are not officially confirmed yet — we will add them here as soon as php.net publishes them.
Security Advisory · As of October 21, 2026, afternoon
Two critical flaws in the PHP core — the patch is out
On October 21, 2026 at 14:00 UTC the PHP team fixed two critical vulnerabilities: CVE-2026-109618 and CVE-2026-109619, both CVSS 9.2. They let an attacker run code on the server without logging in. The details had leaked a day earlier, along with a screenshot of an exploit tool called "PHP2Shell".
Update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35. A plugin update will not help; PHP itself has to be patched, from WordPress to Shopware. Apache with mod_php is at highest risk, because there the attack runs before your application code even starts.
First attacks are already being reported. If you do not yet know where PHP runs in your company, start today.
Help with patching
No time to update every server today?
Our developers take it on: update PHP, rebuild container images, then check from the outside. Start within 24 hours on working days, effort agreed upfront.
What has happened so far
October 20, 2026, morning
The leak
A Hacker News post announces two upcoming remote code execution flaws in the PHP core and is deleted shortly afterwards. Screenshots spread anyway, including the banner of an exploit tool called "PHP2Shell", credited to the security research company Calif.IO, which claims to work against every PHP release from 5.4.0 onward.
October 20, 2026
Confirmed by watchTowr and the PHP team
Security firm watchTowr confirms the flaws are real and says it has reproduced CVE-2026-109618. Coordinated disclosure was originally planned for Thursday. The PHP security team brings the date forward and announces a critical security release: two flaws, both rated CVSS v4.0 9.2.
October 21, 2026, 14:00 UTC
The security release is out
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 ship together with two advisories: CVE-2026-109618 ("RCE via OOM corruption") and CVE-2026-109619 ("RCE via stale global state"). The PHP team urges all users to update immediately.
October 21, 2026, afternoon
First reports of attacks
Patchstack reports several confirmed exploitation incidents, and Aikido also reports exploitation. There are no technical details yet, and the PHP team has not confirmed any attacks. In practice this changes little: if you have not patched, assume you are being scanned.
What is known — and what is not
Before the release, plenty of numbers and rumours were going around. Now the PHP team's advisories are out. We still separate what is confirmed from what is open.
Confirmed or well documented
- Two flaws in the PHP core itself, not in WordPress, Shopware or a plugin; both rated CVSS v4.0 9.2 (critical)
- Affected: every version below 8.2.35, 8.3.36, 8.4.27 and 8.5.12; fixed in exactly those versions
- Exploitable over the network, without authentication and without user interaction; the result is code execution with the privileges of the web server process
- CVE-2026-109618: if PHP runs out of memory while a request is only partly set up, half-initialised memory is left behind. The trigger is crafted multipart requests (file uploads) that use a lot of memory despite post_max_size and max_file_uploads
- CVE-2026-109619: state from an earlier request (errors, session, upload progress) stays behind in the worker and is used by the next request after its memory has been freed
- Apache with mod_php: code execution confirmed by the PHP team. PHP-FPM, FrankenPHP and LSAPI are considered likely affected based on code analysis. The attack runs before application code or an application firewall comes into play
- Configuration changes lower the risk but, according to the PHP team, do not make a system safe. Only the update closes the flaws
Still open
- How widespread the attacks are: Patchstack and Aikido report exploitation without details; neither the PHP team nor CISA has confirmed it yet
- Whether there is a complete exploit for PHP-FPM: so far only derived from the code, not demonstrated
- When Linux distributions catch up: according to php.net the Remi repository will not ship updates today, and Debian, Ubuntu and RHEL usually take hours to days
- What happens to PHP 8.1 and older: php.net points to backports from distributions and hosts
Am I affected?
Every system running a PHP version below 8.2.35, 8.3.36, 8.4.27 or 8.5.12 is vulnerable, as is everything on PHP 8.1 or older unless a backport has been applied. Servers with Apache and mod_php are the most urgent. The harder question is usually where PHP is running at all. These six places are the ones most often forgotten.
Your own servers and VMs
Every web server running PHP, whether Apache with mod_php, Nginx with PHP-FPM or IIS on Windows. Include the internal tools nobody thinks about any more: wikis, ticketing systems, monitoring dashboards, old intranets.
Containers and Docker images
An image like php:8.1-fpm does not become safe because the host is patched. Every image has to be rebuilt and redeployed — including those in staging, CI runners and old Kubernetes namespaces.
Shared and managed hosting
Here your provider patches, not you. Ask actively when the update will be applied and which PHP version your plan uses. Plans with a selectable PHP version often run several versions side by side.
Unsupported PHP versions
The PHP project only supports 8.2 and later. According to Sansec, 8.1 and older will get no official fix. Anyone still running PHP 7 needs a backport from their distribution or host — or an upgrade.
Appliances and third-party software
Huntress points out that PHP often ships invisibly: in control panels such as cPanel and Plesk, in Windows software, in network and storage appliances. Only the vendor can update these.
Shops and CMS
Magento, Shopware, WooCommerce, WordPress, Drupal, Joomla, TYPO3: all run on PHP. A plugin update does not help. The flaw sits one layer deeper, and Sansec stresses that the attack hits PHP itself before shop code or an application firewall even runs.
Checklist: what to do now
The patch is out. The first five steps are for every system you cannot update right away, the rest are for afterwards. None of it needs a big budget, just someone who has time for it today.
Right away, even if the update takes longer
Build an inventory — today, not tomorrow
List every system running PHP, with version, mode (FPM, mod_php, CGI), internet exposure and owning team. A quick start: php -v on every host, and search your repositories for FROM php: in Dockerfiles and for the PHP requirement in composer.json.
Prepare the patch path
Clarify now where the update will come from: official builds, distribution packages (Debian, Ubuntu, RHEL and Remi often ship with a delay) or rebuilt container images. Who may restart production systems tonight? Who signs off?
Apply interim settings — all of them
The PHP team lists four: enforce memory_limit = -1 (php_admin_value, so no application can override it), post_max_size = 8M (32M if you need uploads) with limits at the web server or proxy as well, session.upload_progress.enabled = 0, and on PHP 8.5 fatal_error_backtraces = 0. Each targets a different flaw, so set all of them, in php.ini or the pool configuration, not via ini_set() or .user.ini. Then restart all workers and check the values in a real web request. The PHP team stresses that this does not make the system safe.
Take off the internet what does not need to be there
Admin interfaces, staging systems, old instances on PHP 7: put them behind a VPN or IP filter, or shut them down. Every system that is unreachable from outside drops out of the first attack wave.
Switch on detection
Huntress recommends alerting when PHP processes (php-fpm, php-cgi, apache2, httpd) spawn a shell or tools such as curl, wget, nc, python or perl — and watching for typical reverse-shell patterns like /dev/tcp/ or mkfifo.
Patching and afterwards
Patch internet-facing systems first
Sansec expected mass attacks within 15 minutes of the release, and first attacks are already being reported. So the order is clear: everything on mod_php and everything reachable from outside first, internal systems second. Where no update is coming, such as appliances: block multipart uploads at the proxy wherever the application does not need them.
Verify the patch, do not just install it
The target is 8.2.35, 8.3.36, 8.4.27 or 8.5.12. Check the running version in a real web request, not with php -v on the console: CLI and FPM are often separate packages. For distribution packages, look for CVE-2026-109618 and CVE-2026-109619 in the changelog, because backports do not always change the version number. And restart all workers: a running process keeps the old code.
Look for signs of compromise
If you were exposed between the leak and the patch, check: new or modified PHP files in the web root, unknown cron jobs, new user accounts, unusual outbound connections. If in doubt: isolate the system and preserve the logs rather than simply rebuilding it.
Rotate credentials if doubts remain
The first thing a web shell reads is the .env file or the configuration: database passwords, API keys, cloud credentials. If a system was vulnerable and a compromise cannot be ruled out, rotate these secrets.
Deal with the legacy estate
The PHP project ships no new releases for PHP 8.1 and older, only distributions and hosts provide backports. PHP 8.2 reaches end of life on December 31, 2026. Plan the upgrade now, while everyone still feels the urgency.
If you are short of hands for the inventory or the post-patch checks: our patch help starts within 24 hours and then checks from the outside whether vulnerable systems are still reachable.
Why AI changes the pace
There used to be weeks between a patch and the first working exploit. An attacker had to understand the patch, work out the flaw and build a reliable attack. That no longer takes long.
The patch is the manual
Once the fix is published, comparing it with the old code shows where the flaw is. AI models read such diffs, explain the cause and write first exploits in a fraction of the time a human would need. That is why Sansec expects attacks after 15 minutes rather than weeks.
AI finds the flaws itself
Calif.IO, credited with the PHP2Shell tool, does AI-assisted vulnerability research and published a 21-year-old flaw in PHP in May 2026. Whether PHP2Shell was also found with AI is not known. But the direction is clear: code that humans overlooked for decades is now being searched systematically — by defenders and attackers alike.
Attackers already use it
In May 2026, Google's Threat Intelligence Group reported the first zero-day exploit in a criminal campaign that was very likely developed with AI. The Cloud Security Alliance documents a flaw in an AI agent framework that was exploited just under four hours after disclosure.
The classic rhythm — patch on Tuesday, install in the next maintenance window — no longer fits this situation. What matters is no longer whether you patch, but how fast you know which systems are affected, and who updates them today.
That is a question of visibility first, and only then one of technology.
What penetration testing and red teaming add
Against a flaw in the PHP core, only the patch helps in the end. But whether you can roll it out fast enough, and how much damage an attacker can do in the meantime, can be tested in advance. Our experts work with AI assistance themselves, using the same methods attackers use.
The patch drill
How long does it take you from the warning to the last patched system? We measure it against a realistic scenario: who hears about it, who decides, which systems get forgotten? For most companies the honest answer is days — attackers need minutes.
What happens after the shell?
An RCE flaw is only the way in. What matters is what an attacker can reach as the www-data user: database credentials in the configuration, the cloud metadata service, the internal network, the backups. An assumed-breach test answers exactly that — we start where a web shell would land.
The outside view
Which of your systems reveal their PHP version in the X-Powered-By header? Which staging instance has been running PHP 7 for years? Which subdomain has everyone forgotten? This is exactly how attackers pick targets for the first wave — automated, across the whole internet.
Outbound traffic
A reverse shell needs a connection out. If your web server can reach any destination on the internet, every RCE is immediately fully usable. A pentest checks whether egress filtering and network segmentation actually work.
The difference between the two: a penetration test systematically covers breadth, red teaming plays through a real attack with a goal.
How our platform helps in an incident like this
"Where do we run PHP, and who owns it?" should not be a question you first ask in an emergency. Our Engineering Intelligence Platform answers it from two sides: from your repositories and from the internet.
From the inside
DevInsight: repositories and dependencies
DevInsight connects to GitHub, GitLab or Azure DevOps and builds a bill of materials (SBOM) of your repositories' dependencies. When a critical flaw becomes known, we match it against that: which projects are affected, and which team owns them? For critical findings we notify your security team and the affected teams directly.
Explore DevInsightFrom the outside
DevShield: attack surface monitoring
DevShield sees your company the way an attacker does: subdomains, reachable services, servers that reveal their PHP version, forgotten staging systems. That way it also catches the systems that are in no repository — appliances, third-party software, the old campaign site.
Explore DevShieldAnd when it is urgent: help with the fix
A warning alone does not close a hole. If your team lacks the time, our developers help with patching: rebuilding images, upgrading PHP versions, migrating legacy systems. Afterwards we check from the outside that the flaw is really closed. See patch help
Which of your PHP systems are visible from outside?
Our free Attack-Surface-Check shows on two pages what is reachable from outside: subdomains, open services, certificates, leaked credentials. One domain is enough — no contract, no system access.
Be ready before the next flaw arrives
PHP2Shell will not be the last critical flaw this year. These three building blocks make sure you react in hours rather than days next time.
See
Attack surface monitoring
Free initial check, then continuous monitoring from €249 per month. We report what has newly become reachable — not the same inventory every month.
Explore attack surface monitoringTest
Penetration test
Manual testing of web applications, APIs and cloud from €3,500 — including how far an attacker gets after code execution on the web server.
Explore penetration testingAttack
Red Teaming Starter (external)
Fixed price €2,500. An expert attacks from the outside with AI assistance, just like the first automated attack wave after a leak. Optional retest €300.
Explore red teamingWhat we deliberately do not promise
We do not run a 24/7 SOC and do not offer an incident response retainer. In an acute breach you need a specialised IR provider. What we deliver: visibility over your systems, honest findings and developers who help with the fix. Because our team carries out every engagement itself, we take on only a few new projects per month.
Sources
- PHP: Security Update — PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 (Oct 21, 2026)
- PHP Security Advisory GHSA-w8hw-w9fx-j79w: RCE via OOM corruption (CVE-2026-109618)
- PHP Security Advisory GHSA-6wmf-4rv5-p3rp: RCE via stale global state (CVE-2026-109619)
- Aikido: Critical vulnerabilities in PHP (PHP2Shell) (Oct 21, 2026)
- SOCRadar: PHP2Shell: CVE-2026-109618 & CVE-2026-109619 (Oct 21, 2026)
- Sansec: Critical PHP RCE: CVE-2026-109618 and CVE-2026-109619 (Oct 20, 2026)
- Huntress: Rapid Response: php2shell, Leaked Critical PHP Vulnerabilities (Oct 20, 2026)
- watchTowr: PHP Remote Code Execution FAQ: CVE-2026-109618 & CVE-2026-109619 (Oct 21, 2026)
- SecurityWeek: PHP2Shell: Mass Exploitation Looms for Leaked Critical PHP Flaws (Oct 21, 2026)
- Calif: Finding and Exploiting a 21-Year-Old Vulnerability in PHP (May 1, 2026)
- Cloud Security Alliance: First AI-Generated Zero-Day Exploit Confirmed in the Wild (May 12, 2026)
- Cloud Security Alliance: Sub-4-Hour Weaponization of Agentic AI Frameworks (2026)
Know where you are vulnerable before an attacker does
Start with the free Attack-Surface-Check, or talk to us directly if you need help with patching. You get an honest assessment of which next step makes sense.


