PHP2Shell: Emergency Fixes Land for Two CVSS 9.2 Unauthenticated RCE Flaws Affecting Nearly Every PHP Version
The PHP team has shipped emergency fixes for two critical vulnerabilities — both scored CVSS 9.2 and both allowing unauthenticated remote code execution — that affect every PHP installation serving web requests. All users are strongly urged to update immediately to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35.
- Two flaws, both CVSS 9.2: CVE-2026-109618 and CVE-2026-109619
- Fixes released October 21 at 13:30 UTC: PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35
- At risk: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed — mod_php carries the highest risk
- A demonstrated exploit triggers the attack with a single unauthenticated request before any application code runs
- Technical details are public and initial PoCs are circulating; CERT-EU warns attackers may already be exploiting the flaws
The Two Vulnerabilities
The first flaw (CVE-2026-109618) is remote code execution through memory corruption during out-of-memory handling. PHP enforces its user-configurable memory_limit by using longjmp() to abort requests that exceed the limit — but the abort can interrupt PHP while internal request data is only partially initialised, for example while parsing a form-based file upload. Request cleanup may then treat invalid data as valid and attempt to free memory that was never initialised, and that memory may still contain data from earlier allocations controlled by the attacker. The second flaw (CVE-2026-109619) involves stale global state: request-owned internal state can survive after its backing memory has been freed, for example after a fatal error, and a later request handled by the same worker may use that stale state before normal initialisation resets it.
Why This Is a Big Deal
All unsupported branches — PHP 8.1 and older — are affected, though the PHP team has provided minimal source backports for PHP 7.4, 8.0 and 8.1. The fix came early: patch details leaked ahead of the scheduled October 21 disclosure, prompting the team to move the release forward. Technical details are now being discussed publicly and initial proofs of concept have begun to circulate, raising the likelihood that attackers are already exploiting the vulnerabilities. Because many commercial and open-source products use PHP as a backend technology, even systems without a directly exposed PHP installation could be affected — CERT-EU recommends consulting the NCSC-NL php2shell GitHub repository to identify embedded PHP software that may be impacted.
What To Do Now
CERT-EU strongly recommends updating all affected PHP installations as soon as possible; where that is not feasible, organisations should isolate internet-facing applications from public networks until a fix is applied and verified. The official mitigations — setting memory_limit to -1, lowering post_max_size, and enforcing request-size and field-count limits at the proxy level — reduce exposure to specific attack paths, but the PHP team is explicit that they do not make an installation safe.
Source: PHP.net official announcement|CERT-EU Security Advisory 2026-018
