PHP2Shell impact assessment and hunting companion
Deception Check | October 21, 2026
Use this companion to establish exposure, choose temporary controls, and investigate suspicious activity. The PHP release advisory and two linked engine advisories govern remediation; the included queries help investigate the affected workloads.
Establish which workload serves PHP
Start with the service inventory, then reconcile it against host packages, container/image inventories, web-server handlers, FPM pools, supplier SBOMs, and managed-service attestations. Include internal interfaces and supplier-managed web applications; internet exposure determines priority, not whether PHP is present.
For each instance, record the application, business owner, operator/supplier, hostname or service identifier, PHP integration, actual web-worker build, package/image digest, configuration location, exposure routes, available telemetry, and patch owner. Do not publish internal inventories or full configuration dumps.
Use authorized read-only package/process inspection and supplier documentation, not a live exploit. A CLI version check is an inventory clue, not the final answer. Do not upload phpinfo() publicly to inspect configuration. If a temporary diagnostic is necessary, keep it authenticated and private, minimize output, and remove it through normal change control.
Classify each instance:
Swipe tables horizontally to see all columns.
| Finding | Next action |
|---|---|
| Web-serving PHP older than its branch fix, no verified backport | Treat as affected and prioritize remediation |
| Supported supplier package claims both fixes | Match advisory to exact installed build and prove worker rollout |
| Embedded PHP or managed service, build unknown | Keep unresolved; request product/version and rollout evidence |
| No PHP found in your code repository | Continue package, runtime, appliance, and supplier checks |
| PHP installed for CLI only | Establish whether any web handler or other exposed service invokes it; installation alone does not establish the advertised web attack path |
PHP rates both vulnerabilities Critical, CVSS v4.0 9.2. Upstream fixed versions are 8.2.35, 8.3.36, 8.4.27, and 8.5.12 for their respective branches. PHP 8.1 and older are upstream EOL; vendor/LTS backports or an upgrade may be available, alongside PHP's exceptional 7.4/8.0/8.1 source backports. Verify the supplier build rather than the public banner alone. PHP release guidance.
Cloudflare reports affected pre-fix releases extend back to PHP 5.4 and describes data exposure as well as code execution and denial of service. Include secrets available to PHP workers in the impact assessment. Cloudflare overview.
Distinguish the two mechanisms
Swipe tables horizontally to see all columns.
| CVE | Failure | Deployment distinction |
|---|---|---|
| CVE-2026-109618 | An OOM interruption exposes incompletely initialized request state to cleanup | Complete RCE demonstrated on mod_php. FPM startup failure kills the child; the advisory still identifies application-dependent susceptibility but does not demonstrate a complete FPM exploit for this CVE |
| CVE-2026-109619 | Request-owned state survives in a persistent worker and a later request consumes it | Session-lifecycle RCE validated on mod_php and FPM; FPM needs a suitable application operation after successful startup. Producer and consumer requests must reach the same worker |
Inventory all web-serving integrations, including FPM, CGI, FrankenPHP, and LiteSpeed, and use the deployment distinctions above when investigating. OOM advisory, stale-state advisory.
Temporary controls when an update cannot land immediately
Restrict exposure first and assign an owner, a verification step, and a short expiry to each temporary change. Protect application availability and test ordinary uploads, imports, logins, and error handling. Keep a rollback plan. Do not automatically apply a blanket configuration file to every product.
Swipe tables horizontally to see all columns.
| Control | What it reduces | Important boundary |
|---|---|---|
| Remove exposure or enforce access controls before PHP | Untrusted reachability | An application login inside PHP may be too late; check every origin and alternate route |
session.upload_progress.enabled=0 administratively, then worker restart |
Demonstrated early session producer/consumer paths in 109619 | Not a fix for every stale-state path or 109618; ini_set() and FPM .user.ini are too late for this purpose |
PHP 8.5 fatal_error_backtraces=0, then worker restart |
Confirmed 8.5 fatal-backtrace producer | Does not cover other request-owned global state |
| Remove invalid/deprecated early per-request settings and fix reachable fatal errors/timeouts | Specific stale-state lifecycle triggers | Suppressing messages with display_errors, error_reporting, or @ does not prevent the underlying access |
Enforced memory_limit=-1, with separately tested resource controls |
Predictable PHP-limit OOM trigger in 109618 | Removes the PHP per-request cap; allocator failures remain possible and availability risk increases |
PHP recommends post_max_size=8M without required uploads, or 32M when uploads are necessary; keep upload_max_filesize lower |
Reduces accepted POST data under normal PHP size checks | Test application needs; retain an already lower safe cap. Missing/unusable Content-Length and multipart expansion still need frontend controls |
| Frontend limits on decoded bytes, fields, multipart parts, per-part headers, uploads, and nesting | Resource pressure and some input paths | Cover requests without usable Content-Length as well as ordinary uploads |
| Container/cgroup memory boundaries | Availability containment | May kill master and workers together; not a complete exploit mitigation. Do not substitute RLIMIT_AS or RLIMIT_DATA |
| Managed WAF protections and controlled origin routing | Vendor-covered traffic patterns and some data exposure | Not a runtime patch; inspect effective block/log action, bypasses, parser/body limits, and exceptions |
Apply settings at the correct administrative layer, verify effective values for every worker/pool, and ensure overrides cannot undo them. Startup configuration and FPM pool values differ from frontend-supplied PHP_VALUE/PHP_ADMIN_VALUE applied before request initialization; FPM .user.ini applies later. Do not treat them as interchangeable attack or mitigation contexts. The session path is independent of INI diagnostics. PHP advisory details, PHP OOM controls.
If safely reducing exposure is not possible while the update is blocked, escalate the decision to restrict or take the service offline. The NSA advisory recommends offline containment where immediate updating is infeasible; UK NCSC guidance says to consider it if temporary mitigations cannot be applied or would take too long.
Prove the vendor and deployment chain
For vendor products, obtain the fixed product build, package/image reference, both-CVE coverage, deployment instructions, restart requirements, and interim restrictions. Ask whether the vendor's hosted-service rollout is complete for your tenant, region, or edition. Avoid changing an appliance's embedded interpreter outside supported vendor instructions.
Track these separate milestones: upstream patch available; supplier release available; release deployed to your environment; running workers verified; exposure and historical activity assessed. Record “supplier reviewing” or “runtime unknown” as open states, not remediated states. The included supplier-request template can be sent through your existing support channel.
Hunt in plain language
Find unusual failures around request activity
Look for clusters of PHP memory exhaustion, fatal errors, timeouts, worker exits, or restarts and compare them with request rate, route, content type, decoded body size where collected, and WAF events. Baseline expected application faults and known load tests; retain available request-structure and error context.
Annotate upgrade times in this baseline. The fix introduces graceful soft-OOM handling and a higher hard-OOM threshold that immediately terminates the process using _exit(). Hard-OOM worker exits can therefore reflect the new protection. Investigate their memory and request context rather than suppressing them wholesale. PHP OOM change.
Preserve UTC timestamps, trusted request IDs, origin address/service, worker/process identity where available, and deployment timing. A client-supplied correlation header is not automatically a trustworthy identifier. Adjacent requests in a load-balanced access log do not prove they reached the same PHP worker.
Ask whether the worker behaved differently
Review unexpected children of PHP or web processes, outbound connections, new/modified scripts and configuration, writes into writable web paths, persistence changes, and changes to service accounts. Confirm application owners' expected workflows before escalating a legitimate export or maintenance job.
PHP commonly launches commands through a shell. The direct-child hunts already capture that shell; follow its command line and descendants to understand the action. The Defender and Falcon context queries add a shell-child tier where the required grandparent fields are populated. Other formats retain direct-parent matching.
Local mail delivery through a configured sendmail command, image/video wrappers, maintenance jobs, and deployment hooks can produce legitimate matches. Check owned paths, command lines, service accounts, and application behavior together; a broad sendmail-text exclusion would hide unrelated activity too.
Interpret the evidence together. Process, error, and file matches are investigation leads, not CVE attribution. Memory disclosure and in-process activity can leave no child process or file. Record missing endpoint/container visibility and retention gaps when assessing a quiet hunt.
Separate edge action from origin outcome
For each relevant WAF event, retain the matched rule, action, transaction ID, host/path, and origin evidence. Cloudflare describes request-and-response correlation within one HTTP transaction; that is different from correlating two requests that share a PHP worker. A response-phase block can prevent that response reaching the requester, but cannot rewind origin processing. Cloudflare PHP2Shell protection, full transaction detection.
Select the appropriate detection format
October 29 source refresh: begin with the native-source guide and inline queries. It uses actual endpoint events or collected Sysmon Linux XML. Custom JSON/CIM adapters and visibility-dependent specialty rules are retained in the advanced section.
Swipe tables horizontally to see all columns.
| File | Role | Required data or setup |
|---|---|---|
linux_web_child.yml |
Sigma direct-parent process hunt | Linux process creation, full parent/child paths, supported regex backend |
defender_web_child.kql |
Microsoft Defender XDR direct-parent hunt | DeviceProcessEvents plus fresh DeviceInfo Linux inventory |
defender_web_descendant_context.kql |
Shell-child investigation context | DeviceProcessEvents plus fresh DeviceInfo Linux inventory; parent and grandparent names populated |
falcon_web_child.cql |
Falcon LogScale direct-parent hunt | Native ProcessRollup2 fields in the selected repository |
falcon_web_descendant_context.cql |
Shell-child investigation context | ProcessRollup2 with populated grandparent fields |
sophos_live_process_snapshot.sql |
Current Linux process/parent snapshot | Sophos Live Endpoint; parent and child must still be present |
splunk_web_child.spl |
Sysmon for Linux XML process hunt | Collected Linux-Sysmon Event 1 XML, including parent and child paths; select the actual index |
sumologic_web_child.query |
Sysmon for Linux XML process hunt | Collected Linux-Sysmon Event 1 XML; select the actual source category and verify XPath extraction |
php_request_exec_triage.yar |
Static PHP lexical file triage | Authorized file copies; inspect matched code and provenance |
php_error_leakage.rules |
HTTP error-leakage/context indicator | Snort 3 with normalized, visible HTTP response bodies |
Use the source selection and tuning instructions in detections/SOURCE-GUIDE.txt. Sophos's live snapshot misses exited processes; Data Lake history requires its own verified schema. For Sentinel, verify the connector/table or process-normalization mapping before translating the Defender queries. Start in hunt mode and test representative benign workflows before promoting detections to alerts.
The standard Sigma source was parsed with pySigma. Backend conversion has separate field-mapping limits, so the native queries are supplied explicitly. Local predicate, XML, and SQLite checks do not execute vendor search engines or customer tenants. The verification matrix and VALIDATION.txt explain the tests to complete locally.
Map observed behavior to ATT&CK
Investigate public-facing application exploitation under ATT&CK T1190. Map observed Unix shell execution to T1059.004 and a confirmed webshell to T1505.003. Apply each mapping to the evidence in your investigation.
BEHAVIORAL ATT&CK MAPPINGS
Map evidence to behavior
Close the change and the investigation separately
Verify the fixed package/image or supported backport is running across workers, replicas, pools, and autoscaling templates. Ensure restarts did not leave old workers serving traffic. Exercise normal service functionality, check proxy routing and telemetry, and record temporary controls that still need removal or retention.
For a workload reachable while vulnerable, assess possible disclosure of application, database, cloud, and downstream secrets available to the worker, including when process and file hunts are quiet. Use the exposure window, secret privileges, and telemetry quality to decide precautionary rotation with the incident-response team.
Where suspicious execution or access is confirmed, preserve evidence, rebuild compromised workloads, and rotate relevant secrets through approved recovery procedures. Track patch closure and incident closure separately: a fixed runtime does not remove an existing foothold or recover already disclosed data.
Detection files
Read telemetry and verification notes before importing any rule.
Download rules and inert testsPer-file verification matrixNative validation results