PHP2Shell: Critical PHP RCE Flaws CVE-2026-109618 and CVE-2026-109619 Require Immediate Patching

Critical Security Advisory

PHP has released emergency fixes for two critical core vulnerabilities that can allow unauthenticated remote code execution before application-level defenses can reliably intervene. Administrators running PHP for public or internal web services should treat this as an immediate patching event.

On October 21, 2026, the PHP project released PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 to address two critical remote code execution vulnerabilities: CVE-2026-109618 and CVE-2026-109619. The pair is commonly being referred to as PHP2Shell.

The PHP security advisory states that all PHP installations serving web requests are at risk, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. PHP considers Apache mod_php the highest-risk configuration because a demonstrated exploit can trigger before application code runs.

What Happened

The vulnerabilities affect PHP’s internal request lifecycle and memory handling. CVE-2026-109618 involves out-of-memory handling that can interrupt PHP while request data is only partially initialized. During cleanup, invalid state may then be treated as legitimate data. CVE-2026-109619 involves request-owned global state surviving after the memory backing it has been freed, allowing a later request handled by the same worker to interact with stale state.

Both flaws are rated CVSS v4.0 9.2. More importantly for operators, the PHP project says there are no complete mitigations and that updating is the only safe choice.

Security Warning: Do not assume a WAF rule, application login, CMS authentication layer, or PHP configuration workaround fully neutralizes this issue. The vulnerable behavior occurs in PHP itself, and some confirmed attack paths happen before normal application logic executes.

Who Is Affected

  • PHP-FPM deployments behind Nginx or Apache
  • Apache deployments using mod_php
  • php-cgi environments
  • FrankenPHP deployments
  • LiteSpeed environments serving PHP
  • Web applications such as WordPress, Drupal, Joomla, Laravel, Magento, and custom PHP applications when the underlying PHP runtime is vulnerable

The vulnerable component is the PHP runtime itself, not a specific CMS or framework. That distinction matters: updating WordPress, Drupal, Laravel, or an application plugin without updating the PHP runtime does not remediate the underlying flaws.

Fixed PHP Releases

PHP BranchFixed ReleaseOperator Action
8.58.5.12Update immediately
8.48.4.27Update immediately
8.38.3.36Update immediately
8.28.2.35Update immediately
8.1 and olderNo new upstream security releaseUse vendor backports where available or move to a supported branch

PHP also supplied minimal source backports for PHP 7.4, 8.0 and 8.1 for operators who build from source or do not have access to an LTS vendor. For normal production environments, distribution or LTS vendor packages should be preferred when they provide the fixes.

Exploitation Status

This is no longer a theoretical-only disclosure. Security researchers have reproduced exploitation, and multiple organizations have reported attack activity or exploit attempts. watchTowr says it is observing active exploitation attempts involving both CVEs. Amazon Threat Intelligence also reported that its MadPot honeypot telemetry captured a PHP2Shell exploitation attempt dated October 17, four days before public disclosure.

That does not mean every observed attempt resulted in a successful compromise. AWS specifically noted that analysis of its pre-disclosure observation was still ongoing. The operational implication is simpler: administrators should not use the public disclosure date as the only starting point for log review.

What Administrators Should Do Now

  1. Inventory PHP runtimes. Identify every web-facing and internally exposed PHP deployment, including containers, legacy applications, appliances, development systems, and forgotten virtual hosts.
  2. Patch the runtime. Move to PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35, or the corresponding vendor-patched package.
  3. Restart workers after patching. Confirm that old PHP-FPM, Apache, or application workers are no longer serving requests from vulnerable binaries.
  4. Verify the effective version. Do not rely only on the package manager transaction. Confirm the version actually used by the web-serving process.
  5. Review activity from at least October 17 onward. Look for abnormal child processes, unexpected shells, suspicious outbound connections, strange multipart requests, unexplained PHP worker crashes, and post-exploitation behavior.
  6. Prioritize mod_php and internet-exposed systems. PHP explicitly identifies mod_php as the highest-risk configuration in the published advisory.
  7. Treat mitigations as temporary. WAF rules and configuration changes can reduce specific attack paths but are not substitutes for patching.

Operational Perspective: The patch is only half the job. PHP is often embedded in older sites, internal dashboards, containers, staging hosts, and vendor applications that are easy to miss during routine patching. Inventory completeness is the real control point here.

Temporary Risk Reduction When You Cannot Patch Immediately

PHP published several configuration changes that may reduce exposure to known paths, while stressing that they do not make a vulnerable installation safe. Examples include disabling session upload progress, constraining request sizes, and adjusting memory handling. These should be treated as emergency stopgaps only.

  • Set session.upload_progress.enabled=0 in server-level PHP configuration and restart workers.
  • On PHP 8.5, set fatal_error_backtraces=0 and restart workers.
  • Use a controlled post_max_size appropriate for the application and enforce request limits at the web server or proxy layer.
  • For CVE-2026-109618, PHP notes that memory_limit=-1 can remove one controllable failure path, but underlying allocation failures can still reach vulnerable behavior.

These measures are useful when change windows or package availability temporarily block immediate remediation. They are not an acceptable long-term endpoint.

RavenHawkTech Analysis

PHP2Shell is unusually important because the attack surface sits beneath the application layer. Organizations that normally rely on CMS hardening, application authentication, or application-aware security controls have less room for error when the runtime itself processes malicious state before those controls can engage.

For self-hosters and small organizations, the highest-value response is not complex exploit hunting. It is disciplined operational work: find every PHP runtime, patch it, restart it, validate the effective version, then review telemetry from before the disclosure date. For larger environments, this event is also a good test of software inventory quality. If the security team cannot quickly answer where PHP runs, the environment has an asset-management problem as much as a vulnerability-management problem.

Because credible reporting places exploit attempts before the public advisory, organizations with exposed PHP should also avoid assuming that “patched on October 21” automatically means “nothing to investigate.” Patching closes the door; it does not prove nobody tried the handle earlier.

Sources and Further Reading