Two remote code execution flaws in PHP core picked up the name php2shell before the vendor published a word about them. PHP rates CVE-2026-109618 and CVE-2026-109619 at 9.2 and shipped 8.5.12, 8.4.27, 8.3.36 and 8.2.35 on 21 October, a day ahead of the date it had planned 12. The advisory covers every installation that serves web requests, including PHP-FPM, mod_php, php-cgi, FrankenPHP and LiteSpeed, and puts mod_php at the front: an unauthenticated request can reach the flaw there before application code runs 1.
The exploitation window opened before the disclosure did. Amazon Threat Intelligence found a PHP2Shell attempt in its MadPot telemetry dated 17 October, four days before disclosure while the vulnerability sat under embargo, from an address on a commercial anonymization network 3. That single record reframes the incident for me, because it puts the start of the window before the identifiers existed.
Attempts kept arriving before the fix. watchTowr observed exploitation in the wild from 21 October through its honeypot network 4. Cloudflare deployed its rules about nine hours ahead of disclosure, had them in front of every plan including the free tier from 03:02 UTC on 21 October, and recorded attack traffic against its own customers before a fix existed 5. Hadrian reported at-scale exploitation in the hours before the release, most of it through the session upload-progress path 6. Huntress had not seen exploitation on partner systems by the afternoon of 21 October and points at others reporting early attacks 7.
Neither identifier appears in CISA’s known exploited vulnerabilities catalog as of version 2026.10.21 48. CISA published its own alert on 21 October: inventory every system running PHP, noting that PHP is often a component of other software and its prevalence may not be directly observable, patch internet-facing systems first, and take PHP-based systems offline where a patch cannot be applied, which includes anything still on 8.1 or earlier 9. The same alert records that CISA had not observed exploitation at the time of publication.
The workaround was a guess
The setting that spread on 21 October was session.upload_progress.enabled=0. GMO Flatt Security, a Tokyo firm, suggested it that morning with the caveat that the change might not address the flaws, then walked it back the same day: the setting alone is not a complete fix and attacks around it are expected. Gina Peter Banyard, a PHP core developer, answered the suggestion with “the only mitigation is patching / upgrading PHP” 10.
Nobody had confirmed the flaw lived in that code; the firm said its idea held only as far as its own research matched php2shell, and an anonymous audit argues the circulating proof of concept does not fire against released PHP 10. If the premise is wrong, the setting closes a path the flaws do not take.
Then the advisory landed and confirmed part of the guess. Turning the setting off blocks the confirmed session paths and not other variants 1. It belongs in the gap before a patch, with that limit written next to it.
Two bugs, two mechanisms
The advisory separates the flaws. CVE-2026-109618 interrupts PHP during an out of memory event while internal request data is partly initialized, and the cleanup can treat invalid data as valid. CVE-2026-109619 lets request-owned state survive after its memory is freed, so a later request on the same worker can use it before initialization replaces it 1.
The version question
PHP fixed four branches. PHP 8.1 and older get no official release from the project, so those branches depend on a vendor backport: distributions and LTS vendors received the patches in advance, cPanel and Plesk shipped fixed builds for 7.4, 8.0 and 8.1 11, and the security team published minimal source backports for the same three branches 1. watchTowr lists no patch for PHP 5, and the project warned that the volunteer-maintained rpms.remirepo.net repository would carry no update on release day 14.
Version 8.2 leaves security support on 31 December 2026 12. Two months moves a branch but not an application, so that decision goes to the people who own the code.
A distribution build can carry a backport while the version string reads old, so I match a host to the feed that built it. The CLI binary can report one version while the FPM pool behind a vhost runs another. A shell is the wrong place to read either, so I read the value from the handler that serves the site 10. I record the interpreter that serves requests, on each vhost, under each user.
What I changed before the patch landed
Four changes, in the order they take effect.
-
session.upload_progress.enabled=0in php.ini or the pool config, then a restart of every worker. The advisory rules out ini_set() and an FPM .user.ini here, because the setting has to apply before request parsing 1. PHP reads a .user.ini only under the CGI and FastCGI versions, re-reads it every 300 seconds, and the Apache module ignores it 10. -
On PHP 8.5,
fatal_error_backtraces=0with the same restart. That blocks the confirmed fatal backtrace path and nothing else, and it is a separate setting from the one above 1. -
memory_limit=-1for the out of memory path, set where an application cannot override it, a lowpost_max_size, and request size and field count limits at the proxy 1. PHP warns against RLIMIT_AS and RLIMIT_DATA as the boundary, since either can cause the allocation failure the flaw needs 1. -
End-of-life PHP off the internet. A firewall rule, a VPN or an allowlist in front of those hosts holds until a backport reaches them, and on the distributions and panels that shipped on 21 October that wait is shorter than it looked that morning 11.
None of the four makes an installation safe; an update is the only complete solution 1. I keep the ones that cost nothing after patching, because another request-parsing bug will find the same paths.
What exploitation looks like
The process tree is what the logs give me. PHP sends shell_exec(), system(), exec(), passthru() and popen() through a shell, so a web shell run from a request shows up as a shell under the PHP worker with the whole command line attached. A program started directly through proc_open with an argument array has no shell in front of it 13. Roth’s README puts shells, interpreters, netcat and download tools below PHP at the top of the filter, and warns that a hit is a signal to read, since applications start mailers and converters for good reasons 13.
Florian Roth’s process-watcher ships a configuration for this release. Its README says it prevents nothing: it reports after a program has started, and code that runs inside the worker without starting a process leaves no event behind 13. That gap is why I put it on a quiet host ahead of a file integrity check.
One Huntress incident shows the shape: a FastCGI process wrote a small PHP file with a random marker string into the first writable temp directory it found, ran it, and deleted it 7. Wiz demonstrated the unauthenticated path against WordPress, Drupal and Joomla 14. Two details from its write-up belong in the record: the two identifiers group four memory-safety issues, with tracked and untracked variants of the same pattern beyond them, and the patch fixes the pattern at its root rather than those four instances 14. The memory disclosure path reads passwords, tokens, API keys and certificates out of the worker’s memory without needing code execution 14. A host that ran an affected build while serving requests gets a credential review alongside the patch.
The order I work in
Inventory first, at the FPM pool rather than the package list. Which version serves requests, on which vhost, under which user, and whether that host is reachable from the internet. The inventory tells me where the exposure sits. The settings above and the update change it.
The interim settings second, because they are reversible and the update has to clear change control. The patch third, from the channel the build came from: a distribution feed for a distribution build, the upstream release for a build that came from upstream. A patch from the wrong channel leaves an unexplained version string at the next audit.
The compromise check on anything that was internet facing and unmonitored. If a host shows the child process pattern or the temp file behavior, I rebuild it. With an attempt on record four days before disclosure, that check starts from 17 October rather than from the advisory.
The build is out, and finding every interpreter that answers a request is the part left to me.
-
The PHP Group. (2026, October 21). PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix two critical vulnerabilities that can allow unauthenticated remote code execution [News release]. PHP News Archive. https://www.php.net/archive/2026.php ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎
-
The PHP Foundation. (2026, October 21). Today’s PHP security release, and how we’re strengthening PHP security [Blog post]. https://thephp.foundation/blog/2026/10/21/todays-php-security-release-and-how-were-strengthening-php-security/ ↩︎
-
Amazon Threat Intelligence. (2026). Amazon Threat Intelligence identifies PHP2Shell exploitation prior to public disclosure in MadPot [Blog post]. AWS Security Blog. https://aws.amazon.com/blogs/security/amazon-threat-intelligence-identifies-php2shell-exploitation-prior-to-public-disclosure-in-madpot ↩︎
-
watchTowr. (2026, October 22). Frequently asked questions about PHP remote code execution (PHP2Shell CVE-2026-109618 & CVE-2026-109619) [Web page]. https://watchtowr.com/intelligence/php-cve-2026-109618-faq/ ↩︎ ↩︎ ↩︎
-
Cloudflare. (2026, October 21). Cloudflare deploys protections against php2shell vulnerability [Blog post]. https://blog.cloudflare.com/php-vulnerabilities-waf-protection/ ↩︎
-
Arghire, I. (2026, October 21). PHP2Shell patches land as first exploitation attempts hit sensors [News article]. SecurityWeek. https://www.securityweek.com/php2shell-patches-land-as-first-exploitation-attempts-hit-sensors ↩︎
-
Hammond, J. (2026, October 20). Rapid response: php2shell, leaked critical PHP vulnerabilities (CVE-2026-109618 & CVE-2026-109619) [Blog post]. Huntress. https://www.huntress.com/blog/php2shell-leaked-critical-php-vulnerabilities ↩︎ ↩︎
-
Cybersecurity and Infrastructure Security Agency. (2026, October 21). Known exploited vulnerabilities catalog [Data set]. https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json ↩︎
-
Cybersecurity and Infrastructure Security Agency. (2026, October 21). Critical vulnerabilities in PHP require immediate patching [Alert]. https://www.cisa.gov/news-events/alerts/2026/10/21/critical-vulnerabilities-php-require-immediate-patching ↩︎
-
Khandelwal, S. (2026, October 21). PHP2Shell: What actually protects you before the 14:00 UTC PHP RCE patch, and what doesn’t [Blog post]. The Hacker News. https://thehackernews.com/2026/10/php2shell-what-actually-protects-you.html ↩︎ ↩︎ ↩︎ ↩︎
-
Kovacs, E. (2026, October 22). Tech and security companies respond to PHP2Shell vulnerabilities [News article]. SecurityWeek. https://www.securityweek.com/tech-and-security-companies-respond-to-php2shell-vulnerabilities ↩︎ ↩︎
-
The PHP Group. (n.d.). Supported versions [Web page]. PHP.net. Retrieved October 22, 2026, from https://www.php.net/supported-versions.php ↩︎
-
Roth, F. (n.d.). process-watcher, emerging threats: PHP RCE October 2026 (README) [Source code]. GitHub. https://github.com/Neo23x0/process-watcher/blob/main/emerging-threats/php-rce-october-26/README.md ↩︎ ↩︎ ↩︎
-
Wiz Research. (2026, October 21). PHP2Shell: AI uncovers critical RCE vulnerabilities affecting 70% of the internet [Blog post]. Wiz Blog. https://www.wiz.io/blog/php2shell-php-rce ↩︎ ↩︎ ↩︎