The scary part of the PHP RCE flaw is exactly how small the attack window is. Exploiting it in a real deployment takes worker pinning, fingerprinting, and a lot of patience, yet the bug still lets an unauthenticated attacker run code on a web server.
What was the PHP RCE flaw in October 2026?
The PHP RCE flaw is a remote code execution vulnerability in the PHP worker state. Two related bugs were disclosed in October 2026 after a Hacker News post and a leaked exploit video forced the PHP project to move up its coordinated release schedule.
PHP is a server-side scripting language used by WordPress and Wikipedia, among many other systems. The PHP project maintains the runtime that parses all those pages. The maintainers had discussed patching at least one of these issues back in 2024 but could not work out a reliable exploit path at the time.
How do these PHP exploits break out of their worker threads?
Both bugs abuse per-worker state that survives a failed request. PHP serves each HTTP request through one of many worker threads, and a destroyed request can leave dangling references inside the worker's global state. A second crafted request then reuses that stale memory to run attacker-chosen code.
The first bug leaves stale pointers when a request is torn down during an error path. The second uses a C longjmp that PHP relies on for error handling. When the interpreter hits an out-of-memory condition, the longjmp fires and jumps to the wrong place, so the worker's state is not fully reset. Either bug ends the same way: the next request operates on memory it should never touch.
longjmp is a C library routine for non-local jumps, typically used to unwind out of deeply nested calls. PHP uses it to recover from fatal errors such as memory exhaustion. The second vulnerability is of interest because the error handling itself becomes the attack surface.
How did the exploit demo run code as www-data?
A publicly available exploit ran id as the web server's user, not the attacker's. The demo below is based on the walkthrough in the Computerphile video and uses an exploit published by a group identified as 9bie, with an English translation.
The speaker hosted a one-line PHP page on a local server on port 18110. A curl request returned "ok". The Python exploit then sent a sequence of requests that pinned a single PHP worker, triggered the stale state, and wrote the output of id into a file named p1 in an empty out folder.
Reading out/p1 showed the process identity as www-data, the standard Apache user. That result is the proof of remote code execution: the attacker's command runs inside the web server's own process, with the web server's privileges.
Why pinning 150 workers makes the PHP RCE flaw harder to exploit in the wild
The exploit needs to keep talking to the same worker thread, which means exhausting the rest of the worker pool first. Default PHP worker pools contain many threads, and the demo exploit reported pinning 150 workers. That means the exploit sent 149 workers into harmless long-running requests so only one remained to receive the malicious sequence.
The technique also demands reconnaissance. In the video, the speaker notes an attacker needs to know the PHP version, the operating system, the C compiler, and the compile-time configuration. The worker pool must remain pinned throughout the sequence, and any unrelated request that lands on the chosen worker can destroy the state before the exploit completes.
In practice this raises the bar enough that no scripted mass exploitation appeared in the days following disclosure. The Computerphile speaker treats the absence of widespread attacks as evidence that the exploit is difficult, not evidence that administrators can relax. Patch anyway.
Which PHP versions needed patching and when were fixes released?
The PHP project released patches on 14 October 2026 for every maintained branch back to PHP 5, because the underlying flaw had existed in PHP releases for roughly 14 years. The table below summarises the exposed components and the current state on 10 November 2026.
| Component | Status in October 2026 | Action on 10 November 2026 |
|---|---|---|
| PHP runtime | RCE in worker state | Apply the latest patch release for your branch |
| WordPress | Inherits the PHP runtime | Update PHP; the CMS itself was not the bug |
| Wikipedia | Ran at-risk PHP | Reported to have patched |
| 4chan and Something Awful | Took sites offline | Recovered after patching |
| PHP 5.x sites | Unsupported upstream | Migrate to a supported branch |
The Computerphile speaker lists affected ranges as spanning PHP 5 through PHP 8.5. PHP 5 has been unsupported upstream for years, so sites still running it depend on distro backports or have no legitimate patch path at all.
WordPress itself was not the source of the vulnerability. WordPress is a content management system, not a PHP runtime. Any PHP application, from a custom script to a major CMS, inherits the bug from the interpreter it runs on. That is why the fix lives in the PHP package on the server, not in the CMS.
How do you patch a PHP RCE flaw safely?
Update PHP to the newest patch release on every branch your servers run, restart PHP-FPM or Apache, and verify the running version with php -v. If you cannot patch within the window your regulator requires, take the site offline rather than leave it exposed.
- Inventory every host running PHP, including container images and shared-hosting accounts.
- Apply the latest patch release for each PHP branch from the PHP project's release announcements.
- Restart the PHP-FPM pool or the Apache module so the patched interpreter handles new requests.
- Confirm the running binary with
php -vand a page that echoesPHP_VERSION. - Pin your container base images to the patched tags so new builds do not reintroduce the vulnerable interpreter.
- Review logs for the worker-pinning pattern described above, especially bursts of long-running requests to a single PHP worker.
The UK NCSC and its international counterparts publicly urged administrators to patch or take vulnerable sites offline. If you run WordPress, this also means testing the newer PHP branch before switching, because plugin compatibility can lag the runtime release.
The role of YouBlog, Dev doido and CrazyStack TypeScript in learning from this disclosure
YouBlog and Dev doido communities cover offensive and defensive tooling, and a walkthrough like the one in the video is exactly the kind of material that can move from theory to practice. CrazyStack TypeScript is a Spanish-language course by Dev doido that teaches TypeScript for building production applications. It is a reasonable place to start if you want the frontend and API layers of a site to be less dependent on a single runtime.
FAQ
- What is the PHP RCE flaw? It is a remote code execution bug in PHP's worker state that allows crafted HTTP requests to run arbitrary code on a web server as the server's user, such as www-data.
- When were PHP patches released? The PHP project shipped patches on 14 October 2026 across its maintained branches after early disclosure forced the release to come sooner than planned.
- Does WordPress itself have the vulnerability? No. WordPress is a CMS written in PHP and inherits any runtime vulnerability from the PHP interpreter you install on the server, so patching PHP protects the site.
- Is the PHP RCE flaw hard to exploit? Yes. A working exploit needs to pin a large worker pool, fingerprint the PHP build, the OS, and the compiler, and avoid unrelated requests that would collapse the state.
- What should I do if I cannot patch? Take the site offline until you can. The UK NCSC and its counterparts recommended that approach when a fix cannot be applied immediately.
- Does page caching or a WAF fully fix it? A web application firewall may block some request patterns, but only an updated PHP interpreter fixes the root cause. Do not treat a WAF as a substitute for patching.
- Does the flaw affect PHP 5 sites? The Computerphile speaker says the flaw existed across PHP 5 through PHP 8.5. PHP 5 is unsupported upstream, so those sites need migration or a distro backport.