PHP2Shell hides in a setting that's on by default
Two PHP bugs nicknamed PHP2Shell can give attackers code execution. One lives in a default-on feature that touches any upload endpoint. What's confirmed and what isn't.

PHP2Shell is the nickname for two critical PHP vulnerabilities that allow remote code execution, and if you run PHP, one detail in the write-ups matters more than the scary name. According to Akamai’s analysis, one of the two bugs sits in a feature that is on by default. It can be reached through any endpoint that accepts file uploads, even one that throws the files away.
What happened
Per Akamai, PHP announced on 20 October 2026 that it would release a patch on 21 October at 14:00 UTC for two critical vulnerabilities. The details were meant to follow on 22 October. Akamai says information about them, including the CVE IDs, leaked early.
The nickname comes from the outcome. Both bugs allow remote code execution (RCE), meaning an attacker makes your server run commands of their choosing. Akamai names them like this:
- CVE-2026-109619 is a use-after-free bug in PHP core’s upload progress feature.
- CVE-2026-109618 is memory corruption triggered by an out-of-memory condition.
A use-after-free is what it sounds like. A program hands back a piece of memory, then keeps using it anyway. If an attacker can get their own data into that freed space, the program ends up trusting their data.
Why the default matters
Akamai lists the prerequisites for attacking CVE-2026-109619:
- PHP 5 onward, with
session.upload_progress.enabled = On, which is the default. - Any endpoint that accepts file uploads. PHP’s session layer handles upload progress before your own code runs, so your application never gets a say.
- A build-specific memory offset, which Akamai says can be leaked at runtime or worked out from the target’s exact PHP binary or distribution.
That last point is a speed bump, not a wall. It means a one-size-fits-all exploit is harder, but Akamai doesn’t suggest it is protection.
The mechanism, as Akamai describes it, goes like this. While a file uploads, PHP keeps raw pointers into the session data it uses to report progress. If the attacker pauses the upload for more than a second (the default min_freq rate limit), PHP reloads the session. It frees the old copy but never updates its pointers. The attacker then floods the same request with 149 form fields of 288 bytes each, forged to land in the freed space.
What I’d do
Patch first. If you can’t yet, my own inference is that turning off session.upload_progress.enabled removes the feature that CVE-2026-109619 lives in. I haven’t seen that confirmed as an official workaround. It also wouldn’t touch CVE-2026-109618, which Akamai describes as a separate bug. All-in-all I patched my servers as soon as the patch was available and often the docker container might take a day or two longer but it’s far easier to adopt a new container than hand-roll your own.
Finishing up
The lesson isn’t the nickname. It’s that the riskiest code is often a convenience feature nobody remembers enabling, running before your application code starts. Most teams audit what they wrote. Far fewer audit what the runtime does on their behalf. Also, a patch announced a day ahead, with the IDs leaking before the details, is a reminder that the window for tidy planning is short.




Comments