On October 21, 2026, PHP officially disclosed CVE-2026-109618 and CVE-2026-109619, two critical vulnerabilities (codenamed PHP2Shell). Attackers can remotely execute code through unauthenticated requests. This topic describes the impact assessment, remediation, and verification methods for these two vulnerabilities to help you fix PHP security vulnerabilities in your environment.
Vulnerability overview
On October 21, 2026, PHP officially disclosed CVE-2026-109618 and CVE-2026-109619, collectively known as the PHP2Shell vulnerabilities. Unauthenticated remote attackers can trigger memory corruption by sending crafted HTTP requests, such as multipart POST requests, to execute arbitrary code on the server. The vulnerabilities can be triggered before the request reaches the application code. Under certain conditions, deployment methods that process web requests are affected, including PHP-FPM, Apache mod_php, php-cgi, FrankenPHP, and LiteSpeed.
Both vulnerabilities have a Critical severity rating with a CVSS score of 9.2. No authentication is required to trigger them, and vulnerability details and exploitation tools have been publicly disclosed. If you use PHP, we recommend that you check your PHP usage and apply updates or mitigation measures as soon as possible.
CVE ID | Mechanism | Severity |
CVE-2026-109618 | Memory state corruption during OOM abnormal exit and request cleanup | Critical |
CVE-2026-109619 | Global state residue after request memory deallocation, leading to use-after-free (UAF) | Critical |
In affected PHP web service environments, attackers can trigger the vulnerabilities through unauthenticated requests and execute arbitrary code with the permissions of the web worker process. We recommend that you apply fixes as soon as possible.
Vulnerability details
RCE via OOM corruption (CVE-2026-109618)
CVE ID: CVE-2026-109618
Vulnerability name: PHP session.upload_progress remote code execution vulnerability
Vulnerability type: CWE-1325 (Use After Free)
CVSS score: PHP CVSS v4.0 score: 9.2 (Critical); Alibaba Cloud score: 9.7 (Critical)
Mechanism: Memory state corruption during OOM abnormal exit and request cleanup
When PHP handles OOM (Out of Memory) errors, it exits the execution context through longjmp() and terminates the request. Request memory can be accessed by other processes before initialization is complete. If memory allocation fails at this point, the early exit leaves the request memory in an invalid state. The subsequent request cleanup process then treats uninitialized data as valid, causing memory corruption and remote code execution.
Attack method: Attackers can construct multipart requests with a large number of request headers, nested field names, or empty file controls to exhaust memory_limit and trigger OOM.
The failed memory allocation does not need to be directly related to the memory in the invalid state. Therefore, restricting a single upload method or application entry point cannot fully eliminate the risk.
High-risk deployment method: Apache mod_php still executes the request cleanup process even when request startup fails. Automatic request body parsing can trigger the vulnerability before application code is executed.
PHP-FPM environment: PHP-FPM exits the corresponding child process when request startup fails, which can block this specific startup path. However, OOM paths after normal startup may still be affected. You cannot conclude that PHP-FPM is unaffected based on this alone.
RCE via stale global state (CVE-2026-109619)
CVE ID: CVE-2026-109619
Vulnerability name: PHP global state residue remote code execution vulnerability
Vulnerability type: CWE-1325 (Use After Free)
CVSS score: PHP CVSS v4.0 score: 9.2 (Critical); Alibaba Cloud score: 9.7 (Critical)
Mechanism: Global state residue after request memory deallocation, leading to use-after-free (UAF)
PHP worker processes retain global state from the memory of the previous request. Incomplete reset leads to use-after-free (UAF). Global state for errors, sessions, objects, or extensions in the worker process may point to memory owned by a previous request. Some error handling, exit, or cleanup paths fail to reset state before request memory is freed, or write request-related state again after reset.
Attack method: Attackers can exploit the vulnerabilities by sending two requests to the same worker process in sequence. When the worker process handles the subsequent request, operations such as input, configuration, session, or error handling may access the residual state before normal initialization is complete, causing UAF and potentially leading to remote code execution.
Confirmed exploitation path: session.upload_progress is only one of the confirmed trigger paths and does not represent the full impact scope.
Disabling error display, adjusting error_reporting, or using @ to suppress diagnostic information does not prevent residual state from being accessed before diagnostic output.
Vulnerability risk level and impact
Risk level: Critical
Affected versions: The following PHP versions are affected.
Official PHP versions: Affected versions are PHP 8.2.x (earlier than 8.2.35), PHP 8.3.x (earlier than 8.3.36), PHP 8.4.x (earlier than 8.4.27), and PHP 8.5.x (earlier than 8.5.12).
Alibaba Cloud Linux 2: php < php-5.4.16-48.2.al7
Alibaba Cloud Linux 3: php < php-7.4.33-8.0.1.al8
Alibaba Cloud Linux 4: php < php-8.3.36-1.alnx4
Alibaba Cloud Linux 4 (Deb Edition): php8.3 < 8.3.6-0ubuntu0.24.04.13
NoteFor PHP packages provided by other OS distributions (such as CentOS, Ubuntu, Debian, and RHEL) or other cloud vendors, confirm the fixed version with the corresponding vendor. For PHP environments deployed from container images, third-party software sources, or source code compilation, upgrade to one of the official fixed versions listed above, or contact the vendor for fixed packages.
Impact: Unauthenticated remote attackers can exploit these vulnerabilities to gain the permissions of the web worker process, access or modify data or files accessible to the account, deploy malicious programs, and potentially cause full server compromise, sensitive data leaks, business disruption or service unavailability, and backdoor or malicious code injection.
Quick check
Only environments with PHP components installed need to be checked. Environments without PHP do not require any action. Check containers, third-party software sources, and self-compiled PHP deployments. Do not rely solely on the host package status.
Run the following commands to check whether PHP is installed and the current version:
# Check whether PHP is installed (RHEL/CentOS/Alinux)
rpm -qa | grep php
# Check whether PHP is installed (Debian/Ubuntu)
dpkg -l | grep php
# Check the PHP version
php -v
# Check the PHP-FPM version (if applicable)
php-fpm -v
# Check the PHP module loaded by Apache
httpd -M | grep php
# Check the PHP version in a container
docker exec <container_name> php -vFix the vulnerabilities
Cloud Security Center vulnerability remediation
Cloud Security Center provides vulnerability scanning and remediation capabilities to help you detect and fix PHP vulnerabilities. The following table describes the detection methods and remediation details:
Detection method | Remediation details |
Linux software vulnerabilities |
|
Application vulnerabilities | One-click remediation is not supported. You must manually upgrade PHP. See the manual remediation section in this topic. |
Vulnerability scanning
Access the Security Center console - Risk Governance - Vulnerability Management. In the upper-left corner of the page, select the region of your assets: Chinese Mainland or Outside Chinese Mainland.
Run a scan:
On the Vulnerabilities page, click Quick Scan (All Servers). In the Vulnerability Scan dialog box, select the vulnerability types to scan and click OK.
View scan tasks
In the upper-right corner of the Vulnerabilities page, click Task Management.
Click Details in the Actions column to view the impact data of the scan task, including Affected Servers, Successful Servers, and Failed Servers.
If the scan is successful, you can view the vulnerability scope in the Status column. If the scan fails, you can view the failure reason in the Status column.
NoteCloud Security Center uses two detection methods: Software Composition Analysis (SCA) (passive detection that collects software version information and compares it against the vulnerability database) and Web Scanner (active verification that sends harmless probe requests to confirm vulnerabilities). The Web Scanner feature is not yet available for assets in the Global (excluding China) region hosted in the Singapore data center.
View scan results: After the scan is complete, search for the CVE IDs (CVE-2026-109618 or CVE-2026-109619) in the vulnerability list to view vulnerability details and affected assets.
Configure a periodic scan policy: In the upper-right corner of the Vulnerabilities page, click Vulnerability Settings and configure the following settings.
Parameter
Description
Vulnerability scan switch
We recommend that you enable all Linux Software Vulnerability, Windows System Vulnerability, Application Vulnerability, and Urgent Vulnerability scan switches. After enabling, you can click Management on the right to specify the scan scope (applicable servers) for each vulnerability type.
YUM/APT Source Configuration
After you enable this option, Alibaba Cloud official YUM/APT sources are preferred when fixing Linux vulnerabilities, which significantly improves the remediation success rate.
Urgent Vulnerability Scan Cycle
Set the frequency of emergency vulnerability scan tasks.
Default scan period:
China region:
00:00:00 (UTC+8)to07:00:00 (UTC+8).Global (excluding China) region:
00:00:00 (UTC+7)to07:00:00 (UTC+7).
Applicable editions/protection levels:
Subscription: Advanced, Enterprise, Ultimate.
Pay-as-you-go: Comprehensive Host Protection, Hosts and Container Protection.
Application Vulnerability Scan Cycle
Set the frequency of application vulnerability scan tasks.
Default scan period:
China region:
00:00:00 (UTC+8)to07:00:00 (UTC+8).Global (excluding China) region: Uses staggered scheduling and runs in different time slots within 24 hours.
Applicable editions/protection levels:
Subscription: Enterprise, Ultimate.
Pay-as-you-go: Comprehensive Host Protection, Hosts and Container Protection.
System Vulnerabilities Scanned At
Set the specific time for Linux software vulnerability and Windows system vulnerability scan tasks.
Retain Invalid Vulnerabilities For
Set the data cleanup cycle for expired vulnerabilities.
The system marks vulnerabilities that have not recurred or been handled for a long time as expired and automatically archives them to the Handled list. After the configured cleanup cycle expires, the system permanently deletes them to reduce information noise.
NoteWhen Cloud Security Center detects similar vulnerabilities again, alerts are still generated.
Vulnerability Scan Level
Set the vulnerability risk levels to monitor. The system scans and generates alerts only for vulnerabilities that match the selected level.
Vulnerability Whitelist Settings
Add specific vulnerabilities that do not need to be handled (for example, due to special business requirements or acceptable risk) to the whitelist so that they are automatically ignored in subsequent scans.
NoteAfter adding a vulnerability whitelist rule, you can manage it (edit or delete) in Vulnerability Settings > Vulnerability Whitelist Settings.
Vulnerability remediation
Remediation notes
One-click remediation only supports PHP installed through system package managers such as yum and apt.
PHP in container environments, from third-party software sources, or self-compiled must be upgraded manually.
The remediation process may require a restart of the PHP service. We recommend that you perform the remediation during a maintenance window.
Procedure
Filter the target vulnerability: In the vulnerability list, filter PHP vulnerabilities by CVE ID or vulnerability name.
View vulnerability details: Click the name of the target vulnerability to go to the details page to view vulnerability information, affected assets, and remediation suggestions.
Perform remediation:
Linux software vulnerabilities:
Under Linux Software Vulnerability, click the name of the target Vulnerability or click Fix in the Actions column.
In the Unhandled Vulnerabilities section, click Fix in the Actions column for the target server.
NoteYou can also select multiple servers and click Fix below the list to batch remediate vulnerabilities on multiple servers.
In the Remediation dialog box, select a remediation method: Automatically Create Snapshot and Fix Risk or Skip Snapshot and Fix, and click Fix Now.
(Optional) Configure Mandatory Fix: When remediating kernel vulnerabilities, the system verifies whether the upgraded kernel version is compatible with the Cloud Security Center agent. If incompatible, the system interrupts the remediation and displays a failure dialog box.
Close the failure dialog box and click Fix in the Actions column for the target vulnerability again.
In the Remediation dialog box, the Mandatory Fix option appears. After you select this option and choose a remediation method, click Fix Now to retry.
ImportantVulnerability remediation may involve upgrading the system kernel or software version, which poses business compatibility risks. We recommend that you select the Automatically Create Snapshot and Fix Risk option for quick rollback if issues occur.
Snapshots created through the Automatically Create Snapshot and Fix Risk option during one-click remediation are used for quick rollback if unexpected issues occur. These snapshots may not cover all data disks attached to the server. If you have strict data consistency requirements, we recommend that you manually create snapshots covering all data disks before performing vulnerability remediation.
The system starts the remediation task. The vulnerability status changes to Fixing. If the remediation is successful, the status changes to Fixed.
Application vulnerabilities: One-click remediation is not supported. You must manually upgrade PHP. See the manual remediation section in this topic.
Verify the remediation result: After the remediation is complete, confirm that the vulnerability status has changed to Fixed in the vulnerability list.
Manual remediation
The following remediation methods require manual command execution or operations.
PHP from third-party software sources, container images, or self-compiled deployments is not automatically fixed by upgrading the official PHP package on the host. Confirm the fixed version with the corresponding vendor and update the PHP runtime environment that actually provides web services.
Alibaba Cloud Linux remediation
Run the following commands to upgrade PHP to the fixed version:
Select the upgrade command based on your environment
Alibaba Cloud Linux 2
sudo yum update php -y # Verify version ≥ php-5.4.16-48.2.al7 rpm -q phpAlibaba Cloud Linux 3
sudo yum update php -y # Verify version ≥ php-7.4.33-8.0.1.al8 rpm -q phpAlibaba Cloud Linux 4
sudo yum update php -y # Verify version ≥ php-8.3.36-1.alnx4 rpm -q phpAlibaba Cloud Linux 4 (Deb Edition)
sudo apt update sudo apt install --only-upgrade php8.3-cli php8.3-common php8.3-fpm # Verify version ≥ 8.3.6-0ubuntu0.24.04.13 dpkg -l | grep php8.3
Restart the PHP service after remediation:
# PHP-FPM environment sudo systemctl restart php-fpm # Apache mod_php environment sudo systemctl restart httpd
Legacy PHP source patches (end-of-life versions)
For PHP 8.1 and earlier versions that are no longer maintained, the PHP security team provides source code patches that contain only the fixes for these vulnerabilities. You can compile and deploy the patched source code on your own. We recommend that you upgrade to a maintained PHP version as soon as possible.
PHP 7.4: PHP 7.4 source patch
PHP 8.0: PHP 8.0 source patch
PHP 8.1: PHP 8.1 source patch
You can also obtain the latest fixed versions from the PHP official download page.
Temporary mitigation (when immediate upgrade is not possible)
If you cannot upgrade immediately, apply the following temporary mitigation measures based on the vulnerability type.
No universal configuration-based mitigation can fully eliminate the risk of these two vulnerabilities. Only installing a version with complete fixes can remediate the vulnerabilities. The following configurations only reduce the risk of specific trigger paths and cannot replace an upgrade. Apply the upgrade as soon as possible.
Mitigation for CVE-2026-109618 (RCE via OOM corruption)
This vulnerability is exploited by exhausting memory_limit to trigger OOM. The mitigation is to remove the memory limit or restrict request complexity:
Remove the memory limit: The administrator must set
memory_limit=-1in php.ini, restart all PHP worker processes, and make sure the configuration is not overridden.memory_limit = -1ImportantEvaluate the risk of resource exhaustion before removing the memory limit. Do not use RLIMIT_AS or RLIMIT_DATA as an alternative protection.
Restrict request complexity: Limit the size of the decoded request body, the number of uploads, and input complexity on the frontend.
Block multipart requests: Applications that do not use multipart forms can block such requests.
Mitigation for CVE-2026-109619 (RCE via stale global state)
This vulnerability is exploited through global state residue across requests. The mitigation is to disable the features that retain such state:
Disable session upload progress: Set the following in php.ini:
session.upload_progress.enabled = 0NoteDisabling this feature may affect upload progress display.
Disable fatal error backtraces (PHP 8.5): In PHP 8.5, you can also set
fatal_error_backtraces=0as a mitigation.Limit requests per worker (PHP-FPM): After evaluating the performance impact, you can set
pm.max_requests=1in PHP-FPM to reduce cross-request state reuse.
Confirmed exploitation path: session.upload_progress is only one of the confirmed trigger paths. The preceding measures cannot cover all cross-request state issues.
General configuration requirements
All preceding configurations must be enforced by the administrator in php.ini. Do not rely on
ini_set()in application code or.user.inisettings in PHP-FPM.Restart all affected PHP worker processes after the modification to make the configurations take effect.
Verify the fix
Perform the following verification steps to confirm that the vulnerabilities are fixed:
Check the PHP version: Confirm that the version has reached the fixed version.
# PHP CLI version php -v # PHP-FPM version php-fpm -v # PHP module loaded by Apache httpd -M | grep php # PHP version in a container docker exec <container_name> php -vConfirm the fixed version:
Official PHP versions: The fixed versions are PHP 8.2.35, 8.3.36, 8.4.27, 8.5.12, and later.
Alibaba Cloud Linux 2: php ≥ php-5.4.16-48.2.al7
Alibaba Cloud Linux 3: php ≥ php-7.4.33-8.0.1.al8
Alibaba Cloud Linux 4: php ≥ php-8.3.36-1.alnx4
Alibaba Cloud Linux 4 (Deb Edition): php8.3 ≥ 8.3.6-0ubuntu0.24.04.13
Verify that services are restarted:
# Check PHP-FPM status sudo systemctl status php-fpm # Check Apache status sudo systemctl status httpdApplication verification: Check whether the application is accessible and review error logs for anomalies.
Common mistake: Relying solely on the php -v output to confirm remediation. You must verify the version of the binary or module loaded by the service and check PHP versions in containers and third-party software sources.
FAQ
Does the fix require a service restart? Will it interrupt my business?
PHP worker processes must be restarted to load the updated program. The restart interrupts in-progress requests. We recommend that you perform the restart during a maintenance window, notify relevant business teams in advance, and prepare a rollback plan.
Are the temporary mitigation measures sufficient?
No. All temporary mitigation measures only reduce the risk of specific trigger paths. They cannot cover all exploitation methods and cannot replace an upgrade. Apply the upgrade as soon as possible.
How do I check whether my environment uses PHP?
Run the following checks:
# Check system packages rpm -qa | grep php # RHEL/CentOS/Alinux dpkg -l | grep php # Debian/Ubuntu # Check running services ps aux | grep php-fpm ps aux | grep httpd # Check containers docker ps | grep phpWhat do I do if compatibility issues occur after I upgrade PHP?
Verify the upgrade in a test environment first.
Check the PHP version changelog for incompatible changes.
Adjust your application code if necessary.
Contact Alibaba Cloud Technical Support for assistance.
Why did Cloud Security Center not detect CVE-2026-109618 and CVE-2026-109619 before?
Detection rule release date: The detection rule for this vulnerability was released on October 21, 2026. Detections before this date were not possible.
Network whitelist configuration: If you did not add the Cloud Security Center scan IP addresses to your whitelist, the active verification requests from the Web Scanner may be blocked, which prevents application and emergency vulnerabilities from being detected. For configuration instructions, see Vulnerability scanning.
Agent exception: Cloud Security Center agent exceptions may cause detection failures. For solutions, see Troubleshoot client issues.
Vulnerability scan not performed: If you did not manually run a vulnerability scan or enable the automatic scan policy, vulnerabilities may go undetected. For configuration instructions, see Vulnerability scanning.
Operating system not in the support scope: System vulnerability detection depends on the operating system support scope. Systems outside the support scope are not detected. For the supported operating systems, see Supported operating systems for vulnerability scanning and fixing.
Can I apply protection against CVE-2026-109618 and CVE-2026-109619 before upgrading?
You can apply temporary mitigation measures:
Use WAF or Cloud Firewall first: Block exploitation traffic.
PHP configuration mitigation: If you cannot upgrade immediately, you can apply temporary mitigation measures. For more information, see the Temporary mitigation section.
WarningMitigation measures and virtual patches are transitional solutions. We recommend that you fix the vulnerabilities as soon as possible to eliminate the risk.