PHP2Shell: Urgent PHP Update Required for Critical RCE Vulnerabilities
PHP faces critical RCE vulnerabilities. Servers running PHP must update immediately to mitigate risks.
The PHP community is urged to take immediate action following the release of security updates addressing two critical remote code execution (RCE) vulnerabilities. According to Qualys, these vulnerabilities—CVE-2026-109618 and CVE-2026-109619—have been assigned a high CVSS score of 9.2, highlighting their severity. With attack attempts already reported, particularly on Apache mod_php setups, it's crucial for organizations to safeguard their PHP environments without delay.
What Are CVE-2026-109618 and CVE-2026-109619?
The vulnerabilities concern PHP’s handling of memory and internal request states:
- CVE-2026-109618: This out-of-memory corruption vulnerability arises when PHP encounters an out-of-memory error during certain operations, leaving request data in a partially initialized state. Subsequent cleanup routines may inadvertently allow remote code execution through this incomplete initialization.
- CVE-2026-109619: This vulnerability involves stale global state issues where PHP retains references to request data even after the associated memory has been freed. If a new request uses these stale references, it may lead to remote code execution via a use-after-free sequence.
Why These Vulnerabilities Matter for Your Systems
Organizations running PHP to serve web requests, particularly those using Apache mod_php, PHP-FPM, or php-cgi, are at risk. The vulnerabilities impact any PHP environment exposed to the internet, underscoring the importance of a prompt update. Unpatched systems are susceptible to remote code executions, which can lead to unauthorized access and potential data breaches.
Attack Activity Reported: Cloudflare has identified active exploitation efforts, emphasizing the criticality of resolving these vulnerabilities swiftly.
PHP Versions Affected and Fixed
The security updates are available for several PHP branches:
| PHP branch | Fixed version |
|---|---|
| PHP 8.5 | 8.5.12 |
| PHP 8.4 | 8.4.27 |
| PHP 8.3 | 8.3.36 |
| PHP 8.2 | 8.2.35 |
Users of PHP 8.1 and older must rely on backported source updates, as these versions fall outside regular support. Affected users should upgrade to supported versions or apply vendor-specific fixes where available.
How to Secure Your PHP Deployments
Here's a step-by-step approach to secure your PHP environments:
- Update PHP: Ensure all installations are updated to the latest fixed version. For package installations, verify the package version against your distribution’s advisory.
- Restart Services: After updating, restart PHP services and web servers to apply the patches. Verify that the updated versions are running using the
php -vcommand. - Consider Temporary Mitigations: If immediate updating isn’t possible, apply temporary mitigations (e.g., disabling session upload progress, enforcing memory limits) to reduce exposure.
- Scan for Vulnerabilities: Use tools like Qualys VMDR to detect vulnerable PHP versions. Regularly scan and validate that your deployed environments have the necessary patches applied.
- Review Configurations: After applying patches, restore any temporary mitigation settings to appropriate levels, ensuring application stability under expected load.
Limitations of the Current Fixes
While updating to the fixed PHP versions is crucial, it’s not the only step necessary to ensure security:
- The updates don't address other potential PHP configuration issues that could lead to security gaps.
- Temporary mitigations are not substitutes for actual updates; they act only as interim measures.
- Older versions below PHP 8.2 require backports or upgrades; relying solely on older PHP branches continues to pose security risks.
I believe that prioritizing internet-facing systems is essential. If your applications rely heavily on PHP, consider this as critical as any potential vulnerability this year. Make sure each deployment is accounted for, especially in diverse environments like cloud or containerized setups.
Am I Affected?
If your server runs PHP for handling web applications, especially on an internet-exposed server, you may be affected. Here’s how to find out:
- Check all PHP versions using
php -vfor potential outdated instances. - Scan with tools like Qualys for detailed security insights.
- Use configuration files to see if your PHP setup might be vulnerable based on the documented issues.
Next Steps for Administrators
Administrators should prioritize applying the latest updates and security patches immediately. It's critical to stay informed about any additional patches or advisories that may be released by PHP or other vendors. Regular monitoring and scanning can help maintain security across dynamic environments.
Deep Dive into PHP Vulnerability Features
The particular PHP versions listed address specific issues with memory handling and request states that can lead to code execution if exploited. Each PHP setup might require distinct attention depending on its deployment context, server configuration, and resource limits.
Memory Limitations: By setting memory_limit=-1, organizations trade off memory exhaustion risks for security by preventing attacker-induced failure paths.
Administrators should observe CPU loads and memory usage post-patch deployment to catch any performance anomalies induced by configuration changes.
Continuous Security with Qualys
Qualys provides tools such as InstaScan and Deep Scan to ensure PHP installations are up-to-date. These tools help in rapid identification of vulnerable setups, which is crucial for handling dynamic cloud environments.
Example: An organization using mixed PHP versions across servers can employ Qualys Deep Scan to find all copies of PHP, ensuring no vulnerability is left unchecked, regardless of location (standard directory, custom folders, etc.).
Ultimately, securing your PHP environment means continuous monitoring and prompt action against newly discovered threats—Qualys can prove an indispensable asset in that aspect.
Frequently asked questions
What PHP versions do the patches cover?
The patches cover PHP versions 8.5.12, 8.4.27, 8.3.36, and 8.2.35.
How do I know if I am affected by these vulnerabilities?
Check if your server runs vulnerable PHP versions, especially on internet-facing setups. Use security tools like Qualys for scanning.
What should I do if I can't update immediately?
Apply temporary mitigations such as disabling session upload progress and enforcing memory limits.
Are older PHP versions like 8.1 covered in this update?
No, older versions require backports or upgrades as they are out of regular support.
Source: blog.qualys.com



