Enviera

PHP2Shell: check for compromise after patching

Last updated: 29 October 2026

Short answer

As of 29 October 2026, a patched PHP version is not a verdict on earlier compromise. Review your server's retained logs, process activity, files and accounts. AWS advises investigating from at least 17 October, the earliest date in its reported observations; do not treat that date as the first possible attack anywhere. AWS

Not sure which PHP your site uses? Start with Am I affected by PHP2Shell?. Check my PHP version compares version text with fixed releases. It does not scan your server, validate backports or check for compromise.

What has changed in the public evidence?

The old uncertainty about successful pre-disclosure attempts is a dated observation. It should not be presented as today's evidence that no real systems were affected.

What the dated reports establish

AWS's 21 October report describes an attempt observed in MadPot on 17 October 2026, the earliest attempt in AWS's reported observations. It also describes further attempts before disclosure on 21 October, with different payloads and infrastructure suggesting multiple actors. Its uncertainty about success on real systems concerns those pre-disclosure attempts. After the 21 October patch release, AWS observed further activity and described broad exploitation attempts in the wild. AWS advises investigating from at least 17 October. That is an investigation starting point, not proof that attacks could not have happened earlier. AWS, 21 October

Canada's 27 October update cites open-source reporting that both CVEs are being exploited in the wild and CISA's addition of both to its Known Exploited Vulnerabilities catalog on 26 October. Canada is relaying those sources, not describing its own detection. The earlier no-active-exploitation paragraph still on the advisory is historical. Canadian Centre for Cyber Security, Update 2

Morphisec's 28 October report attributes Windows IIS/PHP-CGI activity to PHP2Shell and describes an IIS worker spawning PHP-CGI, then a command shell and a packed payload attempting an outbound reverse shell. Morphisec says it blocked the post-exploitation payload and explicitly says it did not detect PHP2Shell itself. This is a vendor-attributed process chain, not independent proof of the initial PHP exploit or the first Windows attack anywhere. Morphisec, 28 October

These reports justify investigating exposed systems. They do not establish whether your particular server was compromised.

Preserve the evidence you have

Huntress advises preserving web server and PHP logs when suspicious activity is found. Canada's advisory calls for reviewing web server, application, authentication and endpoint logs. Our recommended preparation is to preserve available copies before cleanup or other changes and record which dates and systems those logs cover. Missing logs are an investigation limit, not a clean result. Huntress, Canada

Step 1: review requests and AWS's addresses

AWS recommends looking for POST form uploads containing PHP_SESSION_UPLOAD_PROGRESS, suspicious web requests, unexpected process execution and file changes. Its report lists these addresses and observation dates: AWS

AddressObserved by AWS
103.216.220.9217 October 2026
31.223.184.16621 October 2026
37.19.200.521 October 2026
134.209.159.6421 October 2026
103.114.163.18821 October 2026
95.217.98.3721 October 2026

AWS says these include shared anonymization infrastructure and are not exclusive to this activity. Investigate a match rather than automatically blocking it or declaring a breach.

Check what your logs actually retain. Apache's Common and Combined Log Formats record the request line, not the POST body. The absence of the upload-progress string in those logs does not show it was absent from a request. Search existing body-capturing logs only where available. This limitation follows from the documented formats. Apache logging documentation

Step 2: review processes started by PHP

Look for unexpected child processes beneath the PHP or web-server worker, and correlate their times with requests and outbound connections. AWS recommends investigating unexpected process execution. Huntress's 20 October article describes shells, interpreters and download tools as expected signs to investigate; its IOC section still lists no confirmed indicators when read on 29 October. Its examples must not be recast as confirmed PHP2Shell incidents. AWS, Huntress

For Windows IIS, Morphisec's report describes this chain:

w3wp.exe → php-cgi.exe → cmd.exe → packed payload

The report says the payload attempted an outbound reverse shell and was blocked after exploitation. Morphisec explicitly did not detect the initial PHP2Shell exploit. Review retained endpoint process and network records for related activity; the chain alone does not establish the cause of an event on your server. Morphisec's report also lists new files in web-accessible directories and worker crashes or restarts as investigation leads. Morphisec

For IIS, review the Windows PHP-CGI process chain and active runtime.

Step 3: review files, persistence and accounts

AWS recommends checking unexpected file modifications. Huntress advises looking for webshells and new files in the web root, new cron jobs, scheduled tasks and accounts. Canada also recommends investigating unexpected commands, files, accounts and outbound connections associated with PHP or web-server services. AWS, Huntress, Canada

Our suggested review order is to compare those changes against known deployments and administrator actions, then correlate unexplained changes with request and process records. Record the time, affected path or account, and supporting log references. A changed file or new account is a lead to investigate, not proof of PHP2Shell by itself. Keep the investigation window open if your own evidence points further back than 17 October.

On shared hosting

Ask the provider for evidence you cannot access yourself. You can adapt this request:

Please preserve and review the available web, PHP, application, authentication and endpoint records for [domain/account] from at least 17 October 2026. Check the AWS PHP2Shell addresses and request indicators, unexpected PHP child processes, file changes, scheduled tasks, accounts and outbound connections. Please identify which logs and dates you can check, any gaps, and the findings. Separately confirm the full PHP package/build and patch status.

This is our request template based on the AWS, Canada and Huntress checks above. For provider patch decisions, see Am I affected by PHP2Shell?.

If you find suspicious activity

Huntress advises isolating the server and preserving web server and PHP logs. The UK NCSC says that, if you cannot update or disable a system immediately, assess it for evidence of compromise and attacker-installed backdoors before upgrade or mitigation; seek incident-response assistance if you cannot do that confidently. Do not turn an update into a substitute for the investigation. Huntress, NCSC

Follow your administrator's containment and incident-response procedure. For an unpatched internet-facing PHP service, Canada's isolation advice and PHP's pre-application mod_php exposure mean that an application maintenance screen is not a substitute for restricting access at the host or network boundary. Canada, PHP advisory

If you find no evidence

State the limits of the check: which records were available and which periods or systems were not covered. A version check cannot fill those gaps.

Wiz demonstrated sensitive-memory disclosure without remote code execution and says that memory can contain passwords, authentication tokens, API keys and certificates. We therefore recommend including possible secret exposure in the incident assessment, even when you find no new file or account. This is a recommendation based on Wiz's finding, not proof that every secret on your server was stolen. Agree the necessary credential changes with the incident responder. Wiz research

Keep patching and configuration checks separate from those findings. PHP's 23 October notice suggests retaining session.upload_progress.enabled=0 until the next regular bugfix release for the separate CVE-2026-115560 path, which requires an unusual runtime switch of the session serialization handler. The affected-page guidance explains where the setting belongs. PHP notice

For related explanations, see PHP2Shell: myths vs facts.

Existing check & patch scope

The PHP2Shell check & patch service covers shared hosting, VPS patch/upgrade, PHP 7.4 to 8.1 backports, a compromise check and a written report. We check the PHP version, SAPI and packages, apply the applicable patch or upgrade, restart workers, and re-check. On shared hosting, we switch versions only where the panel allows it; otherwise the host owns PHP and we send the host the exact request. For servers we patch ourselves, the reported outcome is checked and patched.

The existing checkpoints are a written findings report the same day you request it and patching within one working day after that, followed by an update to the report. Rebuilding a compromised site, code or plugin rewrites, and ongoing monitoring are outside the scope. Findings that need further work are recorded and discussed separately. A link to Windows guidance does not add Windows/IIS service coverage; confirm applicability against the listed service before requesting work.

How we checked this

Read on 29 October 2026: AWS's full 21 October chronology and indicator table; Canada's advisory including its 27 October update; Morphisec's 28 October report and explicit detection limit; Huntress's 20 October article; NCSC's alert published 21 October; Wiz's 21 October research; PHP's 21 and 23 October notices; and Apache's logging documentation (publication date unstated). Sources are linked beside the relevant claims. The checker and service pages were read the same day.

This investigation order comes from vendor and government guidance. We did not reproduce exploitation, inspect your server, or use an Enviera client incident. Morphisec's attribution is retained as its attribution. No absence-of-compromise guarantee is made.