How to Fix PHP2Shell (CVE-2026-109618 & CVE-2026-109619)
On October 21–22, 2026, the PHP development team released emergency security updates addressing two critical unauthenticated remote code execution (RCE) flaws known as PHP2Shell (CVE-2026-109618 and CVE-2026-109619). Follow our verified zero-downtime patching guide to upgrade to the latest official releases across Ubuntu, Debian, RHEL, AlmaLinux, Docker, and control panels.
Official Patched PHP Versions Matrix
The PHP Security Team released official point releases addressing both CVE-2026-109618 and CVE-2026-109619. Verify your active PHP branch against the official resolution matrix:
| PHP Branch | Affected Versions | First Fixed Version | Remediation Status |
|---|---|---|---|
| PHP 8.5 | 8.5.0 – 8.5.11 | 8.5.12 | Official release available |
| PHP 8.4 | 8.4.0 – 8.4.26 | 8.4.27 | Official release available |
| PHP 8.3 | 8.3.0 – 8.3.35 | 8.3.36 | Official release available |
| PHP 8.2 | 8.2.0 – 8.2.34 | 8.2.35 | Official release available |
| PHP 5.4 – 8.1 | 5.4.0 – 8.1.31 (All versions) | No upstream fix released | End-of-life and have no planned fix · Migration to a supported branch is required |
The PHP development team released emergency security updates on October 21–22, 2026, to fix two critical unauthenticated remote code execution (RCE) vulnerabilities known as PHP2Shell (CVE-2026-109618 and CVE-2026-109619). Review the official threat reports and sysadmin advisories:
- Qualys Threat Research: PHP Announces Critical Security Release for Two Vulnerabilities
- Deutsche Welle (DW): PHP Developers Say Key Patches Available After Global Scare
- TuxCare Advisory: PHP2Shell (CVE-2026-109618 & CVE-2026-109619) Patch Availability
- Reddit r/sysadmin: PHP Patch is Now Available (Verification & Community Discussion)
Operating System Patching Commands
Execute the commands below based on your server's Linux distribution or deployment model:
APT Package Upgrade (Ondřej Surý PPA)
Update repository metadata and upgrade installed PHP-FPM and CLI binary packages without replacing unrelated packages:
DNF / YUM Upgrade (Remi Repository)
Purge DNF package caches and update the active PHP module stream:
Container Base Image Rebuild
Ensure your Dockerfile pulls patched upstream images and rebuild without caching:
cPanel / WHM & Plesk Updaters
Update managed PHP packages through official control panel updaters:
Emergency Workaround: PHP-FPM Pool Lifecycle Hardening
If immediate binary package upgrading cannot be performed due to change-freeze windows or legacy extension compilation constraints, apply these configuration hardening rules immediately to neutralize CVE-2026-109619:
1. Limit PHP-FPM Worker Lifecycle (pm.max_requests)
CVE-2026-109619 exploits persistent worker memory reuse. By configuring pm.max_requests = 250, each PHP-FPM child process terminates and returns memory to the OS after serving 250 requests, preventing cross-request token contamination:
2. Cloak PHP Identification Headers (expose_php = Off)
Prevent automated scanners from identifying your exact PHP patch level:
Verification & Post-Patch Audit
After applying package upgrades and configuration changes, run these verification checks:
php -v and php-fpm8.3 -v in your terminal. Confirm that your patch version is PHP 8.2.35+, 8.3.36+, 8.4.27+, or 8.5.12+.
curl -I https://yourdomain.com and verify that neither X-Powered-By: PHP nor unpatched engine tags appear in the response.
Need Certified Engineers to Patch Your Servers?
The solution is to contact your server team to apply the latest PHP patch to your website. You may contact us for any help with it. Our certified security engineers provide zero-downtime updates, pool hardening, and patch verification.
Frequently Asked Questions
• PHP 8.5: Affected versions 8.5.0–8.5.11 · First fixed version: 8.5.12
• PHP 8.4: Affected versions 8.4.0–8.4.26 · First fixed version: 8.4.27
• PHP 8.3: Affected versions 8.3.0–8.3.35 · First fixed version: 8.3.36
• PHP 8.2: Affected versions 8.2.0–8.2.34 · First fixed version: 8.2.35
• PHP 5.4–8.1: No upstream fix released. End-of-life and have no planned fix. Migration to a supported branch is required.