Take Over a Server Without Logging In: Critical PHP Vulnerability php2shell — CloudFiles Has Already Patched It

Written in 2026/11/17

On 21 October 2026, the PHP project released an emergency security update fixing two vulnerabilities researchers call "php2shell": CVE-2026-109618 and CVE-2026-109619, both rated CVSS 9.2 (the maximum is 10). To be clear upfront: this is not a WordPress plugin flaw, nor a bug in one vendor's code — the vulnerability is in the PHP engine itself. Any website serving PHP publicly is affected, from version 5.4 up to the pre-patch 8.5, and PHP powers roughly 69.3% of websites with a known technology stack. CloudFiles itself runs on PHP, so we completed patching in October; this post explains the full story.

How does it work? When PHP handles each request it prepares a set of internal state in memory; if a fatal error occurs mid-processing — most commonly out of memory (OOM) — the engine aborts the request and runs cleanup. php2shell lives in that cleanup: the first flaw lets the cleanup routine treat half-initialised request data as if it were complete; the second is nastier — the request's memory has been freed but global state still points to it, so the next request handled by the same worker inherits the stale state. An attacker sends one crafted request to corrupt the state, then sends follow-up requests, achieving arbitrary code execution without logging in — even reading passwords, tokens and API keys out of worker memory. The most critical point: all of this happens before your application code ever runs.

Why is it so serious? Three reasons. First, it needs no account or password, and the attack completes before the application layer — login pages, one-time passwords, IP restrictions and the other application-layer defences are useless against a flaw at this layer; we discussed layered defence in The common pattern in Japan's security incidents, and this incident shows exactly why every layer matters: if the engine underneath isn't patched, nothing built on top can hold. Second, it was exploited very fast: Amazon's threat-intelligence team detected attack attempts on 17 October, four days before public disclosure; on 26 October, the US CISA added both vulnerabilities to its Known Exploited Vulnerabilities catalog. Third, many versions have no way back: PHP 8.1 and below are end-of-life and get no official patch — the only options are upgrading branches or relying on distribution backports. Systems still on old versions are exposed for the long term.

Patching timeline: attack attempts observed 17 October, official patch 21 October, CloudFiles completed its update in October

For a file service, this vulnerability has a bitter irony: one of its trigger paths is exactly the parsing of "file upload" requests — including the session upload progress handler that lets browsers report upload progress. In other words, for a typical website uploads are an add-on; for a file service, uploads are the core business, so the attack surface sits right at the heart of the product. CloudFiles' response was completed in October: after the official patched release on 21 October, we migrated the runtime to Amazon Linux 2023 and upgraded to the patched PHP packages (AWS published the corresponding security bulletin on 22 October); what runs in production today is the patched version. We did not wait for the disclosure window to close — with a flaw of this severity, attacks began before disclosure, and "waiting for a scheduled update" is itself a risk.

If your company maintains its own PHP systems, checking is straightforward: run php -v and compare against the patched versions — 8.2 needs 8.2.35 or above, 8.3 needs 8.3.36 or above, 8.4 needs 8.4.27 or above, 8.5 needs 8.5.12 or above. Still on 8.1 or below? Schedule the upgrade, because no official patch is coming. Bundles like XAMPP need care too: no patched bundle version is available to switch to yet. And if you use someone else's service — a host, a cloud file service, a vendor-maintained system — the most effective thing you can do is ask the provider two questions directly: what PHP version are you running, and on what date did you patch php2shell? A vendor who can answer has usually already done it; one who can't is a reason to reconsider the risk of keeping your data there. Finally, however fast you patch, assume “what if it gets through”: whether backups can be restored after the host is taken over is something we covered in Your backup is done — but who is allowed to delete it? — that's the last line of defence.

When choosing a file service, everyone reads the feature list, but few ask about the patching discipline of the runtime underneath. php2shell won't be the last vulnerability of its kind — PHP and every other system are the same; the only difference is how fast the vendor moves. CloudFiles' PHP is patched, and our account-layer defences — IP restrictions, one-time passwords, folder permissions, access logs retained for five years — are all still there, each guarding its layer every day. You can start with a free one-month trial (flat annual fee from NT$3,000, unlimited users), or write to us directly at [email protected] with any question about our runtime and patching — getting an answer is itself a kind of reassurance.

php2shell: state corruption in the PHP engine's request-cleanup stage lets unauthenticated attackers gain code execution