Security Digest · Oct 21, 2026 · Vulnerability · Language runtime
PHP2Shell: Critical Unauthenticated RCE in PHP
Two PHP engine bugs allow unauthenticated RCE via web requests. Fixed in 8.5.12/8.4.27/8.3.36/8.2.35. In CISA KEV; shells seen. Patch today.
Our verdict
Act now
If PHP answers HTTP requests anywhere you run it, patch or apply a vendor fix today; this is pre-application, unauthenticated, and attack traffic started before the patch shipped.
Who must act: Anyone running PHP behind a web server (mod_php, PHP-FPM, php-cgi, FrankenPHP, LiteSpeed), including WordPress, Drupal, Magento, Laravel and appliance or container images that bundle PHP.
Who can relax: Hosts where PHP is only used from the command line (scripts, cron, Composer) and never handles untrusted HTTP requests, and RHEL 7 or older, which Red Hat says ships unaffected PHP.
- Affected
- PHP 8.5.x before 8.5.12
PHP 8.4.x before 8.4.27
PHP 8.3.x before 8.3.36
PHP 8.2.x before 8.2.35
PHP 7.4, 8.0, 8.1 (EOL; source backports only)
PHP 5.4 through 7.3 (EOL; no upstream fix) - Fixed in
- PHP 8.5.12
PHP 8.4.27
PHP 8.3.36
PHP 8.2.35
Debian 13 php8.4 8.4.27-1~deb13u1 (DSA-6574-1)
Debian 12 php8.2 8.2.35-1~deb12u1 (DLA-4848-1)
Ubuntu 24.04 php8.3 8.3.6-0ubuntu0.24.04.13
Ubuntu 22.04 php8.1 8.1.2-1ubuntu2.28
Official Docker php images rebuilt Oct 21, 2026 - CVSS
- 9.2 (v4.0, vendor)
- EPSS
- 100.0% (percentile 100.0)
- CISA KEV
- Yes, listed as known exploited
- Exploitation
- Exploited in the wild
- Severity
- Critical
What to do
- Inventory every PHP that serves HTTP: servers, containers, appliances, shared hosting.
- Upgrade to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or install your distribution's fixed package, then restart every PHP worker (php-fpm, Apache).
- Rebuild and redeploy container images from refreshed php:* or distro base images; do not just restart old containers.
- For PHP 7.4-8.1, use a vendor/LTS backport or the PHP team's source backport branches, or upgrade.
- If you cannot patch today: set session.upload_progress.enabled=0, enforce memory_limit=-1, set fatal_error_backtraces=0 on 8.5, block multipart/form-data where unused, and keep WAF rules on; otherwise take the site offline.
- Keep session.upload_progress.enabled=0 until the next regular PHP release even after patching if your app switches session.serialize_handler at runtime (CVE-2026-115560, not fixed by the Oct 21 releases).
- Verify the version actually serving requests, not just the CLI binary.
How to check if you are affected or compromised
- Check the running version from a web request (phpinfo behind auth, or the X-Powered-By header if enabled) and compare packages with dpkg -l 'php*' or rpm -qa 'php*'.
- Look for bursts of multipart POSTs containing the upload-progress field followed by HTTP 500s or memory-limit errors.
- Watch for unexplained PHP worker churn, segfaults, or oversized or malformed PHPSESSID cookies in responses.
- Search request logs back to Oct 17, 2026 (Amazon's earliest observed attempt) for form-upload POSTs containing PHP_SESSION_UPLOAD_PROGRESS.
- Treat any exposed, unpatched host as possibly compromised: hunt for new PHP files, web shells, and unexpected child processes of php-fpm or httpd.
What happened#
On October 21, 2026, PHP shipped 8.5.12, 8.4.27, 8.3.36 and 8.2.35 to fix two engine bugs that "can allow unauthenticated remote code execution." CVE-2026-109618 ("RCE via OOM corruption") is a fault in out-of-memory handling: PHP bails out mid-initialization and request shutdown then trusts half-built state. CVE-2026-109619 ("RCE via stale global state") lets request state outlive its freed memory so the next request on the same worker uses it. Both are use-after-free class bugs, rated CVSS 4.0 9.2 by PHP. Red Hat scores it 8.1 on CVSS 3.1 and notes NVD's 9.8.
Wiz Research found the bugs, with Calif and OpenAI also credited as reporters. Wiz confirmed unauthenticated RCE against Drupal and WordPress in August. The triggering code dates to PHP 5.4 (2012), and a plain "Hello World" app is enough. Sansec lists demonstrated RCE against Magento, WordPress, Drupal, Joomla, MediaWiki, Nextcloud, phpMyAdmin, Laravel and Symfony.
Who is affected#
PHP says every installation serving web requests is at risk, whether it runs mod_php, PHP-FPM, php-cgi, FrankenPHP or LiteSpeed. The advisories rank the exposure by SAPI:
- Apache mod_php: most exposed. RCE is confirmed with default limits, and the trigger fires while the request body is parsed, before any application code runs.
- PHP-FPM: one path is blunted because FPM kills a child whose startup fails. Session-lifecycle RCE was still validated against FPM.
- FrankenPHP and LiteSpeed (LSAPI): source analysis says likely susceptible, but this has not been validated.
PHP 8.1 and older get no upstream release. PHP published source backports for 7.4, 8.0 and 8.1. Versions 5.4 through 7.3 have no fix.
Do you really need to act?#
Yes, today, if PHP is reachable over HTTP. The attack needs no login and no plugin bug, because it lands in the engine before your code runs. Updating WordPress or your framework does nothing. Exploitation has started. Cloudflare saw attack traffic, including payloads mutated to evade its rules, after details leaked ahead of the release. watchTowr reports exploitation attempts, according to Tenable. Exploits are build-specific (the CVSS vector says "high complexity"), but public tooling closes that gap quickly. These CVEs were not in CISA KEV at the time of writing (they were added on October 26; see below).
Update, October 23: Amazon logged the first exploitation attempt in its honeypots on October 17, four days before the patches. It says "defenders should not assume the public disclosure date is the earliest date of exploitation." Attempts are now in the millions, and Sophos and Arctic Wolf have tied some of them to a Mirai botnet variant. Even so, no vendor has confirmed a successful in-the-wild compromise, and public exploits fail on hardened production settings. VulnCheck says it has an exploit that defeats ASLR on production configurations, but it is available only to its customers. Expect reliable exploits to spread. The patch deadline has not moved.
Update, October 26: that has now changed. Perplexity researcher Adel Karimi published honeypot evidence of 35 confirmed shells on October 24. Each was a /bin/sh started by an Apache worker (uid 33) on PHP 8.4.26 under single-worker mod_php, after a four-stage request chain that leaked memory and then executed commands. The traffic fits a leak-guided ASLR bypass consistent with CVE-2026-109618. The attackers ran id, tried to write proof files and fetch second stages, and no second-stage download succeeded. Karimi stresses that the target profile was deliberately favorable and says nothing about reliability on other setups. Expel's Marcus Hutchins called it the best confirmation of in-the-wild exploitation so far (SecurityWeek). Unpatched internet-facing PHP should now be treated as likely to be compromised, not just probed.
Update, October 27: CISA added both CVEs to its Known Exploited Vulnerabilities catalog on October 26 and gave federal civilian agencies until October 29 to fix them, a three-day deadline. CISA has published no details of the attacks it relied on (BleepingComputer). Censys estimates that more than 32.51 million PHP services still run an affected version (The Hacker News). Nothing about the fix changes: the October 21 releases and the distribution backports above remain the remedy.
Update, October 29: Dream Research reports a custom PHP2Shell exploit used against the PHP management interface of 24 firewalls from an unnamed vendor, plus a management server, in the US, Japan, Taiwan and South Korea, between October 23 and 24. The attacker chained it with the Linux kernel bug Fragnesia (CVE-2026-46300) to go from nobody to root. CISA added that kernel bug to KEV on October 28 and cites the chain. A PHP2Shell foothold should now be assumed to reach root on unpatched kernels. Patch both, and ask appliance vendors whether their firmware bundles vulnerable PHP.
On October 23, PHP also flagged CVE-2026-115560, a related, "unlikely" RCE vector that the October 21 releases do not fix. It applies only when an app configures session.serialize_handler as php_binary or php_serialize, switches it to php with ini_set() before session_start(), and leaves session upload progress enabled. PHP will fix it in the next regular release. Until then, it recommends session.upload_progress.enabled=0, which is the same mitigation listed for CVE-2026-109619. If you already set it, leave it in place.
- Distro PHP (Debian/Ubuntu/RHEL): watch for backported fixes that keep the old version string. Debian fixed trixie (8.4.27-1~deb13u1, DSA-6574-1) and bookworm (8.2.35-1~deb12u1, DLA-4848-1). Ubuntu fixed 24.04 (php8.3 8.3.6-0ubuntu0.24.04.13) and 22.04 (php8.1 8.1.2-1ubuntu2.28), with 20.04 and older through Ubuntu Pro. Red Hat lists RHEL 8, 9 and 10 as affected with updates rolling out, and RHEL 7 as unaffected. Sansec warns that the Remi repository had not shipped fixes on day one.
- Containers: the official
phpimages were rebuilt on October 21. Pull, rebuild and redeploy. Restarting an old image does not patch it. - Managed WordPress and shared hosting: the host owns PHP. Confirm with them in writing. Self-managed VPS installs are on you.
- CLI-only PHP (cron, Composer, CI) is not on the documented attack path. Patch it on your normal cycle.
- Behind Cloudflare: WAF rules help, but only for traffic that actually passes through Cloudflare. They are not a fix.
What to do now#
- Inventory every PHP install that answers HTTP, including ones bundled inside appliances. The UK NCSC stresses this step.
- Upgrade to a fixed release or your vendor's package (
apt-get install --only-upgrade 'php8.*',dnf update 'php*'), then restart all workers:systemctl restart php8.3-fpm apache2. - Verify from the web side, not the shell.
php -vreports the CLI binary. Checkdpkg -l 'php*'orrpm -qa 'php*', and confirm the version a live request reports. - If you can't patch yet, apply PHP's temporary mitigations administratively and restart:
session.upload_progress.enabled=0, enforcedmemory_limit=-1(watch RAM), andfatal_error_backtraces=0on 8.5. Blockmultipart/form-datawhere you don't use it. PHP says none of these is a complete fix, so failing that, take the site offline as Qualys and NCSC suggest. - Do not use
RLIMIT_AS/RLIMIT_DATAas a mitigation. PHP warns they can trigger the vulnerable path.
How to tell if you were hit#
Wiz notes that application logs may show little, because the bugs run below the app layer. Look for multipart POSTs carrying the upload-progress field followed by 500s or memory-limit errors, unusual PHP worker churn, and oversized or malformed PHPSESSID cookies. Any internet-facing host that was unpatched after October 17 deserves a hunt. Amazon suggests searching form-upload POSTs for PHP_SESSION_UPLOAD_PROGRESS. Then look for new .php files in web roots, web shells, and unexpected shells or network tools spawned by php-fpm or httpd. Rotate the secrets those workers could read, because the bugs also leak process memory.
Karimi's October 24 report gives concrete indicators. The requests were multipart POSTs to / or /index.php with no User-Agent, in a fixed sequence: a chunked memory-pressure POST, a roughly 33 MB chunked POST carrying an oversized PHPSESSID, a roughly 279 KB POST, then a roughly 451 KB execution POST. The two sources that produced shells were 15.204.59.70 and 162.35.99.94, though these are infrastructure, not attribution. The reliable host signal is a shell process whose parent is apache2 or php-fpm. HTTP 200s and out-of-memory errors alone do not prove success.
Timeline#
- — Calif reports a first bug to PHP (per Sansec).
- — Wiz reports its findings to PHP.
- — Amazon's MadPot honeypots log the first known exploitation attempt, from anonymization infrastructure.
- — CVE IDs leak around 15:00 UTC, and a researcher's exploit video is briefly posted. PHP moves the release up from Oct 22 to Oct 21, 14:00 UTC (Socket).
- — Cloudflare rules go live at 03:02 UTC. Chainguard ships patched images at 07:41 UTC, which the PHP Foundation calls an embargo break. Fixed releases, the GHSAs and the Wiz write-up are published at 14:00 UTC. Debian and Ubuntu ship fixes, and the official Docker images are rebuilt.
- — Attempts reach the millions. Mirai-linked attempts are reported, but no vendor confirms a successful compromise.
- — PHP publishes an informational advisory for CVE-2026-115560, which is not fixed by the Oct 21 releases (mitigation:
session.upload_progress.enabled=0). - — Honeypots record 35 confirmed shells on PHP 8.4.26 mod_php, the first well-documented successful exploitation.
- — The findings are confirmed by other researchers and reported widely. CISA adds both CVEs to KEV, with a federal deadline of Oct 29.
- — CISA adds Fragnesia (CVE-2026-46300) to KEV after Dream Research reports PHP2Shell chained with it to root 25 servers.
Vulnerability records
- CVE-2026-109618 · KEV 2026-10-26 · PHP uses longjmp() for out-of-memory (OOM) errors to exit the current context and abort handling of the request.
- CVE-2026-109619 · KEV 2026-10-26 · PHP has various global state that temporarily points into request memory.
Sources
Original sources first: vendor and project advisories, CVE and government records, the discoverers’ write-ups. Every claim above links to one of these. See how the Security Desk works.
Original and primary sources
- PHP — Security advisory for PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35 (Oct 21, 2026) php.net
- PHP — Upcoming critical PHP security release (Oct 20, 2026) php.net
- PHP / GitHub — GHSA-w8hw-w9fx-j79w: RCE via OOM corruption (CVE-2026-109618) github.com
- PHP / GitHub — GHSA-6wmf-4rv5-p3rp: RCE via stale global state (CVE-2026-109619) github.com
- CISA — CISA adds two known exploited vulnerabilities to catalog (Oct 26, 2026) cisa.gov
- CISA — Known Exploited Vulnerabilities: CVE-2026-109618 cisa.gov
- PHP — Informational advisory: Session upload progress (Oct 23, 2026) php.net
- Amazon — Amazon threat intelligence identifies PHP2Shell exploitation prior to public disclosure aws.amazon.com
- Wiz Research — PHP2Shell wiz.io
- Tenable — PHP2Shell FAQ tenable.com
- Sansec — PHP2Shell: Critical PHP RCE sansec.io
- Cloudflare — Cloudflare deploys protections against php2shell blog.cloudflare.com
- Qualys — PHP2Shell: PHP patches two critical RCE vulnerabilities blog.qualys.com
- Debian security tracker — CVE-2026-109618 security-tracker.debian.org
- Ubuntu — CVE-2026-109618 ubuntu.com
- Red Hat — RHSB-2026-013 access.redhat.com
- Red Hat — CVE-2026-109618 access.redhat.com
- Docker official images — Update php to 8.5.12, 8.4.27, 8.3.36, 8.2.35 (#22541) github.com
- UK NCSC — Critical security issue affecting PHP ncsc.gov.uk
- Socket — PHP Foundation says Chainguard broke security embargo socket.dev
- Adel Karimi — PHP2Shell confirmed RCE evidence from honeypots (Oct 24, 2026) github.com
- Dream Research — Chained PHP2Shell exploit roots 25 servers dreamgroup.com
- CISA — Known Exploited Vulnerabilities: CVE-2026-46300 (Fragnesia) cisa.gov
Coverage and analysis
- SecurityWeek — Mirai botnet operators join PHP2Shell attacks as ASLR bypass exploits emerge securityweek.com
- The Hacker News — PHP warns of another unpatched RCE two days after emergency PHP2Shell patches thehackernews.com
- SecurityWeek — PHP2Shell exploitation moves from probes to working shells securityweek.com
- BleepingComputer — PHP2Shell security flaws now successfully exploited in the wild bleepingcomputer.com
- BleepingComputer — CISA confirms PHP2Shell vulnerabilities now exploited in attacks bleepingcomputer.com
- The Hacker News — CISA confirms active exploitation of two PHP2Shell flaws thehackernews.com