Anatomy of Two Critical PHP Vulnerabilities: How They Work and How to Protect Your Systems

Published on Oct 21, 2026

On October 21, 2026, PHP released patches for two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619. Both are rated 9.2 under CVSS v4.0 and can allow unauthenticated remote code execution. The flaws affect PHP itself, so exposure is not limited to WordPress. Laravel, Symfony, Drupal, Magento, custom PHP services, and older internal applications may also be affected. The immediate task is to find where PHP is running and verify that those components have been patched.

Which PHP versions are affected?

The PHP project released fixes for all four supported branches:

PHP branchAffected releasesFirst patched release
8.5Earlier 8.5 releases8.5.12
8.4Earlier 8.4 releases8.4.27
8.3Earlier 8.3 releases8.3.36
8.2Earlier 8.2 releases8.2.35

PHP 8.1 and earlier have reached end-of-life and no longer receive security updates from the PHP project. Organizations running these versions should upgrade to a supported PHP release that contains the patch. Linux distributions may include security fixes without changing the upstream PHP version number, so check the relevant vendor advisory to which version is being used. PHP 8.2 will reach end-of-life on December 31, 2026. Organizations upgrading to 8.2.35 should also plan their migration to a newer supported branch.

Updating the application or the underlying operating system may not be sufficient. For example, if a WordPress deployment runs inside a container built on a vulnerable PHP image, updating the host won’t patch the PHP runtime inside that container. The image must be rebuilt and redeployed with a patched version.

If you’re unsure whether your applications are affected, depthfirst offers free repository and container image scans to help identify potentially vulnerable PHP installations. If you’re running an unsupported PHP version and can’t upgrade immediately, our team can also help assess temporary mitigations to reduce exposure.

Request a free exposure scan and mitigations

How the Vulnerabilities Work

Both vulnerabilities are caused by memory management issues in PHP’s request-handling process.

CVE-2026-109618 affects how PHP handles out-of-memory errors. An out-of-memory condition can interrupt PHP while internal data structures are only partially initialized. This may leave them in an inconsistent state, which can later be accessed during request shutdown, leading to memory corruption and potentially remote code execution.

Researchers demonstrated this vulnerability against Apache mod_php, where a specially crafted HTTP request can trigger the issue before any application code runs, although reliable exploitation may require additional steps to bypass ASLR.

CVE-2026-109619 involves global state retained between requests. Under certain conditions, errors or interrupted operations can leave persistent PHP globals pointing to memory that has already been freed. A subsequent request handled by the same worker may access that stale state before it is properly reset, resulting in a use-after-free vulnerability that can also lead to remote code execution.

These issues affect PHP’s internal request lifecycle. The PHP team has warned that installations serving web requests through Apache mod_php, PHP-FPM, php-cgi, FrankenPHP, and LiteSpeed should be considered at risk. The exact exploit conditions vary across configurations.

Why organizations may not know they’re exposed

PHP can be present in applications that a security team does not think of as PHP applications. A company might primarily build in Python or JavaScript but still run self-hosted tools like Matomo for web analytics or Zabbix’s PHP-based monitoring frontend. Legacy websites, acquired services, and other third-party applications can also introduce PHP runtimes that security teams may not be tracking.

The runtime can also be introduced outside the application’s dependency manifest. Consider a repository with an up-to-date composer.lock file and this Dockerfile instruction:

FROM php:8.3.33-fpm

The application dependencies may be current, but that base image references a PHP version affected by the vulnerabilities. A scanner that only examines Composer packages would not necessarily flag the vulnerable interpreter.

PHP might instead come from an operating-system package, a prebuilt appliance, a managed hosting environment, or an image assembled in another repository. These components may be maintained by different teams, making it difficult to establish which version is deployed.

Looking at the website from the outside is not enough either. PHP version headers are often disabled, and a missing header does not mean PHP is absent. Source repositories can reveal useful clues, but a version written in a Dockerfile or configuration file is not proof of what is currently running in production.

How to check for exposure

The first step is building a list of applications that might use PHP, then verifying the runtimes they actually deploy.

  1. Search repositories and application configurations. Look for PHP source files, Dockerfiles with FROM php:, build and deployment scripts, .php-version, .tool-versions, and PHP version declarations in composer.json. These can identify repositories worth investigating. A Composer version constraint or an unpinned image tag does not establish the exact installed runtime.
  2. Check the version in the deployed environment. Inspect the running container, server, or hosting environment. Running php -v in the relevant environment can help, but make sure you are checking the PHP interpreter serving web requests: the CLI, PHP-FPM, and Apache may use different installations or versions. For managed services, obtain the version and patch status from the provider. Check production separately from staging.
  3. Compare the actual build with the security advisories. The patched upstream versions are listed above. For PHP installed through Debian, Ubuntu, Alpine, or another distribution, use the vendor’s security advisory and package version to account for backported fixes. Don’t rely solely on a CVE scanner immediately after disclosure: its vulnerability database may not yet include the new advisories.
  4. Patch, redeploy, and verify. Upgrade PHP or install the vendor’s fixed package. For containers, rebuild with a patched image, redeploy the new artifact, and restart PHP workers. Confirm the updated version is the one actually serving requests. Updating WordPress, Composer dependencies, or source code alone does not patch an affected PHP runtime.

If you can identify PHP usage but cannot confirm the deployed version, that application still needs investigation. A clean dependency scan or the absence of a PHP version header is not evidence that it is safe.

Why WAF Rules Are Not Sufficient

Web application firewalls (WAFs) can potentially help mitigate some exploitation attempts by blocking known exploit patterns and suspicious HTTP requests. However, WAF rules should not be considered a substitute for patching PHP.

The fundamental challenge is that neither vulnerability is tied to a single malicious request pattern. Both originate from memory-safety issues within the PHP runtime, and the conditions required to exploit them are not always visible at the HTTP layer.

For CVE-2026-109618, known exploitation techniques use specially crafted HTTP requests to trigger out-of-memory conditions during PHP’s internal processing. WAF rules can restrict multipart uploads, request sizes, and parameter complexity, but these measures have limitations. PHP’s memory consumption can be significantly larger than the HTTP request itself, and the vulnerability can also be triggered through application-specific memory allocations. Blocking multipart requests entirely would also disrupt legitimate file uploads.

For CVE-2026-109619, exploitation can involve one request leaving behind stale internal state, followed by another request that accesses it. A WAF cannot directly observe PHP’s internal memory state or determine whether a request will encounter a dangling pointer. Blocking known payload patterns may prevent specific exploitation paths, but other paths involving error handling and serialization may remain possible.

Ultimately, WAF rules are valuable for reducing exposure to known attacks, but they cannot guarantee protection against every exploitation technique. Organizations should keep WAF protections enabled as defense in depth while prioritizing upgrades to patched PHP runtimes.

What we are doing to help

depthfirst can help with two parts of this inventory. Our repository analysis identifies PHP usage and version references in source code and configuration, including Dockerfiles and build files that explicitly specify a PHP version. Our container image scanner can inspect the packages present in container images, including PHP introduced through base images and operating-system packages. This helps uncover runtimes that are absent from application dependency manifests.

We’re offering free repository and container image scans to help organizations identify potentially vulnerable PHP installations. If you’re running an unsupported PHP version and can’t upgrade immediately, our team can also help assess temporary mitigations to reduce exposure while you plan your migration. Reach out below and we’ll help you get started.

Please bear in mind that these are still partial exposure checks. A version reference in a repository may be outdated or approximate, and an image scan only tells you what is present in the image that was scanned. It does not verify which image or PHP runtime is running in production. Newly disclosed CVEs may also take time to appear in scanner databases, so findings should be checked against the PHP and operating-system vendor advisories.


References

  1. PHP security advisory for CVE-2026-109618: RCE via OOM corruption
  2. PHP security advisory for CVE-2026-109619: RCE via stale global state