The worst assumption about PHP2Shell is that a framework or CMS shields you. The flaws sit in PHP core, so WordPress, Drupal and custom code inherit the exposure from the interpreter beneath them. Patching the PHP runtime is the only complete fix, and the PHP project has published fixed releases and backports for several end-of-life branches.
What is PHP2Shell and which CVEs does it cover?
PHP2Shell is a pair of unauthenticated remote code execution vulnerabilities in PHP core, tracked as CVE-2026-109618 and CVE-2026-109619. Both let an attacker who can send HTTP requests run commands on the server, and because the flaws sit in the interpreter rather than in a framework or CMS, they reach every application the affected PHP build serves.
Aikido Security described the pair in a video published on 21 October 2026. The vulnerable code path is reached when PHP runs out of memory while reading a request, according to that briefing. The exact exploitation detail is beyond what this article can verify independently, so treat the memory-exhaustion mechanism as the vendor's account rather than a reproduction.
The affected range starts at PHP 5.4, released in 2012, which turns a modern runtime bug into a legacy-estate problem. Applications pinned to old branches for compatibility are exposed on the same terms as current ones.
Are you exposed by PHP2Shell? Version and exposure checks
You are exposed by PHP2Shell if the server runs any PHP release from 5.4 onward that has not been updated to a fixed build. Exposure is a property of the interpreter version, not of the framework, CMS or hosting provider, so the first step is to record the exact PHP version on every host, container image and shared-hosting account you own.
The Aikido briefing points to a public checker at the PHP2Shell site. Its header-and-timing pass gives a quick signal; a positive result confirms exposure, while a negative result does not clear you, because the check reads only what the server exposes. The deeper check exercises part of the exploit path and can disrupt the site, which is a decision to make deliberately rather than on production traffic.
Use the quick check as triage, not as evidence of safety:
How to patch PHP2Shell fast
The complete fix for PHP2Shell is to run a PHP release that contains the upstream fix. The PHP project publishes corrected builds for each supported minor branch, so the fastest route is to identify your branch, apply the matching patch release, and retest the application rather than jumping major versions under time pressure.
The PHP project's own advisory lists the fixed versions and the mitigations for sites that cannot upgrade. Link to the advisory from php.net and confirm the exact version numbers there before staging a rollout, because release numbers move and a misread table is a failed patch.
If you run containers, a rebuilt image based on a fixed PHP base image avoids touching application code. Aikido offers secured PHP containers distributed through a public registry; verify the image tag, registry and digest before pointing a production build at it.
Which PHP versions are still unpatched or end-of-life?
PHP branches before 8.1 are end-of-life, yet the severity of PHP2Shell led to selective backports for 7.4, 8.0 and 8.1. Supported branches 8.2 through 8.5 receive the standard patch releases. Anything older than 5.4 falls outside the reported affected range, which does not make it safe to run.
End-of-life status matters after the emergency patch. A backported fix for 7.4 does not restore vendor support, security fixes or compatibility testing for future releases. Treat the backport as time to plan an upgrade, not as a destination.
Is PHP2Shell fixed by framework upgrades or mitigations?
No framework upgrade fixes PHP2Shell, because the flaws live in PHP core. WordPress, Drupal and custom applications all inherit the interpreter's behaviour, so a CMS update or plugin patch addresses a different class of problem. The mitigation list published with the advisory can reduce exposure when patching is impossible, but it does not remove the vulnerability.
Those mitigations, which include removing the memory limit, lowering the maximum POST size and turning off session upload progress, change the conditions under which the vulnerable path is reached. PHP's advisory describes them as mitigations, not a fix, and the wording should be read literally.
How do you tell whether PHP2Shell was already exploited?
A PHP web server should serve pages and little else. Outbound command execution, unexpected file downloads, new processes spawned by the web user, or connections to unfamiliar hosts are the signals to look for, and they mean the same thing across WordPress, Drupal and bespoke code.
Because every application logs differently, a baseline helps more than a signature. Record which processes, outbound destinations and file writes are normal for each site, then compare. Community monitoring tools can help, but they are unofficial, so review what they collect before running them on production.
What should you do first if you run PHP today?
Start with an inventory, then patch, then verify. That order matters because the patch release depends on the branch you find, and verification is the only way to know the fix reached every host.
FAQ
- What are the PHP2Shell CVE numbers? The pair is tracked as CVE-2026-109618 and CVE-2026-109619, both unauthenticated remote code execution flaws in PHP core. The PHP project's advisory is the authoritative source for the affected and fixed versions.
- Does PHP2Shell affect PHP 7 and PHP 5? The reported affected range starts at PHP 5.4, released in 2012, so older branches are in scope until patched. Selective backports exist for 7.4, 8.0 and 8.1 even though those branches are end-of-life.
- Does upgrading my CMS fix PHP2Shell? No. The flaws sit in the PHP interpreter, so a CMS or framework update does not remove them. Patching or replacing the PHP runtime is the fix.
- Is there a fix if I cannot upgrade PHP? PHP's advisory lists mitigations such as removing the memory limit and lowering the maximum POST size, but describes them as mitigations rather than a complete fix. A fixed container image keeps the application version while replacing the vulnerable interpreter.
Fork this article
Start a new branch from the same video, shaped your way. You keep the credit; the original keeps the attribution.
A fork in another language is filed as a translation of this article, so the two pages point at each other. You can unlink it later from the editor.
0/240
You are creating
- Format
- For
- Language
- Source
- Your angle
You will be asked to sign in before it is generated.
Buy credits