---
title: "Critical PHP Vulnerabilities Allow Unauthenticated Remote Code Execution (CVE-2026-109618, CVE-2026-109619): Patch Now"
thumbnail_title: "Critical PHP RCE. Patch now."
slug: "critical-php-vulnerabilities-cve-2026-109618-cve-2026-109619"
description: "Two critical PHP vulnerabilities, CVE-2026-109618 and CVE-2026-109619 (CVSS v4.0 9.2), can allow unauthenticated remote code execution on PHP installations that serve web requests. Affected deployments, fixed versions, temporary mitigations and remediation steps."
author: "security-team"
date: "October 22, 2026"
lastUpdated: "2026-10-22"
category: "Security"
faqAccordion: true
featured_image: "https://strapi-main-website.objectstore.e2enetworks.net/Hooded_Hacker_with_PHP_Laptop_and_Breach_Alert_1_a04aa31992.png"
---

## At a Glance

- **Affected software:** PHP, every installation that serves web requests
- **CVE IDs:** CVE-2026-109618, CVE-2026-109619 (publicly referred to as "php2shell")
- **Severity:** Critical, CVSS v4.0 9.2 for each vulnerability
- **Impact:** Unauthenticated remote code execution
- **Fixed in:** PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35
- **Action:** Update immediately, starting with internet-facing servers and Apache mod_php deployments

## Overview

E2E Networks' Security Operations Center (SOC) is highlighting two critical vulnerabilities affecting PHP installations that serve web requests. Disclosed by the PHP project on **21 October 2026**, **CVE-2026-109618** and **CVE-2026-109619** could allow an unauthenticated attacker to execute arbitrary code on a vulnerable system.

Successful exploitation could compromise web applications, expose sensitive data, or affect the underlying host, depending on the privileges of the vulnerable PHP process.

The vulnerabilities affect all common ways of running PHP for the web, including **PHP-FPM, Apache with mod_php, PHP-CGI, FrankenPHP and LiteSpeed**. The PHP project rates the risk highest for **Apache with mod_php**, where a demonstrated exploit can be triggered by an unauthenticated request before any application code runs.

**Exploitation status:** The PHP project brought the security release forward after the CVE identifiers became public ahead of the planned disclosure. Security researchers and vendors have since reported exploitation attempts against internet-facing PHP servers. Treat this as an emergency update rather than routine patching.

Administrators should identify affected PHP installations and apply the security updates immediately. As the PHP project states, updating is the only complete fix.

## 1. Understanding the Vulnerabilities

### CVE-2026-109618: Remote Code Execution via Out-of-Memory Corruption

This vulnerability is in how PHP handles out-of-memory (OOM) conditions. An allocation failure can interrupt request processing while PHP's internal request data is only partially initialised. The cleanup that follows can then treat that invalid data as valid, leading to memory corruption and potentially remote code execution.

### CVE-2026-109619: Remote Code Execution via Stale Global State

This vulnerability is a use-after-free. Internal state owned by one request can survive after the memory backing it has been freed. A later request handled by the same worker may use that stale state before normal initialisation resets it, potentially resulting in remote code execution.

Both vulnerabilities are rated **CVSS v4.0 9.2 (Critical)**. Exploitability can vary with the PHP version, deployment architecture and configuration, but no supported way of serving PHP over the web should be assumed safe.

## 2. Who Is Affected?

The PHP project states that **every PHP installation that serves web requests is at risk**. Environments to review include:

- PHP-FPM deployments
- Apache HTTP Server deployments using mod_php
- PHP-CGI deployments
- FrankenPHP and LiteSpeed environments
- WordPress sites, e-commerce platforms, content management systems and other PHP applications
- Virtual machines, containers and self-managed servers running PHP
- Hosting control panels, software appliances, third-party products and application stacks that bundle their own PHP runtime

All PHP versions earlier than the fixed releases below are affected, including PHP 8.1 and older branches that no longer receive security updates from the PHP project.

Prioritise internet-facing PHP services, particularly Apache mod_php deployments. Do not assume an application is safe because it sits behind a reverse proxy, CDN or web application firewall (WAF).

## 3. Fixed PHP Versions

The PHP project has released security updates that fix both vulnerabilities.

| PHP branch | Affected versions | Fixed release (or later) |
|---|---|---|
| PHP 8.5.x | 8.5.0 – 8.5.11 | **8.5.12** |
| PHP 8.4.x | 8.4.0 – 8.4.26 | **8.4.27** |
| PHP 8.3.x | 8.3.0 – 8.3.35 | **8.3.36** |
| PHP 8.2.x | 8.2.0 – 8.2.34 | **8.2.35** |

Source and Windows downloads are available on the [official PHP downloads page](https://www.php.net/downloads.php).

### Important Notes for Administrators

- **Linux distribution packages:** The PHP project provided the fixes to distribution vendors in advance. Check your operating system vendor's security advisories and install the patched package. Vendors often backport fixes without changing the upstream version number, so the version shown by `php -v` may still look older than the table above.
- **PHP 8.1 and older:** The PHP project no longer ships updates for these branches. Check whether your operating system or long-term-support vendor provides a patched package; otherwise, upgrade to a supported branch. For those who build PHP from source, the PHP security team has published minimal source backports for **PHP 7.4, 8.0 and 8.1**. PHP 7.3 and older have no official fix and must be upgraded.
- **PHP 8.2:** Upstream security support ends on **31 December 2026**. Apply 8.2.35 now and plan a move to a newer branch.
- **Bundled PHP runtimes:** Check control panels, application appliances, container images and third-party products that ship their own PHP installation. These are not updated by your operating system's package manager.

## 4. Recommended Immediate Actions

Organisations running PHP should take the following steps:

1. **Inventory PHP installations.** Identify PHP versions across production, staging, development and internet-facing environments.
2. **Prioritise exposed workloads.** Patch publicly accessible PHP services first, with particular attention to Apache mod_php deployments.
3. **Apply the security updates.** Upgrade to the fixed release for your branch, or install a vendor package confirmed to contain the fixes.
4. **Restart or redeploy affected services.** Make sure PHP-FPM workers, Apache processes, containers and other runtimes are actually running the patched code. Installing a package does not replace workers that are already running.
5. **Rebuild container images.** Update the PHP base image or packages in your image definitions, rebuild, and redeploy the affected workloads.
6. **Review security logs.** Check web server, PHP-FPM, application, authentication and system logs for suspicious requests, repeated fatal or out-of-memory errors, unexpected worker crashes, unusual process execution, unauthorised file changes and unexpected outbound connections.
7. **Restrict exposure if patching is delayed.** If you cannot patch immediately, take vulnerable internet-facing services off public networks until you can.
8. **Investigate suspected compromise.** If you find indicators of compromise, isolate the affected workload where possible, preserve logs and forensic evidence, and investigate before restoring service.

## 5. Temporary Risk-Reduction Measures

Temporary configuration changes are **not a substitute for installing the security updates**. The PHP project documents measures that reduce exposure to specific attack paths, but states explicitly that they do not make a vulnerable installation safe.

If you cannot patch immediately, restricting public access or isolating the service comes first. Qualified administrators may also review the following measures against the official PHP advisory and the needs of their deployment.

### For CVE-2026-109618 (Out-of-Memory Corruption)

- **Remove the PHP memory limit in server-controlled configuration.** The PHP project documents setting `memory_limit = -1` through configuration that applications cannot override, such as `php_admin_value` in the PHP-FPM pool or Apache configuration. Check that no pool, directory or application setting reapplies a finite limit. This removes the controllable memory-limit failure, but genuine allocation failures can still reach the vulnerable code, and an unlimited memory limit increases the risk of resource exhaustion.
- **Use container or cgroup memory limits as the safety boundary.** Configure them so that only the affected worker is killed. **Do not** use `RLIMIT_AS` or `RLIMIT_DATA` as a mitigation; these can trigger the vulnerable allocation-failure path.
- **Lower request-size limits.** The PHP advisory recommends `post_max_size = 8M` for applications that do not accept file uploads, or `32M` where uploads are required, with `upload_max_filesize` set below `post_max_size`.
- **Enforce request limits at the web server or reverse proxy.** Where supported, limit decoded request size, input field count, multipart part count, header count and nesting depth. Make sure the limits also apply to requests without a usable `Content-Length` header.

### For CVE-2026-109619 (Stale Global State)

- **Disable session upload progress.** Set `session.upload_progress.enabled = 0` in `php.ini`, the PHP-FPM pool or server configuration (configuration that applies before the request is parsed), then restart every worker. Do not rely on `ini_set()` or `.user.ini` for this. It blocks the confirmed session-based attack path, not every variant.
- **On PHP 8.5, disable fatal-error backtraces.** Set `fatal_error_backtraces = 0` in configuration that applies before request parsing, then restart every worker. This blocks the confirmed fatal-backtrace path only.
- **Remove invalid or deprecated per-request settings.** Remove settings that an attacker can reach per request and that emit diagnostics before request initialisation, such as entries in `.htaccess` files or PHP settings passed in by a proxy.
- **Fix attacker-triggerable fatal errors and timeouts.** Review upload, import, callback and cleanup code paths. Hiding diagnostics with `error_reporting`, `display_errors` or the `@` operator does **not** prevent exploitation.

Evaluate these settings against the official advisory, apply them in the correct configuration context, and test them for application compatibility. Restart or reload the relevant workers or services afterwards.

### Web Application Firewall (WAF) Protection

A WAF can add a layer of defence, but it cannot make a vulnerable PHP runtime safe.

Customers using the [E2E Networks BitNinja add-on](https://docs.e2enetworks.com/docs/myaccount/security/bitninja/managebitninja/) should make sure WAF protection is enabled and up to date. Other customers may consider additional WAF or reverse-proxy controls as part of a defence-in-depth approach.

**Patching remains the priority.** Network controls and temporary configuration changes must not delay the PHP security updates.

## 6. Verify the Installed PHP Version

Check the PHP command-line version with:

```bash
php -v
```

The command-line version can differ from the runtime that serves web requests, so also check the version used by:

- **PHP-FPM.** The binary name often includes the version, for example:

  ```bash
  php-fpm -v        # or php-fpm8.3 -v, php-fpm82 -v, depending on the distribution
  ```

- **Apache with mod_php.** Check whether the PHP module is loaded:

  ```bash
  apachectl -M 2>/dev/null | grep -i php
  ```

- **Installed packages.** List the PHP packages and their versions:

  ```bash
  dpkg -l | grep -i php      # Debian / Ubuntu
  rpm -qa | grep -i php      # RHEL / AlmaLinux / Rocky Linux
  ```

- **Containers and Kubernetes workloads.** Check the PHP version inside each running image:

  ```bash
  docker exec <container> php -v
  ```

- **Hosting control panels and third-party stacks.** Check the PHP versions configured in the panel or product, as these often maintain their own PHP builds.

For package-managed installations, use your package manager and your vendor's security advisories to confirm that the installed package contains the fixes. Do not rely only on the version string where the vendor may have backported the patches.

## 7. Post-Remediation Validation

After patching, administrators should:

- Confirm that every active PHP runtime and worker is running a fixed release or a vendor-confirmed patched package.
- Restart or reload the relevant services where required.
- Check that applications are healthy and working normally.
- Rebuild and redeploy any container images that contained vulnerable PHP packages.
- Review logs for suspicious activity both before and after remediation.
- Investigate unexpected processes, files, user accounts or outbound connections associated with PHP or the web server.
- If indicators of compromise are found, preserve evidence, investigate the potential exposure, and rotate any credentials the affected system could access.

The absence of suspicious log entries does not, on its own, prove that a system has not been compromised.

## 8. How E2E Networks Can Help

E2E Networks recommends that organisations running PHP applications assess their exposure and prioritise remediation based on internet accessibility and deployment architecture.

Customers who manage their own operating systems, PHP installations, containers and applications should coordinate the updates and validation with their infrastructure and application teams. Customers using managed hosting or third-party application platforms should confirm remediation status with their service provider.

For infrastructure-level assistance or network and security support, contact the E2E Networks support team through your usual support channel.

## Official References

- [PHP Security Advisory: Critical remote code execution vulnerabilities, update now](https://www.php.net/archive/2026.php#2026-10-21-5)
- [CVE-2026-109618: GitHub Security Advisory (GHSA-w8hw-w9fx-j79w)](https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w)
- [CVE-2026-109619: GitHub Security Advisory (GHSA-6wmf-4rv5-p3rp)](https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp)
- [Official PHP downloads](https://www.php.net/downloads.php)
- [CISA alert: Critical Vulnerabilities in PHP Require Immediate Patching](https://www.cisa.gov/news-events/alerts/2026/10/21/critical-vulnerabilities-php-require-immediate-patching)
- [E2E Networks BitNinja add-on documentation](https://docs.e2enetworks.com/docs/myaccount/security/bitninja/managebitninja/)

*E2E Networks Security Operations Center (SOC)*

## FAQs

### What are CVE-2026-109618 and CVE-2026-109619?

They are two critical vulnerabilities in PHP, disclosed on 21 October 2026 and publicly referred to as "php2shell". CVE-2026-109618 is memory corruption triggered by out-of-memory handling, and CVE-2026-109619 is a use-after-free caused by stale internal state. Both are rated CVSS v4.0 9.2 and can allow an unauthenticated attacker to run code on the server.

### Is my server affected?

If PHP on your server serves web requests and is older than 8.5.12, 8.4.27, 8.3.36 or 8.2.35, it is affected, unless your operating system vendor has shipped a patched package. This applies to PHP-FPM, Apache with mod_php, PHP-CGI, FrankenPHP and LiteSpeed. PHP 8.1 and older are also affected.

### Which PHP version should I update to?

Update to the fixed release for your branch or later: 8.5.12, 8.4.27, 8.3.36 or 8.2.35. On a Linux distribution's own PHP packages, install the patched package from your vendor instead. On PHP 8.1 or older, upgrade to a supported branch or use a vendor that provides a patched build.

### Is my site safe if it is behind a WAF or CDN?

Not necessarily. A WAF or CDN can block some attack attempts, but it cannot make a vulnerable PHP runtime safe. Update PHP even if a WAF is in front of the site.

### I've installed the update. What else do I need to do?

Restart PHP-FPM, Apache and any other PHP workers so they load the patched code, and rebuild and redeploy container images. Then confirm the version each web runtime is running, check that your applications work, and review your logs for signs of earlier compromise.
