Responder Guidance for PHP2Shell (CVE-2026-109618 and CVE-2026-109619)
Two memory-corruption flaws in the PHP engine itself allow an unauthenticated attacker to achieve remote code execution, one by exhausting memory during request parsing and one by reusing freed request state across requests on the same worker. Because the bugs sit in the runtime rather than any application, any vulnerable install that an attacker can reach is exposed, with the highest risk under mod_php.
bishopfox.com
Published on bishopfox.com
On October 21, 2026, the PHP project disclosed two critical memory-corruption vulnerabilities that can allow unauthenticated remote code execution. Both are fixed in PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely improper handling of partially initialised request data during out-of-memory cleanup and a use-after-free of request-scoped serializer state reused by a later request on the same worker.
Impact
An unauthenticated attacker could achieve remote code execution on vulnerable installs, though under PHP-FPM and php-cgi the direct out-of-memory path only crashes a worker, and opcache, error display settings, memory limits and architecture change how reliably an exploit lands.
What the attacker needed
Attacker can reach the PHP service; vulnerable PHP version; mod_php raises risk of code execution; same worker reused for second flaw
How it was found
- Send a request crafted to exhaust memory while PHP is still parsing it, such as a multipart POST with a very large number of per-part header lines.
- The out-of-memory condition interrupts parsing while request data is only partly initialised, and cleanup then treats that invalid data as valid, giving a corrupted-memory primitive.
- For the second flaw, cause a request to die partway through, for example with an induced fatal error or timeout, so request-scoped state is freed while still referenced.
- Send a later request to the same worker that reaches the stale state through a feature such as session upload progress, turning it into a forged object.
- Groom the resulting primitive into attacker-controlled execution, which on mod_php happens before any application code runs.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
PHP is the software that runs a huge share of websites, and these two bugs are inside PHP itself rather than in any particular website feature. One bug is triggered by sending a request that uses up memory while PHP is still reading it, and the other by making a request fail halfway so that leftover data is reused by a later request. In the worst case an attacker can make the server run their own code without logging in, so the only real fix is updating PHP.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.