DocumentedGuideUpdated By Federico Jan

PHP Security After PHP2Shell: What Happened, What to Patch, What to Verify

A dated account of the October 2026 PHP vulnerabilities, the role of AI-assisted research, the first fixed releases and the evidence needed to show patched runtimes reached running applications.

Four stages for a PHP patch record: identify workloads, update the artifact, replace running workers and verify adoption; investigate earlier exposure separately.
An original evidence model for following a patch into running workloads. This diagram illustrates documentation-based guidance; no live patch, exploit or recovery was performed.

TL;DR — PHP security after PHP2Shell: The October 2026 disclosure concerns flaws in PHP itself that can enable unauthenticated code execution and memory disclosure. Install a current vendor-fixed build, replace every serving worker or replica, and verify that the expected artifact is running. AI helped researchers demonstrate exploitation, while people investigated, patched and coordinated releases. Patching and checking for earlier compromise remain separate tasks.

What PHP2Shell means for a running application

PHP is the runtime that executes server-side application code. A web server passes it requests; PHP runs the application and produces a response. A worker is a running process that can handle many requests over its lifetime.

On October 21, 2026, PHP released fixes for two critical vulnerabilities in that runtime. Wiz called its research PHP2Shell. A secure WordPress plugin or carefully written application does not, by itself, repair a flaw in the PHP engine underneath it.

The PHP maintainers identify all PHP installations serving web requests as at risk, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. These are different ways to connect PHP to a server, often called server APIs or SAPIs. The demonstrated attack paths and their prerequisites differ.

Two failures in request handling

  • CVE-2026-109618: an out-of-memory interruption can leave internal request data only partly initialized. Cleanup can then treat invalid data as valid, corrupting memory.
  • CVE-2026-109619: internal state can keep pointing to memory after a request's memory has been freed. A later request reaching the same worker can encounter that stale state.

The PHP Foundation describes unauthenticated code execution demonstrated against Apache with mod_php before application code runs, and code execution through application-level PHP-FPM paths. Wiz also reports memory disclosure, including secrets held in worker memory. Neither account establishes that one identical exploit works against every configuration.

For an operator, the useful question is: which running workloads still use an affected runtime, and what evidence shows the replacement reached them?

What AI found—and what people had already found

The headline “AI discovered a critical PHP vulnerability” leaves out part of the history.

According to the PHP Foundation's account, a core developer found early signs of the out-of-memory problem while fixing issues from a 2024 Quarkslab audit. A possible exploit was theorized, but no concrete attack vectors were identified then. Proposed fixes involved difficult compatibility, performance and ecosystem trade-offs.

The Foundation calls the delay a structural failure involving decision-making and resources. That admission matters: difficulty turning a memory bug into a working exploit had limited the evidence of impact, while difficulty choosing and funding a fix had limited remediation.

What changed in 2026

The Foundation says Calif began an audit on July 30 and researcher Ryan A reported an unconditional remote-code-execution path on August 11. OpenAI independently reported the same root cause; Wiz and OpenAI supplied additional vectors in August and September. Those reports made the impact concrete and fixing it became the security team's top priority.

Wiz attributes research assistance to Wiz Atlas, Gemini 4 Argon and GPT-5.6 Sol. It describes models helping develop and adapt exploit chains to different memory layouts through testing and debugging. These are the researchers' reported results, not experiments reproduced for this article.

The Foundation also describes using AI to validate and group incoming reports. It says a person makes every decision and works on every patch. Faster discovery still required people to evaluate trade-offs, change the engine, review fixes and coordinate releases.

The October disclosure timeline

The following chronology uses the PHP Foundation's disclosure account. Times are UTC; responsibility and motive should not be inferred beyond the attributed statements.

When What the Foundation reports
October 20, around 15:00 CVE identifiers circulated with an incorrect release time and a 10.0 severity score; the stated actual score was 9.2.
October 20, 19:30 PHP brought forward its pre-announcement and moved the release from October 22 to October 21.
October 20, around 20:00 Calif mistakenly published a proof-of-concept video; copies circulated after deletion.
October 20, around 23:00 Mitigation advice began reaching some critical infrastructure providers and may also have leaked.
October 21, 07:41 Chainguard published patched images before the coordinated release; the Foundation describes this as an embargo breach.
October 21, 14:00 The accelerated public release was scheduled, with fixes across supported branches.

Bringing the release forward was not as simple as publishing a patch file immediately. The Foundation says distributors were still packaging fixes; an immediate release would have left some users without an easy update path.

Attempts and successful compromise are different evidence

A secondary report by Oktsec summarizes AWS honeypot observations of exploitation attempts as early as October 17. It also notes that attempt telemetry did not establish whether real-world exploitation had succeeded.

The Foundation says it had not identified functional public exploits at the moment of release. That statement concerns what its team observed in circulating proofs of concept; retrospective honeypot telemetry concerns a different observation. Neither gives us a complete count of compromised systems.

Which releases fix the original vulnerabilities?

The initial upstream fixes for the two original CVEs were:

Supported branch Initial fixed release
PHP 8.2 8.2.35
PHP 8.3 8.3.36
PHP 8.4 8.4.27
PHP 8.5 8.5.12

These are historical minimum upstream releases for this disclosure. For a deployment today, use the latest appropriate security release or vendor-fixed package and check subsequent advisories.

Distribution packages and older branches

A distribution can backport a fix while retaining an older-looking upstream version string. Record the complete package build and its vendor advisory; comparing only the output's first version number can misclassify that package.

PHP 8.1 and earlier no longer receive normal upstream releases. The maintainers provided minimal source backports for PHP 7.4, 8.0 and 8.1, and some distributions or long-term-support vendors provide fixes. A source patch being available does not show that your provider built, installed or supports it.

Follow-ups already matter

The maintainer archive, checked October 27, includes a separate session-upload-progress follow-up associated with CVE-2026-115560. It concerns an unusual combination of serializer configuration and runtime changes. PHP recommends disabling session upload progress until the next regular bugfix release to fully protect against that path; applications that never change the serializer at runtime can keep the feature enabled under the stated guidance.

The archive also lists Windows rebuilds 8.2.35-1, 8.3.36-1, 8.4.27-1 and 8.5.12-1 with Brotli 1.2.1 for CVE-2026-111497. The suffix marks a dependency rebuild; the PHP runtime version stays unchanged. The affected decoder is reachable through cURL when automatic response decompression is enabled, which is disabled by default but can be enabled by applications or libraries.

Those updates are why a screenshot of the original “patched version” table cannot be the whole maintenance record.

Prove the patched runtime reached every workload

NCSC recommends identifying PHP across infrastructure, prioritizing internet-facing systems and checking products that bundle PHP. Google's response guidance adds an operational trap: updating packages on disk can leave vulnerable PHP code resident in running workers.

A new image in a registry is an available artifact. Running replicas still need to adopt it. Similarly, a successful package installation does not prove the web-serving process restarted with the new code.

Use the PHP maintainer guidance to establish the initial upstream fixed release, then verify the complete vendor package build where backports apply.

Keep a non-secret evidence worksheet

The following is an editorial template derived from that guidance. It is not an automated discovery tool or a tested incident-response procedure.

Field What to record
Workload and owner Application, service, scheduled job or appliance; accountable person
Environment and exposure Production/staging; public, internal or vendor-managed
Serving runtime SAPI, executable or container image; distinguish the web runtime from command-line PHP
Fix basis Vendor advisory plus full fixed package build or upstream release
Artifact Deployed image digest or package identity; no credentials
Adoption Deployment/restart time and evidence that every intended replica or worker changed
Functional check Named request or workflow, expected result, actual result and timestamp
Investigation Prior-exposure window, evidence reviewed and unresolved gaps
Last checked Date and person responsible for follow-up advisories

Keep access to the worksheet appropriate to the infrastructure detail it contains. Store non-secret references rather than tokens, session cookies or private keys.

A fictional three-workload example

Imagine an application called Harbor Notes, with a public PHP-FPM web service, a long-running queue worker and a nightly import job. These names and records are fictional; none was deployed or tested for this article.

Rebuilding the shared image fixes the artifact used by future starts. It does not establish that the three existing web replicas or the queue worker have been replaced. The import job may also point to an older pinned image even after the web deployment changes.

For the web service, collect deployment evidence for each replica and a representative page request. For the queue worker, record its replacement and a completed test job. For the nightly import, check the job definition's image reference and arrange an appropriate controlled verification rather than assuming the next scheduled run will succeed.

Record the expected and observed artifact for each workload. A green homepage is evidence for that request, not for the queue or the import. A command-line php -v result describes that executable, not automatically the PHP-FPM or Apache runtime serving traffic.

Define the stopping condition

A useful completion statement is: “The listed workloads now run the vendor-fixed artifact, all intended workers were replaced, and these named functional checks passed.” Add any unverified workload explicitly.

That statement still cannot establish that inventory is complete, every application path works or no earlier intrusion occurred. A controlled internal runtime check should not become a publicly exposed diagnostic page containing configuration or secrets.

If you cannot patch immediately

The maintainers state that only an update is a complete solution to the original vulnerabilities. Temporary settings reduce exposure to particular paths.

For example, disabling session upload progress must take effect before request parsing and requires worker restarts. PHP says it blocks confirmed session paths, not every variant. PHP 8.5's fatal-error-backtrace setting addresses another specific path.

The out-of-memory guidance is more involved than removing a PHP memory limit. It also discusses request-size limits, overriding configuration and a separate availability boundary. Copying one setting without understanding the rest can leave another failure path or resource-exhaustion problem.

Use the current maintainer instructions and your platform's supported configuration process. Document which control applies, its scope and who is responsible for completing the update.

A web application firewall is another compensating control with coverage limits. Google explicitly describes its Cloud Armor protections as defense in depth while PHP is updated and redeployed. An enabled rule is not proof that every route to every backend is covered.

If neither patching nor adequate temporary protection is available, NCSC says to consider taking the affected system offline. That is an operational decision involving availability and exposure; the article cannot select it for an unknown deployment.

Patching and investigating answer different questions

A patch answers whether a known flaw remains in the deployed runtime. Investigation asks whether an attacker already used it and what they could retain.

Wiz suggests reviewing unusual multipart requests, memory-limit errors, repeated server errors, abnormal session cookies and unexplained worker churn. These are leads to investigate, not standalone proof of exploitation. The absence of those signals cannot certify that a system was safe, especially when logs are incomplete.

Google advises capturing worker memory before restarting suspect hosts because a restart destroys volatile heap evidence. If there are signs of compromise, coordinate evidence preservation, containment and urgent patching with someone qualified to handle the incident. Do not interpret evidence collection as a reason to leave an exposed system indefinitely vulnerable.

The Oktsec account of AWS telemetry illustrates the same distinction: observed attempts alone do not establish successful compromise.

Keep conclusions proportional to the evidence

  • Known vulnerable: the identified deployment used a build affected by the advisory.
  • Suspicious activity: available telemetry contains indicators that warrant investigation.
  • Confirmed compromise: investigation establishes unauthorized access or execution.
  • Unknown: the evidence needed to answer the question is missing or was not collected.

These labels are a reporting aid, not a universal detection method. A completed patch task should retain any unresolved investigation status.

If an investigation establishes that secrets were exposed, credential replacement and application recovery become separate work. Replacing the runtime alone does not revoke a stolen credential or remove an independently installed backdoor.

Sources, verification limits and next action

Verification date: October 27, 2026. This article is a documentation-based synthesis of the PHP maintainer archive, PHP Foundation disclosure account, Wiz research, Google response guidance and NCSC advice. The early-attempt discussion is attributed to Oktsec's secondary account of AWS telemetry.

No live exploit, PHP deployment, patch verification or production recovery was performed for this article. The Harbor Notes example and worksheet are illustrative. Researcher demonstrations and vendor claims are attributed rather than presented as our own results.

For the discovery history, start with the PHP Foundation's account. For current patch and mitigation decisions, return to the PHP maintainer archive and your distribution or hosting provider's advisory.

The next practical action is to list the PHP workloads you operate and ask for evidence of the fixed build in the running workload, following the deployment and restart guidance. Keep the remaining gaps visible, assign owners and recheck follow-up releases.

In this note

Keep reading