PLATFORM SECURITY / 021
PHP2Shell: Critical PHP Zero-Days and Government Website Shutdowns
Investigating PHP2Shell: verified CVEs, PHP runtime memory failures, French tax-service shutdown reporting, emergency mitigations and patch verification.
Inspect screenshot ↗SYSTEM OVERVIEW
The boundary is the PHP worker, not the framework.
Original conceptual diagram: an HTTP request enters native PHP runtime code. Memory cleanup and persistent worker state are distinct from application authorization. This is not a recovered government network topology.
Request path
- Internet
- HTTP gateway
- PHP runtime
- Application
Worker lifetime
- Initialize
- Request memory
- Teardown
- Next request
THIS ARTICLE EXPLORES
- Two verified CVEs, different memory-lifecycle failure modes.
- A shutdown is an operational decision, not proof of compromise.
- Runtime patching across PHP-FPM, Apache, containers and Kubernetes.
- Evidence preservation, recovery criteria and AI-discovery attribution.
01 / VERIFIED SCOPE
The verified scope: two CVEs, not a universal exploit claim
The central question is how to reduce exposure and restore a PHP service without confusing a runtime vulnerability, a research demonstration, a precautionary outage and a confirmed intrusion. These are four different kinds of evidence. This investigation is a 2026-10-21 research snapshot, not a live incident feed.
Both identifiers are real published PHP CNA records: CVE-2026-109618 and CVE-2026-109619. Both carry a CVSS v4.0 base score of 9.2, Critical, with network attack vector, high attack complexity, attack requirements present, no privileges and no user interaction. That vector describes serious potential impact under prerequisites; it does not say every HTTP request can execute code on every PHP installation.
No exploit was executed for this article. Defensive code and deployment fragments below were not executed against PHP, Docker, Apache or a Kubernetes cluster as a validation of these CVEs. They are explicitly unexecuted examples requiring target-environment review. There are no invented attack logs, screenshots of compromised systems, production benchmarks or claims of government incident-response access.
| Record | Native-runtime failure | Operational significance |
|---|---|---|
| CVE-2026-109618 | Out-of-memory bailout can leave request memory unsafe for cleanup. | Review memory-failure paths and apply the vendor runtime fix. |
| CVE-2026-109619 | Global state can retain references to freed request memory. | A later request in a reused process can encounter stale state. |
| Research demonstration | A researcher demonstrates code execution under stated conditions. | Establishes exploitability there, not exploitation of a named public service. |
| Precautionary shutdown | An operator removes a potentially exposed service. | Establishes a defensive availability decision, not data theft. |
02 / DISCLOSURE TIMELINE
Discovery and disclosure: keep the clocks separate
The CVE metadata gives concrete publication timestamps, but a reservation timestamp is not automatically a discovery date or a private report date. Both identifiers were reserved on 2026-10-12. CVE-2026-109618 was published on 2026-10-21 at 13:48:34 UTC and CVE-2026-109619 at 13:54:43 UTC. Those are public-record events, not a reconstruction of every step in coordinated disclosure.
The PHP Foundation's account puts the underlying OOM concern much earlier: a core developer encountered it while addressing findings from a 2024 Quarkslab audit, but no concrete exploitation vector was then established. Calif's audit began on 30 July 2026; the Foundation dates Calif's report and an independent OpenAI report of the same root cause to 11 August, and Wiz's reporting to 24 August. The Foundation describes competing fixes, compatibility and denial-of-service tradeoffs, limited specialist capacity and a stalled decision process. Calling this simply a discovery on 20 October would erase that history.
The same Foundation account says CVE identifiers circulated on 20 October with an incorrect 10.0 score, prompting a 19:30 UTC pre-announcement and advancing the planned coordinated release from 22 to 21 October at 14:00 UTC. PHP's release announcement and the Foundation confirm that the four fixed releases shipped on 21 October. A leaked identifier, a researcher demonstration and a fixed package are separate disclosure events; none by itself establishes successful compromise of a public service.
Keep the vulnerability-disclosure timeline separate from the service-availability timeline. A government can restrict a site while a fix is being coordinated, before a CVE record becomes public. Conversely, the appearance of a CVE does not establish when a particular operator learned about it, installed a patch or restored service. Do not infer a breach window from an outage interval alone.
| Date | Verified event | What it does not establish |
|---|---|---|
| 2024 | Foundation: OOM concern identified during remediation of audit findings. | A working RCE vector was not established at that stage. |
| 2026-07-30 | Foundation: Calif began its PHP audit. | Not the same event as public vulnerability disclosure. |
| 2026-08-11 | Foundation: Calif and OpenAI independently reported the OOM root cause. | Not the first concern about the underlying design. |
| 2026-08-24 | Foundation: Wiz reported additional vectors. | Not evidence of an attack on a government site. |
| 2026-10-12 | Both CVE identifiers reserved by the PHP CNA. | The exact discovery date, private reporting date or victim exposure window. |
| 2026-10-20 19:30 | Foundation: PHP published its brought-forward pre-announcement. | Not the date the underlying problem was first discovered. |
| 2026-10-21 13:48:34 | CVE-2026-109618 published. | The time every vendor package or registry image became available. |
| 2026-10-21 13:54:43 | CVE-2026-109619 published. | The time a particular government site patched or returned to service. |
| 2026-10-21 14:00 scheduled | Advanced coordinated release time; PHP and the Foundation confirm releases that day. | Not a measured restoration timestamp for French public services. |
03 / GOVERNMENT SERVICES
French public services: what went offline, and what remained available
On 2026-10-21, impots.gouv.fr itself displayed a maintenance notice. It said documentation, news and downloadable forms were unavailable, but explicitly stated that users could still access their Finances publiques space and online services through the supplied links. That is narrower than saying France's online tax services shut down. This review observed the notice; it did not authenticate or conduct transactions to independently verify every linked service.
The DGFiP notice does not name PHP2Shell, ANSSI or either CVE, and gives no reliable incident start or restoration time. The causal connection comes from contemporary reporting, including RTL and Le Figaro, not from the maintenance notice alone. A stray 21/05/2026 date in the maintenance template is not an October incident timestamp and is not used here.
For Interior Ministry websites, La Dépêche reproduces a Préfecture de Police statement describing preventive maintenance of exposed Ministry websites at ANSSI's request while teams prepared updates. The original social post was not reliably retrieved for this investigation, so this is attributed to the official statement as reproduced by the newspaper. It supports a precautionary response, not a claim that all French government systems were compromised or taken offline.
RTL quotes Météo-France saying it closed the forecast website, vigilance website and customer extranets as a precaution while assessing the newly released fix, with weather-safety information distributed on social networks. A standalone first-party incident communiqué was not obtained here. Exact shutdown durations and restoration times for these services remain unverified in this snapshot.
Internationally, RTL also reports outages affecting municipal sites in Edinburgh, Oxford and Bristol, Flemish government sites and Danish institutional platforms. La Dépêche reports the Dutch parliament and Finnish government among affected sites. These are attributed reporting, not an independently verified global inventory; this investigation does not claim every listed service had the same PHP configuration, outage cause or patch state.
| Service | Evidence and reported scope | What remains unknown |
|---|---|---|
| impots.gouv.fr informational portal | First-party maintenance notice: documentation, news and form downloads unavailable. | PHP cause not stated in that notice; exact start/restoration not established. |
| DGFiP tax spaces and online services | DGFiP advertised continued access through links. | No authenticated end-to-end transaction testing was performed. |
| Exposed Interior Ministry / prefecture sites | Preventive maintenance at ANSSI's request, per a statement reproduced by La Dépêche. | No original-post retrieval or per-site restoration timeline. |
| Météo-France forecast, vigilance and customer extranets | Precautionary closure in a statement quoted by RTL. | No independently retrieved standalone communiqué or precise duration. |
| Other European public-sector sites | Outages reported by RTL and La Dépêche. | No independently established common topology, compromise or exhaustive scope. |
04 / ATTACK STATUS
Confirmed research RCE, observed attack attempts, unconfirmed victim compromise
PHP's detailed advisories and the research accounts establish working RCE demonstrations in stated environments. Those demonstrations are not evidence that the corresponding application projects or a named public administration were compromised. No exploit instructions or payloads are reproduced here.
Cloudflare's first-party response account separately reports observing attack traffic targeting its customers, including attempts to mutate traffic around protections. This is evidence of attempted exploitation reported by that provider, not confirmation of successful execution on French government systems. Its WAF discussion also says origin updates remain necessary; a provider's protection statement must not be transformed into proof that an origin is patched.
The CVE records' CISA ADP containers carried an assessment of Exploitation: none around 14:34 UTC on 21 October, while the Foundation says it had not identified functional public exploits at release/public disclosure. These are scoped and timestamped assessments, not a timeless assertion that no attacks occurred. They are not interchangeable with Cloudflare's traffic observations. The evidence reviewed here does not support a successful-compromise claim for the French services discussed.
Use a claim ledger instead of a single 'exploited' label
Editorial classification used in this investigation, not captured incident telemetry.
- Exploitability
Demonstrated by researchersTie the result to its SAPI, version, configuration and application prerequisites.- Attack attempts
Reported by CloudflareAttribute observed traffic to the provider; do not infer execution or a named victim.- Service interruption
Observed notice / attributed statementRecord the unavailable function and whether the action was preventive.- Successful intrusion
Not established for the French servicesDo not fill an evidentiary gap with an outage headline or theoretical impact.
05 / RUNTIME ROOT CAUSES
Root causes: exceptional exits and state that outlives its owner
The PHP CNA description of CVE-2026-109618 identifies longjmp() during out-of-memory handling. That non-local exit aborts the current execution context. Some contexts do not correctly account for it: allocation can be reached before request memory is in a safe initialized state, and subsequent cleanup can read or branch on that memory. The CNA describes several OOM strategies leading to remote code execution. The defect is native runtime memory management, not simply an application forgetting to validate a string.
The second CNA description concerns global state temporarily referencing request memory. That state may not be reset correctly, or can be repopulated after reset. Once the request allocation is freed, a global reference can become stale; a subsequent request can consult it before complete reinitialization. A per-request allocation has escaped its intended lifetime through a longer-lived process-global pointer.
The distinction matters when evaluating controls. Limiting request size may reduce one route to memory pressure, but it does not establish that every dangerous allocation path is unreachable. Worker recycling can constrain cross-request reuse, but it is not a blanket repair of exceptional cleanup within a request. Native code execution also invalidates the assumption that application-level permission checks necessarily remain an effective containment boundary.
The OOM advisory explains the actual repair: replace the unsafe longjmp() bailout with a delayed soft OOM at a VM safe point, and a hard OOM using _exit() at a higher threshold. The state-lifetime advisory requires the complete state-reset patch. They repair different invariants: cleanup must not consume partially initialized memory, and globals must not retain invalid request-owned references.
Two memory-lifetime boundaries
Conceptual failure paths derived from the CNA descriptions, with no payload, heap layout, exploit sequence or claim of a specific victim configuration.
OOM bailout
- Allocate
- OOM exit
- Partial state
- Cleanup
Stale global
- Request A
- Free memory
- Global pointer
- Request B
06 / AFFECTED VERSIONS
Affected versions: upstream thresholds versus vendor backports
The two PHP CNA records list the same affected upstream branches: 8.2 versions before 8.2.35, 8.3 before 8.3.36, 8.4 before 8.4.27 and 8.5 before 8.5.12. These are branch-specific boundaries, not permission to install an arbitrary numerically larger PHP release. Read both vendor advisories and your operating-system or hosting-provider bulletin before choosing a target.
The records' affected-version lists do not certify unlisted, unsupported branches as safe. The PHP release announcement addresses older installations and says minimal source backports were supplied for PHP 7.4, 8.0 and 8.1; this is not a blanket extension of upstream support. CERT-FR recommends isolating obsolete affected installations and migrating to maintained patched versions. Check vendor confirmation rather than assuming an older package is either fixed or vulnerable solely from its upstream version string. Conversely, a package downloaded to disk does not mean an old worker process has stopped serving traffic.
Inventory the executing web runtime separately from CLI PHP. The php command on an administrator's shell can belong to another installation, container, architecture or configuration tree. Record the SAPI, package release, vendor advisory, image digest, running workload and restart status. Do not expose phpinfo() publicly to collect that information.
| Branch | Affected upstream range | Fixed boundary |
|---|---|---|
| 8.2 | 8.2.x < 8.2.35 | 8.2.35 |
| 8.3 | 8.3.x < 8.3.36 | 8.3.36 |
| 8.4 | 8.4.x < 8.4.27 | 8.4.27 |
| 8.5 | 8.5.x < 8.5.12 | 8.5.12 |
An exposure record needs more than php -v
Proposed inventory fields, not collected incident data.
- Runtime
SAPI + package releaseIdentify the web-serving binary and vendor patch status.- Artifact
Image digest or package identityConnect a patch decision to an immutable deployable artifact.- Execution
Worker start + workload identityProve old processes were replaced rather than merely updating files.- Exposure
Routes + worker reuse + dependenciesAssess reachability and prioritize containment without publishing sensitive inventory.
07 / RUNTIME CONFIGURATIONS
Configuration matters: mod_php and FPM are not interchangeable
The OOM advisory reports complete HTTP RCE validation against Apache mod_php under default PHP input and memory limits with normal prefork configurations. Request-body processing can fail during startup before application code runs, yet mod_php still invokes request shutdown. FPM instead exits a child when startup fails, removing that particular path. The advisory still considers FPM susceptible after successful startup by source analysis, but explicitly says a complete FPM exploit was not demonstrated for this OOM report.
That qualification must not be misquoted as FPM being safe: the separate stale-state advisory reports session-lifecycle RCE validation against both mod_php and FPM. Its FPM case depends on suitable application behavior after successful startup. The strongest fatal-backtrace case concerns PHP 8.5 with fatal_error_backtraces enabled and an early diagnostic consumer. Demonstration conditions differ between the two CVEs.
Early INI processing is another important boundary. The stale-state report distinguishes Apache directory-level PHP settings and frontend-supplied FastCGI PHP_VALUE/PHP_ADMIN_VALUE from configuration applied at worker startup. It says FPM pool values apply when workers start and .user.ini applies after normal initialization; those are not the same early consumer. Do not turn the mere existence of an .ini file into a claim of confirmed exploitation.
| Runtime path | OOM report | Stale-state report |
|---|---|---|
| Apache mod_php | HTTP RCE validated; startup failure can reach shutdown. | Fatal-backtrace and session-lifecycle RCE validated under described conditions. |
| PHP-FPM | Startup-failure child exit blocks that sequence; post-startup susceptibility from source analysis. | Session-lifecycle RCE validated with suitable application behavior; early FastCGI overrides are conditional. |
| FrankenPHP | Source analysis: unconditional shutdown makes application-independent exposure likely. | No equivalent default early INI consumer established; other consumers may exist. |
| LSAPI | FPM-like model; application-specific exploitation considered likely but unvalidated. | Early special-environment INI handling is a conditional candidate. |
08 / EMERGENCY MITIGATIONS
Emergency mitigations: vendor-specific, incomplete and operationally expensive
Both PHP advisories say updating to a release containing the relevant complete patches is the reliable path. The OOM report's primary configuration workaround is administratively enforcing memory_limit=-1, then restarting every worker and checking that no pool, directory or application can restore a finite limit. It removes the predictable PHP per-request limit used by the confirmed exploit. It does not prevent underlying allocation failure, so it is not a complete fix.
CERT-FR's alert confirms patch availability and lists temporary upload-progress and multipart controls, but expressly labels those workarounds as not qualified by CERT-FR. It also warns that disabling upload progress reduces the attack surface against only one of the two vulnerabilities. Blocking multipart requests can break legitimate uploads and does not establish that every application-specific path is removed. The vendor patches remain the goal.
Removing PHP's finite limit also removes an availability safeguard. It can move failure to the container, cgroup or host and affect other workloads. The advisory says a cgroup memory limit is not a complete mitigation and specifically warns against RLIMIT_AS and RLIMIT_DATA because they can force allocation failures into the vulnerable bailout path. Do not translate that warning into a recommendation for unbounded host memory consumption: prioritize patching or isolation, and have the platform owner assess any temporary workaround.
For the stale-state report, disabling fatal_error_backtraces administratively on PHP 8.5 removes the producer used in that confirmed case. Disabling session.upload_progress.enabled removes the demonstrated early session operations. Neither covers all global or extension-state families. Setting pm.max_requests=1 is offered as an option where performance is not a factor; it reduces cross-request reuse but does not patch the first CVE.
The unexecuted pool fragment below is only for a PHP 8.5 FPM pool already being reviewed by its operator. It illustrates administrative enforcement, not a complete pool definition or a safe default for all installations. Restart workers through your service-management procedure after validating configuration, and apply the corresponding vendor-approved controls separately to other SAPIs. Do not paste PHP 8.5-specific settings into other branches or rely on application-level ini_set().
Unexecuted PHP 8.5 FPM pool fragment: partial emergency controls only
ini; Existing PHP 8.5 pool only; not a full FPM configuration.
; Removes PHP's per-request memory cap: assess DoS and host capacity.
php_admin_value[memory_limit] = -1
php_admin_flag[fatal_error_backtraces] = off
php_admin_flag[session.upload_progress.enabled] = off
; Optional cross-request restriction, with significant churn cost.
pm.max_requests = 1| Control | Vendor-stated purpose | Remaining risk |
|---|---|---|
| Administrative memory_limit=-1 | Removes the predictable PHP-limit OOM trigger. | Underlying allocator failures remain; memory pressure and service disruption can increase. |
| PHP 8.5 fatal_error_backtraces=0 | Removes the confirmed backtrace producer. | Other stale global or extension state remains. |
| session.upload_progress.enabled=0 | Removes demonstrated early session operations. | Other state-lifecycle paths remain; application features may change. |
| FPM pm.max_requests=1 | Restricts reuse across requests. | Worker startup overhead; not the OOM patch and not a universal configuration repair. |
| Suppressing warnings or display_errors=Off | Hides diagnostic output, not stale-state access. | The advisory says access happens before display/logging decisions. |
09 / DEFENSIVE PHP
Defensive PHP: make the trust boundary explicit
A runtime patch and application hardening solve different problems. Input-size limits, fixed routes, authenticated access and minimal privileges remain useful, but none is presented here as repairing the native memory failures. Avoid claiming that disabling a handful of PHP functions, setting open_basedir, or catching Throwable makes native code execution impossible. The PHP manual itself warns that open_basedir is not a comprehensive security boundary.
The following unexecuted example is a bounded application input handler for a PHP endpoint that expects a single small JSON document. It performs a streaming read with a hard cap rather than relying on an untrusted Content-Length header. The route must also have real authentication and authorization, transport limits and a supported patched runtime. The numeric cap is an illustrative application contract, not a PHP2Shell mitigation threshold.
Unexecuted PHP example: bound an expected JSON body
php<?php
declare(strict_types=1);
// Application-specific limit; not a PHP2Shell fix.
$limit = 65536;
$input = fopen('php://input', 'rb');
if ($input === false) {
error_log('Input stream could not be opened');
http_response_code(500);
exit;
}
$body = stream_get_contents($input, $limit + 1);
fclose($input);
if ($body === false) {
error_log('Input stream could not be read');
http_response_code(500);
exit;
}
if (strlen($body) > $limit) {
http_response_code(413);
exit;
}
try {
$document = json_decode($body, true, 32, JSON_THROW_ON_ERROR);
} catch (JsonException) {
http_response_code(400);
exit;
}
if (!is_array($document) || array_is_list($document)) {
http_response_code(400);
exit;
}
// Apply a strict field schema and authorization before any side effect.10 / APACHE BOUNDARY
Apache and PHP-FPM: isolate the handler, preserve the patch boundary
For an Apache/FPM topology, distinguish the public HTTP listener from the private FastCGI channel. PHP's FPM manual warns that an exposed FastCGI endpoint allows arbitrary code execution independently of these CVEs. Prefer an appropriately permissioned Unix socket on a shared host, or strictly controlled private connectivity between containers. Never publish an FPM port to the Internet.
This unexecuted Apache virtual-host fragment follows the documented proxy handler form. It assumes a dedicated application public directory and a PHP-FPM socket whose ownership permits Apache access. TLS termination, vhost selection, rewrite rules and the FPM pool are intentionally outside this fragment. Test the real application before deployment; front-controller routing and upload paths differ across frameworks.
The upload-directory deny rule prevents direct HTTP execution there; it does not stop an already compromised runtime from reading or including a writable file. Size and timeout controls can reduce operational pressure but do not repair native-runtime corruption. Do not use a generic WAF rule as proof that both CVEs are unreachable, and do not turn off authentication or monitoring to make an emergency configuration pass a smoke test.
Unexecuted Apache 2.4 fragment: private FPM handler
apache# Requires mod_proxy and mod_proxy_fcgi.
ProxyRequests Off
DocumentRoot "/srv/app/public"
<Directory "/srv/app/public">
AllowOverride None
Options -Indexes -ExecCGI
Require all granted
# Example application contract, not a CVE mitigation threshold.
LimitRequestBody 1048576
<FilesMatch "\\.php$">
SetHandler "proxy:unix:/run/php/app.sock|fcgi://localhost/"
</FilesMatch>
</Directory>
<Directory "/srv/app/public/uploads">
<FilesMatch "\\.(?i:php|phtml|phar)$">
Require all denied
</FilesMatch>
</Directory>Patching and containment operate at different layers
Proposed defensive topology, not the architecture of impots.gouv.fr or another named organization. Containers do not remove the PHP runtime from the request path.
Serving
- HTTP edge
- Apache
- Private FPM
- PHP application
Containment
- Route controls
- Socket ACL
- Low privilege
- Scoped secrets
11 / DOCKER PATCHING
Docker: rebuild the artifact, then replace the running process
An image is a snapshot, not a subscription to security fixes. Docker's build guidance distinguishes pulling a refreshed base from invalidating cached build layers. A restart of an old image does not change its embedded PHP binary; an updated image tag in a registry does not replace a running container. Treat base selection, build provenance, promotion and workload replacement as separate gates.
This unexecuted Dockerfile deliberately has no default base: the build must receive a reviewed FPM image reference, ideally a registry reference pinned to a verified SHA-256 digest. Do not invent a digest or assume that a tag corresponding to a newly announced PHP version has already reached every registry mirror. The patched base must include the extensions and shared libraries your application needs; test those combinations before promotion.
Pinning a digest makes a deployment reproducible but also freezes vulnerabilities until an update process changes it. Automated base-refresh proposals and human-reviewed promotion reconcile those goals. Keep a known-good patched rollback artifact; rolling back to a vulnerable digest merely trades a release problem for the original exposure.
Unexecuted Dockerfile: require an explicitly reviewed base
dockerfileARG PHP_BASE
FROM ${PHP_BASE}
WORKDIR /var/www/html
# public/ and vendor/ must already be reviewed build artifacts.
COPY --chown=www-data:www-data public/ ./public/
COPY --chown=www-data:www-data vendor/ ./vendor/
COPY php-hardening.ini /usr/local/etc/php/conf.d/zz-app.ini
# This FPM image is internal only; the HTTP gateway owns public ingress.
USER www-data
CMD ["php-fpm", "-F"]Unexecuted php-hardening.ini: patched-runtime baseline, not a CVE fix
inidisplay_errors = Off
log_errors = On
error_log = /proc/self/fd/2
expose_php = Off
; After patching, retain a measured application memory budget.
; See the separate emergency section for the vendor's partial workaround.Artifact promotion gates
- Resolve a maintained vendor build addressing both identifiers, including backport evidence where applicable.
- Build in the approved pipeline; record base digest, package identities, extensions and image digest.
- Exercise application authentication, uploads, sessions, background jobs and error paths on the candidate.
- Deploy the reviewed digest, replace old workers, and verify the image identities actually running.
- Recheck scheduled jobs, sidecars, alternate architectures, old replicas and disaster-recovery images.
12 / KUBERNETES CONTAINMENT
Kubernetes: least privilege limits blast radius, not exploitability
A PHP process that is compromised inside a Pod may still reach application secrets, its writable mounts and allowed network destinations. Kubernetes security context settings can narrow that exposure; they do not fix PHP. The Restricted Pod Security Standard is a useful baseline, not a claim that a container escape or credential misuse is impossible.
The following unexecuted Deployment fragment is a defensive adaptation for a prebuilt non-root FPM image. Its reserved .invalid registry intentionally makes it non-deployable as written: replace the entire image reference with your reviewed patched artifact pinned by digest. UID 33 must match that image's account and filesystem ownership; do not copy it into an unrelated distribution. The example omits HTTP gateway, ConfigMaps, Secrets and Services, and must not be treated as a complete production stack.
Do not publish port 9000 through a public LoadBalancer or Ingress. Enforce private gateway-to-FPM access with a NetworkPolicy supported by your CNI, plus an explicit egress policy covering only required dependencies. A Pod template alone is not a network restriction. Disabling service-account token mounting removes one default credential path, but does not revoke credentials supplied through environment variables or mounted Secrets.
The memory request and limit below are illustrative scheduling parameters. Measure process baseline, concurrency and application peaks before selecting values. A cgroup OOM kill and PHP's own OOM bailout are different events: forcing one is not a documented replacement for the runtime patches.
Unexecuted Deployment fragment: reviewed image and restricted worker
yamlapiVersion: apps/v1
kind: Deployment
metadata:
name: php-app
spec:
replicas: 2
selector:
matchLabels:
app: php-app
template:
metadata:
labels:
app: php-app
spec:
automountServiceAccountToken: false
securityContext:
runAsNonRoot: true
runAsUser: 33
runAsGroup: 33
fsGroup: 33
seccompProfile:
type: RuntimeDefault
containers:
- name: fpm
# Replace this reserved, intentionally non-resolving image.
image: registry.example.invalid/php-app:REPLACE_WITH_PATCHED_DIGEST
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
ports:
- containerPort: 9000
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: "1"
memory: 512Mi
volumeMounts:
- name: temporary
mountPath: /tmp
volumes:
- name: temporary
emptyDir:
sizeLimit: 64Mi13 / DETECTION
Detection: correlate process behavior, do not invent a magic IOC
This article does not publish a validated network signature or claim a universal PHP2Shell indicator. Memory errors, worker crashes, HTTP 5xx spikes and abrupt process churn can motivate investigation; they can also result from ordinary bugs, capacity pressure or unrelated failures. Absence of a crash is not proof of absence of native code execution.
Correlate web gateway request identifiers and timestamps with FPM or Apache worker events, container termination reasons, application audit trails and host telemetry. Unexpected shell or interpreter children of a web worker, new executable files, unusual outbound connections, credential use outside normal workflows and unapproved image changes warrant triage. They are investigation leads, not automatically attribution to either CVE.
Preserve evidence with controlled access. Request bodies, environment dumps, core files and memory captures may contain credentials, personal information or tax records. Collect under your incident procedure, minimize scope, record provenance and protect retention. Never create a public phpinfo() endpoint or post raw incident data into a public issue tracker to simplify diagnosis.
| Observation | What it can mean | What to verify |
|---|---|---|
| PHP OOM messages or worker exits | Application pressure, a defect, or hostile activity. | Correlate worker identity, request timing and baseline; do not infer exploitation from one error. |
| Container OOMKilled | The kernel enforced the container memory limit. | Distinguish it from a PHP-level bailout and inspect pressure across all processes. |
| Unexpected child process or egress | A suspicious execution path or legitimate maintenance. | Identify parent process, executable, destination, owner and approved change. |
| New writable-tree executable | Unauthorized persistence or an application deployment. | Compare release manifest and file provenance; preserve before removal. |
| No suspicious records | No evidence in the inspected telemetry. | Document coverage gaps; missing logs do not prove a clean system. |
14 / INCIDENT RESPONSE
Incident response: containment and recovery are separate decisions
Start by assigning an incident lead and an evidence cutoff, then build the runtime inventory. If a public route cannot be assessed or patched within the risk window, restrict it or take the affected service offline through the established change process. Prefer targeted isolation where it actually removes the exposure, but do not preserve nominal availability by leaving an unassessed backend reachable through another hostname or integration.
A patch closes a known vulnerability; it does not evict an intruder. Where there are credible compromise indicators, preserve the relevant evidence, isolate affected instances, investigate identity and data access, and rebuild from reviewed artifacts. Scope credential rotation to the exposure and investigation, including application database accounts, API keys and cloud identities where implicated. Follow the organization's notification obligations and response authority rather than asserting an automatic universal legal deadline.
Restore only when the actual web-serving processes are verified fixed, old vulnerable replicas are drained, critical application journeys pass and monitoring covers the return to service. Validate sessions, uploads, background queues and dependency connections; an HTTP 200 from a health endpoint is not an acceptance test for the business service. Record the patched rollback plan and keep public incident communication aligned with established facts.
A proposed evidence-led response loop
Operational guidance, not a reconstruction of any government's private response procedure.
- 01Inventory
- 02Preserve
- 03Contain
- 04Patch and rebuild
- 05Verify runtime
- 06Restore and monitor
Recovery acceptance criteria
- Both CVEs have an explicit vendor patch disposition for every exposed PHP runtime.
- Running binary/package or image identities match the approved fixed artifact.
- Old workers, alternate pools, stale replicas and scheduled execution paths are accounted for.
- Configuration changes have passed syntax and application checks in the actual target environment.
- Compromise leads are assessed separately from patch completion; evidence gaps are documented.
- The incident owner approves restoration, communication, monitoring and a patched rollback target.
15 / AI ASSISTED DISCOVERY
AI-assisted discovery: human attribution and patch engineering still matter
AI involvement is supported by primary accounts, not inferred from a headline. OpenAI's disclosure account credits Calif's use of GPT-5.6 Sol and independent discovery and reporting by Wiz, while saying PHP maintainers led fixes and release. Calif's research account describes human-led source investigation with LLM assistance, including generalizing a memory-lifetime pattern rather than treating the first suspicious code sequence as a complete finding. These are source-attributed discovery accounts, not an independent comparison of model effectiveness.
Wiz credits its own AI-assisted work using Wiz Atlas, Gemini 4 Argon and GPT-5.6 Sol. The PHP CNA records credit Ryan at Calif.io, Wiz and OpenAI in distinct finder/reporting fields and name PHP remediation developers. It would be inaccurate to credit a single model or company with the entire discovery, impact validation, disclosure and remediation effort.
The PHP Foundation adds an important constraint: many AI-generated reports prove invalid, duplicate or non-reproducible, and people still make the decisions and work on patches. Its account of the earlier OOM concern explains why finding a suspicious invariant is not equivalent to safely repairing a widely deployed native runtime. Compatibility, extension behavior, performance and new denial-of-service risks all affect the repair.
The operational lesson is to budget for validation and remediation capacity, not merely more findings. A useful assisted report needs a precise root cause, a bounded affected environment, reliable evidence, responsible coordination and a proposed regression check. AI-generated explanations or synthetic terminal output are not substitutes for those artifacts. This article claims neither personal discovery nor independent reproduction of the researchers' RCE results.
Discovery is only one stage of the security workflow
An operational interpretation of the primary accounts, not a claim that a model autonomously completed every stage.
- 01Source hypothesis
- 02Human validation
- 03Private report
- 04Patch engineering
- 05Distributor coordination
- 06Runtime replacement
16 / OPERATIONAL TRADEOFFS
Operational lessons: optimize for a defensible recovery, not a green badge
The expensive failure mode is an organization that knows its website framework but cannot identify its executing native runtime. An inventory that joins routes, SAPI, worker lifecycle, vendor build and deployment artifact makes an emergency patch a controlled release rather than a search through unmanaged servers. This is a platform-engineering concern even when the main application stack is Java or AEM: an estate can still contain separate PHP forms, portals or administration tools. It is not evidence that AEM's Java runtime itself is affected.
The ownership issue also resembles the diagnostic discipline in the OSGi investigation and ResourceResolver lifecycle reasoning: separate the state that looks wrong from the dependency or lifecycle contract that produces it. That is an analogy in investigation method, not a shared vulnerability or a claim of PHP exploit testing.
The durable lesson is to keep four records distinct: what the vendor says is vulnerable, what the organization exposes, what the telemetry establishes and what the response team has actually changed. A shutdown can be prudent without proving an attack; a successful upgrade can be necessary without proving a system clean. Good incident reporting preserves both distinctions.
| Decision | Benefit | Cost or limitation |
|---|---|---|
| Temporary shutdown | Removes the assessed public serving path. | Public-service interruption; verify alternate entry points. |
| Access restriction or maintenance route | Can preserve unaffected functions. | Requires confidence that restricted routes cover the actual vulnerable path. |
| Aggressive worker recycling | Can constrain some cross-request lifetimes when vendor guidance applies. | Process churn and latency; not a universal repair of both failure modes. |
| Immutable patched rebuild | Traceable artifact and repeatable recovery. | Needs base availability, extension compatibility and deployment capacity. |
| Digest pinning | Deterministic deploy and rollback identity. | Also pins vulnerabilities unless a refresh workflow exists. |
| Least-privilege workload | Reduces reachable credentials and persistence options. | Does not remove the vulnerable native runtime or application data access. |
REFERENCE DESK
Sources & further verification
Research snapshot: 2026-10-21. Primary PHP advisories and CVE records establish technical scope; reporting is attributed separately. Configuration examples are proposed defensive adaptations, not captured incident evidence or vendor guarantees.
PHP advisories, incident reporting & operational documentation
- PHP — Critical security release, 21 October 2026 (external, opens in a new tab)
- PHP security advisory — CVE-2026-109618 (external, opens in a new tab)
- PHP security advisory — CVE-2026-109619 (external, opens in a new tab)
- PHP CNA record — CVE-2026-109618 (JSON) (external, opens in a new tab)
- PHP CNA record — CVE-2026-109619 (JSON) (external, opens in a new tab)
- PHP manual — FPM configuration (external, opens in a new tab)
- PHP manual — Core configuration directives (external, opens in a new tab)
- Apache HTTP Server — mod_proxy_fcgi (external, opens in a new tab)
- Docker — Building best practices (external, opens in a new tab)
- Kubernetes — Pod Security Standards (external, opens in a new tab)
- PHP Foundation — Security release and disclosure chronology (external, opens in a new tab)
- CERT-FR — Alert CERTFR-2026-ALE-014 (external, opens in a new tab)
- CERT-FR — Structured alert and revision text (external, opens in a new tab)
- CERT-FR — Advisory CERTFR-2026-AVI-1359 (external, opens in a new tab)
- DGFiP — impots.gouv.fr maintenance notice (observed 21 October) (external, opens in a new tab)
- La Dépêche — Interior Ministry statement reproduced in reporting (external, opens in a new tab)
- RTL — Météo-France statement and international outage reporting (external, opens in a new tab)
- Le Figaro — Observed public-service outages, 21 October (external, opens in a new tab)
- Cloudflare — First-party account of attack traffic and WAF response (external, opens in a new tab)
- Calif — Research and discovery account (external, opens in a new tab)
- Wiz — Independent PHP2Shell research account (external, opens in a new tab)
- OpenAI — Coordinated disclosure and AI-assisted research attribution (external, opens in a new tab)