PHP 2Shell Critical Flaws (CVE‑2026‑109618, CVE‑2026‑109619) Enable Unauthenticated Remote Code Execution
What It Is — The PHP core team released emergency patches on 21 Oct 2026 for two newly disclosed vulnerabilities, collectively dubbed PHP2Shell. Both flaws received a CVSS v4.0 base score of 9.2 (Critical) and allow an unauthenticated attacker to execute arbitrary code in the context of the web‑server process.
- CVE‑2026‑109618 – A memory‑handling error triggered when PHP runs out of memory. The cleanup routine may operate on partially‑initialized request data, leaving a dangling pointer that can be hijacked to run attacker‑supplied code. Researchers demonstrated remote code execution against Apache mod_php with default memory limits.
- CVE‑2026‑109619 – A use‑after‑free condition where data from a prior request remains referenced after its memory is released. A subsequent request handled by the same worker can reuse those references, leading to memory disclosure or code execution. The flaw works against both mod_php and PHP‑FPM; the FPM path requires a suitable application‑level operation but is still exploitable.
The vulnerabilities affect any PHP installation that processes web requests, including PHP‑FPM, Apache mod_php, php‑cgi, FrankenPHP and LiteSpeed. PHP 8.2‑8.5 are covered by the emergency releases (8.2.35, 8.3.36, 8.4.27, 8.5.12). Older branches (PHP 8.1 and earlier) are out of regular support; the maintainers provided source patches for 7.4, 8.0 and 8.1, but users are urged to upgrade to a supported release.
The flaws were first identified by independent researcher @lcfr_hax, who published a working exploit on 5 Aug 2026. The discovery prompted the PHP Foundation to fund a full class‑wide remediation, with additional testing by the cybersecurity firm Calif (via its “Patch the Planet” initiative) and verification using GPT‑5.6 Sol.
Apache mod_php Faces the Highest Risk – The PHP team highlighted that the attack surface is largest for Apache’s mod_php configuration because the exploit can run before any application code is executed. An attacker who compromises a site can hijack its reputation, turning the trusted domain into a delivery channel for phishing pages, malware, or further lateral movement. Malwarebytes’ Shahak Shalev warned that the “goldmine” of a compromised site can be leveraged for endless malicious campaigns.
Temporary Mitigations – For administrators unable to patch immediately, the advisory recommends disabling session upload progress and, on PHP 8.5, disabling fatal‑error backtraces, followed by a full restart of all PHP workers. These steps block the demonstrated attack paths but do not provide comprehensive protection; error‑message suppression alone does not stop exploitation of the stale‑state condition.
Patch Availability – Linux distributions and long‑term‑support vendors received the patches ahead of the public announcement. Organizations using vendor‑maintained packages should verify that the updated versions are present. Managed‑hosting customers must confirm with their providers that the PHP runtime has been updated; updating WordPress or its plugins does not replace the underlying PHP binary.
Detection & Disclosure Timeline
| Date | Event |
|------|-------|
| 5 Aug 2026| @lcfr_hax publishes exploit tweet. |
| 20 Oct 2026| PHP Foundation announces upcoming emergency release (14:00 UTC, 21 Oct). |
| 21 Oct 2026| Emergency patches released for PHP 8.2‑8.5; advisory published. |
| 22 Oct 2026| Media coverage (HackRead, Malwarebytes) highlights impact and mitigation. |
Response & Community Involvement – The PHP security team coordinated with the original researcher, Calif, and several infrastructure providers to validate the fixes across diverse runtimes. The advisory stresses that the patches are the only reliable long‑term solution; temporary configuration changes are a stop‑gap.
Open Questions – While the advisory confirms that the attacker gains the privileges of the web‑server process, it does not clarify whether privilege escalation to root is feasible on typical Linux distributions. Additionally, the exact success rate of the FPM attack vector under varied application workloads remains undocumented.
Why It Matters for Trust & Control Assurance – These flaws test the patch‑management and secure‑configuration control objective, a single control that maps to many frameworks (e.g., NIST CSF Identify → Protect). Demonstrating timely remediation and evidence of applied patches strengthens audit readiness across regulatory regimes.
Recommended Actions
- Verify PHP version and apply the emergency patches (8.2.35, 8.3.36, 8.4.27, 8.5.12) or the source patches for legacy branches.
- Restart all PHP workers and confirm the updated binaries are in use.
- If patching cannot be completed immediately, implement the temporary mitigations (disable session upload progress, fatal‑error backtraces) and restart workers.
- Capture patch‑installation logs and update your configuration‑management inventory to provide defensible evidence for auditors.
- Review hosting‑provider SLAs to ensure they include timely PHP runtime updates.
Source: HackRead article