rotateit

All incidents

PHP2Shell, unauthenticated remote code execution in PHP core

Disclosed Oct 21, 2026 · updated Oct 30, 2026 · critical · Active

PHP has a critical hole.

Are you affected?

The free scanner that answers this opens soon. Until then, the steps below work by hand.

What happened

Unauthenticated RCE in PHP core. Two critical flaws in PHP core, both rated CVSS v4.0 9.2 by the PHP project. CVE-2026-109618: out-of-memory handling can interrupt PHP while request data is only partly initialized, and cleanup then treats the bad data as valid. CVE-2026-109619: request state can outlive its freed memory and be used by a later request on the same worker. PHP says every installation serving web requests is at risk (PHP-FPM, Apache mod_php, php-cgi, FrankenPHP, LiteSpeed), highest for mod_php, where an unauthenticated request can trigger the attack before any application code runs. Fixed in 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released 2026-10-21. PHP 8.1 and older get no release; the PHP project published minimal source backports for 7.4, 8.0 and 8.1. CISA added both CVEs to its Known Exploited Vulnerabilities catalog on 2026-10-26.

Exposure starts
Not known yet (the advisories do not say which releases introduced the flaws)
Exposure ends
Not known yet (exposure ends when each host is patched)
Confidence
low
Scope
every credential readable by a PHP process that serves web requests on an unpatched version

What to do, in this order

  1. Update PHP to 8.5.12, 8.4.27, 8.3.36 or 8.2.35 and restart every worker

    Only the update is a complete fix. Rotating first would hand fresh secrets to a still-vulnerable process.

  2. Apply the php.net temporary mitigations if you cannot update today, and set session.upload_progress.enabled=0 in php.ini or the FPM pool in any case; restart every worker

    They narrow the attack paths while you schedule the update; php.net says they do not make an installation safe. The upload-progress setting also blocks CVE-2026-115560, which no release fixes yet.

  3. Rotate every credential the PHP process could read (env vars, config files, database URLs, API keys, TLS keys)

    Advisory inference. The memory-disclosure path Sansec describes can leak anything held in worker memory, and RCE can read anything the process can. Rotate at each upstream provider, then update the host.

    anything else stored there

  4. Redeploy and check the old credentials are refused

    New values take effect only after the processes that hold them restart.

Notes

  • Advisory inference, not vendor guidance: Sansec reports that CVE-2026-109618 also discloses server memory on its own, via the upload-progress handler returning freed worker memory in a PHPSESSID cookie, and that this memory can hold passwords, session tokens, API keys and TLS private keys. Neither php.net nor Rapid7 tells you to rotate credentials. RotateIt advises rotating after patching because of that memory-disclosure path.
  • The php.net mitigations (memory_limit=-1, a low post_max_size, session.upload_progress.enabled=0, and on 8.5 fatal_error_backtraces=0) are temporary. PHP says they do not make an installation safe.
  • PHP 8.1 and older are unfixed upstream. Ask your distribution or LTS vendor for a backport, apply the PHP project's source backport, or upgrade.
  • Exploited: CISA added CVE-2026-109618 and CVE-2026-109619 to the KEV catalog on 2026-10-26 (due 2026-10-29) and marks them for forensic triage. BleepingComputer reports confirmed remote code execution against an Apache mod_php 8.4.26 honeypot on 2026-10-24, and Amazon saying exploitation attempts began four days before the patches.
  • php.net's 2026-10-23 advisory adds CVE-2026-115560, an unpatched remote code execution path in session upload progress that needs an application to switch session.serialize_handler to php at runtime. The fixed releases above do not cover it; php.net says to keep session.upload_progress.enabled=0 until the next regular release.

How to tell if you’re affected

  • PHP version below the fixed release on its branch (Dockerfile, composer.json platform, runtime config)
  • Any PHP 8.1 or older runtime

Sources

Rotating the keys

Pro, $49 a year when it opens, plans the rotation of each affected key for this incident, in this order. Automatic rotation is in testing and included.

One email when it opens. Stored: your email, whether you confirmed, and when you signed up. We send a confirmation link first.

By hand, free: the steps above.