- Home
- Hacker Analysis
- PHP2Shell: The Demo Works, Real Sites Are Harder
PHP2Shell: The Demo Works, Real Sites Are Harder
PHP2Shell is a confirmed remote code execution risk, with exploitation conditions that vary between deployments. PHP released fixes for CVE-2026-109618 and CVE-2026-109619 on 21 October 2026. Both carry a CVSS v4.0 score of 9.2; that severity score describes impact and attack conditions, not a percentage of websites an exploit can compromise. PHP security announcement.
PHP-FPM blocks a particular startup-triggered chain; it does not make vulnerable PHP immune. The PHP security team explicitly reports unauthenticated RCE against both mod_php and FPM, conditional on the affected state, configuration and application behavior. The practical question is which chain reaches a given deployment. Security-team statement, 21 October.
Research review: 23 October 2026. This analysis distinguishes maintainers’ confirmations, attributed test results and questions the available evidence does not settle.
October 23 update:
CVE-2026-115560concerns a rare runtime change of the session serializer. The October 21 releases fix the two original CVEs; this separate case still needs assessment. PHP recommendssession.upload_progress.enabled=0until the next bugfix release; applications that never change the serializer at runtime are outside the described case. PHP advisory.
Confirmed exploitation and the evidence boundary
We distinguish a successful demonstration, an observed exploit attempt and a confirmed production compromise. A demonstration establishes the tested combination; telemetry establishes what was observed at its collection point. Neither supplies a global compromise rate.
Wiz documents code execution against WordPress, Drupal and Joomla deployments and, separately, disclosure of PHP process memory. The CMSs are examples built on the same engine, rather than three application flaws that must all be present. These demonstrations are not a census of successful intrusions across the Internet. Original Wiz research.
Rapid7’s review reports working exploitation under narrow lab conditions and no broadly reliable public chain in its assessment. Sansec’s 22 October update likewise reduced its expectation of indiscriminate mass exploitation while identifying both mod_php and FPM as affected. These are assessments of the techniques and conditions reviewed, not a measured global failure rate.
Two engine flaws with different failure mechanisms
These are defects in PHP’s runtime, beneath WordPress, Drupal, Joomla and custom application code. Updating a CMS does not replace updating the PHP service that executes it. Some mod_php paths are reachable before the target script runs; other paths depend on application behavior.
Both flaws concern the lifetime of internal request state: when it becomes valid, how errors interrupt processing and when references are reset. Memory disclosure, code execution and process termination are distinct outcomes that need separate evidence.
With CVE-2026-109618, an out-of-memory bailout can interrupt an operation while internal data is only partially initialized. Request cleanup may then read or branch on that invalid data. The security problem is the handling of the interruption, not merely exceeding a memory budget. PHP’s OOM advisory.
With CVE-2026-109619, worker-global state can retain references into a request heap after that memory has been released. A later operation in the same worker can consume the stale state before normal initialization resets it. Producers include more than one kind of fatal interruption. PHP’s stale-state advisory.
The CVEs do not prescribe a fixed sequence of “109619 for the leak, then 109618 for the shell”: both advisories describe paths to RCE.
Request-owned memory can be released while a persistent worker still retains a reference to it.
Worker privileges determine the immediate impact. Code execution can expose application files, database credentials or other secrets accessible to that process; it does not by itself establish root access, container escape or access to every tenant.
PHP-FPM: startup failures and confirmed RCE
Memory exploitation also depends on how PHP runs. mod_php integrates PHP into Apache; PHP-FPM uses pools of processes called workers. Red Hat documents this distinction in its standard environments: with FPM, certain early failures terminate the worker and obstruct exploitation. Red Hat bulletin.
The evidence is visible in PHP-FPM 8.4.26’s source: when php_request_startup() fails, that branch terminates the worker with FPM_EXIT_SOFTWARE. A terminated process cannot consume corrupted state in the next request. This applies to that failure during request startup, not to every PHP error. With mod_php, request shutdown still runs after failed startup, allowing the vulnerable cleanup path to proceed. PHP maintainers’ comparison.
A request aborted by PHP is not the same as a process crash. In the mod_php path described here, the request fails while the process can continue through cleanup. A genuine process-terminating crash also kills an Apache worker; Apache does not preserve that dead process’s memory for a later request.
For the stale-state flaw, maintainers require a concrete sequence: an operation leaves invalid data, the worker survives, and another request uses it before ordinary initialization resets it. More workers and worker recycling complicate the sequence; they do not eliminate it. We have no data supporting a universal success probability. PHP’s documented prerequisites.
The PHP security team’s 21 October announcement explicitly confirms RCE against mod_php and FPM. For the session lifecycle, the detailed advisory records a validated FPM path on a normal dynamic pool: the producing operation occurs during application execution after successful startup. A suitable application operation is still required.
The sources also have different scopes. The OOM advisory states that a complete FPM exploit has not been demonstrated for its case, while the PHP Foundation’s release account reports application-level FPM RCE. We retain those qualifications rather than treating the descriptions as one portable chain.
Worker count is not an exploit success rate
With uniform, independent dispatch to N workers, a consumer request has a 1/N chance of reaching a specified worker. In the same simplified model, k requests have a match probability of 1-(1-1/N)^k, which increases with attempts. This is a routing model, not a PHP2Shell RCE probability: state survival, resets and usable memory behavior remain separate conditions. Real dispatch need not be uniform or independent, and the documented pool-targeting variants prevent treating worker count as an absolute barrier.
This compares distinct paths in vulnerable PHP. The confirmed FPM path needs a suitable application operation: dinosn’s PoC limitation does not apply to all FPM exploitation. Sources: OOM corruption advisory, stale-state advisory.
ASLR bypass and the remaining portability constraints
ASLR makes addresses less predictable. A memory disclosure can supply addresses that a chain needs, without supplying execution control. Knowing a location and being able to make PHP perform a useful operation at that location are separate capabilities.
On October 22, VulnCheck reported RCE on PHP 8.4.26 x86-64 with ASLR enabled and error display disabled, later reporting compatibility with 8.4.10–8.4.26. It also reports testing a public PoC in a particular setup. These are vendor results, not ours or confirmed intrusions. Its ARM64 RCE limitation concerns that implementation, not the architecture. VulnCheck’s updates.
Heap grooming means arranging allocations to make corruption predictable. It does not mean every request to a website writes to one shared heap: workers are processes with separate address spaces. Traffic can affect request assignment and the history of an individual worker; a different process cannot directly modify its memory. This is an architectural distinction, not our measurement of reliability. Linux semantics for processes created with fork.
“New worker, every address changes” is also unreliable. FPM creates children using fork(), which replicates the parent’s memory according to the Linux documentation. Our architectural inference is that replacement does not guarantee fresh randomization of every address; this does not mean all later allocations are identical.
Triggering out of memory also needs a precise description: exceeding a request’s limit does not mean exhausting the machine’s RAM. A small HTTP body can expand into larger internal structures. PHP’s advisory confirms RCE with default limits and multiple Apache workers: an 8 MB cap and one process simplify some demonstrations without being universal requirements. PHP’s documented evidence and limits.
Six public repositories: reported results and portability limits
We compared the following six revisions through static review of their documentation, configurations and relevant source. The table attributes execution results to the repository authors; it is not our own reproduction.
| Repository and pinned source | Reported or readable evidence | Limitation that matters |
|---|---|---|
| devploit/php2shell | Five profiles report RCE, including ARM64; others stop at disclosure or fail at the final stage. | Mod_php and build-specific profiles. FPM and disabled error display remain outside this chain’s verified scope. |
| dinosn: stock chain | Reports RCE 3/3 on 8.4.26 and 8.5.11: 128 MB, 8 MB POST limit, error display disabled. | Five workers: disclosure 6/10, execution 0/20; a variant for the default 150-worker pool reports success. These are lab results. |
| alvarodh5/php2shell | Reports RCE on 8.4.26 and 8.5.11 x86-64. | One mod_php worker, displayed errors. Its configuration uses 16 MB, rather than 8. |
| godylockz/php2shell | Mod_php prefork chain with build profiles. | An 8 MB lab with displayed errors; lack of FPM support is a limitation of this tool. |
| ikow/php2shell-poc | Also publishes FPM Chain C; D/E are offered to paid subscribers. | C needs application conditions; its code uses a lab class that needs a genuinely exploitable counterpart in the application. |
| Is4yev/php2shell-poc | Includes claimed RCE chains alongside a crash demonstration expecting HTTP 503. | Also includes LFI and a module for another Joomla CVE: not every result establishes exploitation of the two PHP flaws. |
The change from the five-worker test to the default-pool variant matters: multiple workers are not an absolute barrier for this chain. It remains a reported lab result to assess against the frontend and build.
A reverse proxy provides a concrete example: with request buffering enabled, Nginx reads the entire body before forwarding it upstream. We infer that timings observed when connecting directly to Apache do not automatically carry over to that path. This is a documented architectural difference, not our demonstration of failure or a guarantee of protection. Nginx documentation.
Documents within one repository also have different scopes. PROOF-BOUNDARY describes a debugger-assisted experiment with a modified allocator; it is not a verdict on every later chain. Executing a command establishes RCE without establishing a stable interactive shell or administrator privileges.
Devploit includes automated profile derivation. Build-specific calibration remains relevant even when symbol extraction is automated: the allocator layout and reachable operations must also match. Several projects acknowledge common ancestry in 9bie’s work, so repository count should not be treated as a count of independent confirmations. Devploit’s method and attribution; godylockz’s attribution.
Scanners, crash demonstrators, application-dependent chains and engine-level RCE establish different things. Fork counts, download availability and paywalls do not measure exploit reliability.
A PoC failing on PHP 8.3 does not establish immunity for that branch: PHP identifies 8.3.36 as the first release fixing the two CVEs, as shown below.
Observed attack activity and telemetry limits
Hunt.io reports that, by 23:45 UTC on October 21, one operator had made ten passes over a list of up to 123 servers without logging a successful shell. Around 57 were identified as PHP. This establishes a failed campaign, not a test of 123 confirmed-vulnerable installations or a global risk measurement. Hunt.io’s observations and log analysis.
AWS also distinguishes attempts from outcomes: MadPot telemetry records activity from October 17, before disclosure, but the report explicitly leaves success on real systems uncertain. A scanning alert does not certify an intrusion. AWS’s original telemetry report.
SOCRadar recovered tooling that leaks addresses through a session cookie, tested in a specific mod_php lab. Its external-target observations describe preliminary checks and no observed shells. It examines the same attacker server as Hunt: the samples are not independent campaigns to add together. SOCRadar’s original analysis.
For Mirai, Arctic Wolf links the activity to infrastructure used by a botnet variant, without confirming payload execution. It also does not establish that a missing leak or calibration caused any failure. Arctic Wolf’s telemetry limitations.
The observation windows also differ. Huntress reported no exploitation on partner systems as of 21 October, 16:30 ET. SOC Prime’s pre-release post summarizes other researchers’ observations rather than adding an independent incident sample. watchTowr’s FAQ, updated 23 October, reports exploitation observations through its honeypots since 21 October, without a denominator for compromised production servers. These statements do not establish zero compromises across the Internet.
Research updates and dated posts on X
21 October — research and interim guidance. Calif announced its technical research; Costin Raiu relayed its mitigation guidance, including measures for FPM. These were path-specific interim measures, not a declaration that FPM was immune.
22 October — attempts at scale. Matthew Prince reported Cloudflare observations rising from thousands of attempts before the announcement to millions afterwards. His post describes attempts, not a count of successful intrusions or vulnerable installations.
22 October — a separate post-patch claim. Rafał reported RCE on PHP 8.5.12 through a different logic flaw; Felipe Daragon emphasized specific session configurations and application weaknesses. These posts do not establish that the two original fixes failed, or independently verify a universal replacement chain.
23 October — clarification of practical risk. Marcus Hutchins (MalwareTech) distinguished unreliable public PoCs from functional exploits and stated that FPM was not immune. We treat this as the researcher’s assessment, not a reproducibility matrix; the stronger technical basis is the PHP team’s disclosure. The longer post was checked using its public text mirror.
Which PHP versions need attention
These are the first fixed upstream releases. Where your supported branch has newer updates, follow your provider’s current guidance.
| PHP branch | First fixed release issued on 21 October |
|---|---|
| 8.2 | 8.2.35 |
| 8.3 | 8.3.36 |
| 8.4 | 8.4.27 |
| 8.5 | 8.5.12 |
This table describes PHP’s own releases. A distributor may apply the fixes to a differently numbered package through a backport. In that case, check its security advisory and the complete package version, rather than judging the first few digits alone. Red Hat’s explanation of backporting.
PHP 8.1 and earlier no longer receive normal upstream support. The maintainers have provided minimal source backports for some old branches; those are neither a promise of future maintenance nor evidence that your host installed them. You still need a migration plan. PHP 8.2 also reaches the end of security support on 31 December 2026. PHP support lifecycle.
Validate the running deployment
- Inventory the domains, containers and pools that serve PHP. Record the SAPI and full package/build identifier;
php -vin a terminal may identify a different runtime. - Confirm the vendor’s fixes for both original CVEs. Restart or replace the workers and check every replica behind the load balancer.
- Check effective startup configuration and application session-serializer changes. Review frontend request limits and overrides; assess the October 23 advisory separately.
- Verify essential application behavior after rollout, including logins, uploads and scheduled jobs. Preserve the change record and monitor for unexpected worker failures or execution.
Temporary measures have specific limits
Match each measure to the path it interrupts. PHP settings must take effect before the vulnerable processing, with every affected worker restarted.
| Measure | Affected part of the path | Limitation |
|---|---|---|
| Update PHP and replace running workers | Engine defects in the two original CVEs | Assess the October 23 advisory separately. |
session.upload_progress.enabled=0 | Early session lifecycle paths | Does not cover every stale-state family. |
fatal_error_backtraces=0, on PHP 8.5 | Fatal-error backtrace state | Does not cover session paths. |
| Frontend limits on decoded bodies, multipart input and read times | Memory pressure and resource occupancy | Exposure reduction, not an engine fix. |
Consider pm.max_requests=1 on FPM | State reuse across requests | Operational cost; does not fix paths within one request. |
Sources: OOM mitigations, stale-state mitigations and FPM worker lifecycle.
For the memory-related issue, the advisories discuss memory_limit=-1 alongside external limits and request controls. This is not a setting to copy blindly: it removes PHP’s own memory cap and can increase the risk of exhausting resources. An administrator must assess the trade-off; it is not a complete fix. PHP guidance and warnings.
A WAF may reduce some known attempts, but does not rewrite the engine. Hiding the version with expose_php=Off reduces disclosed information, rather than repairing the vulnerability. PHP manual. If exposure remains unacceptable and patching is not available, discuss isolating or suspending the affected service with the responsible technical team. NCSC guidance.
What to investigate if you suspect an attack
Another possible consequence is denial of service, meaning the service becomes unavailable. Repeated errors and worker turnover can consume capacity needed by legitimate requests, even without successful code execution. The effect depends on workload and architecture: we cannot claim that every attempt crashes a worker or that this is always the dominant risk.
Memory errors, HTTP 500 responses and worker restarts deserve attention, but can have other causes. Correlate them with incoming requests, timestamps, file changes, child processes and outbound connections. A WAF block records what that rule intercepted; it does not certify traffic that took another path.
If you find unexpected execution or alterations, involve your incident-response team, preserve evidence and restrict access to the system. Patching closes the defect; it does not automatically remove access an attacker already obtained. Decisions about rotating secrets or restoring systems should follow an assessment of what was exposed. A crash alone neither proves an intrusion nor rules out code having executed before termination. A functioning website also does not rule out access already obtained.
Review method and open research questions
We reviewed the PHP disclosures, relevant source control flow, Calif’s original research and the six repository revisions linked above. Repository results are attributed to their authors: we did not execute those PoCs. Social-post authors and dates were checked against public X embed metadata; a social assertion does not override a technical advisory.
The Wiz CVE catalogue entry is labelled as generated using AI; it is separate from the original research blog cited here. Catalogue technology tags and exploit-availability flags are not reproduction evidence.
Broader portability, reliability under representative production traffic and a denominator for successful attacks remain unresolved. Reports of unsuccessful attempts do not establish that exploitation cannot scale; new evidence must identify the build, SAPI, application conditions and observable outcome.
Our assessment is that exploit complexity belongs in prioritization and incident analysis, alongside verified patch status. Continue with our security analysis category and post-quantum cryptography explainer for related security coverage.