Summary
The PHP project has released fixes for two critical remote code execution vulnerabilities in PHP core, CVE-2026-109618 and CVE-2026-109619, collectively referred to as PHP2Shell. Both are rated CVSS 9.2. A working exploit has already shown that a single unauthenticated web request can trigger the attack, before any application code runs.
Every PHP installation that serves web requests is at risk, whatever the application, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. Installations using Apache with mod_php face the highest risk.
Fixed releases were published on 21 October 2026: 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP 8.1 and older are end of life and receive no official release.
This advisory replaces the pre-release notice GARNET CSIRT issued earlier on 21 October 2026, before the fixed versions were known.
Impact
Exploitability signals: CVSS 9.2 for both vulnerabilities · working exploit demonstrated · unauthenticated, single request, no application code involved · details circulated publicly before the fix · mass exploitation widely expected.
CVE-2026-109618 is a memory corruption flaw in out-of-memory handling. If PHP runs out of memory while request data is only partly initialized, request cleanup can treat the invalid data as valid, leading to code execution.
CVE-2026-109619 is a stale state flaw. Internal state belonging to one request can survive after its memory has been freed, and a later request handled by the same worker can use it before it is reset. Confirmed attack paths include the session upload progress feature and, on PHP 8.5, fatal error backtraces.
Successful exploitation gives an attacker code execution on the web server under the account that runs PHP. Because the attack does not depend on the application, every PHP service is in scope: learning management systems, journal platforms, institutional websites, webmail, federation identity providers, and network monitoring tools. A compromised PHP host typically exposes application databases, stored credentials, and a foothold into the wider campus network.
Affected systems
All PHP installations serving web requests, on versions earlier than the fixed releases below:
- PHP 8.5 fixed in 8.5.12
- PHP 8.4 fixed in 8.4.27
- PHP 8.3 fixed in 8.3.36
- PHP 8.2 fixed in 8.2.35 (PHP 8.2 itself reaches end of life on 31 December 2026)
- PHP 8.1, 8.0 and 7.4 have no official release. The PHP project has published minimal source backports for these branches, linked from its advisory. Some Linux distributions and LTS vendors also ship backported fixes.
- PHP 7.3 and older have no fix of any kind. Upgrade to a supported branch.
Linux distributions received the patches before public release, so updated packages should be available or arriving shortly. Check with your distribution. The volunteer-run Remi repository (rpms.remirepo.net) did not have updates on release day. Hosts using it should switch to distribution packages or build from source.
Temporary mitigations
These are partial measures for hosts that cannot be updated straight away. Set them in php.ini, the FPM pool or the web server configuration, not with ini_set() or .user.ini, and restart every PHP worker afterwards.
- Set
session.upload_progress.enabled=0. This blocks the confirmed session path for CVE-2026-109619. - On PHP 8.5, set
fatal_error_backtraces=0. This blocks the confirmed backtrace path for CVE-2026-109619. - Set
memory_limit=-1, preferably throughphp_admin_valueso applications cannot restore a finite limit. This reduces exposure to CVE-2026-109618. - Keep
post_max_sizelow (8M if uploads are not needed, 32M if they are), keepupload_max_filesizebelow it, and enforce request size and field count limits at the web server or reverse proxy. - Use a container or cgroup memory limit as an availability safeguard. Do not use
RLIMIT_ASorRLIMIT_DATA, which can trigger the vulnerable code path.
Action
-
Update PHP now to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or install your distribution’s patched package. Restart every PHP process afterwards (PHP-FPM pools, Apache, LiteSpeed, FrankenPHP), because running workers keep the vulnerable code in memory until they restart.
-
Find every PHP host, including forgotten ones. Common examples in our community include Moodle, Open Journal Systems (OJS), WordPress, Joomla, Drupal, SimpleSAMLphp, Roundcube, Nextcloud, phpMyAdmin, LimeSurvey, GLPI, osTicket, and monitoring frontends such as Zabbix, LibreNMS, Cacti and phpIPAM. Check appliances and vendor products that bundle their own PHP too.
-
Deal with end of life versions. Hosts on PHP 8.1, 8.0 or 7.4 should apply a distribution or vendor backport if one exists, or the PHP project’s source backport. Hosts on anything older must be upgraded to a supported branch. Any host that cannot be fixed quickly should be taken offline or restricted to trusted networks until it is.
-
Apply the temporary mitigations below only where you cannot update immediately. They reduce exposure but do not fully fix either vulnerability.
-
Restrict access while you patch. Limit administrative and internal-only PHP applications to the campus network or VPN.
-
Remove PHP from hosts that do not need it.
-
Watch for advisories from PHP application projects such as Moodle, WordPress, Joomla, Drupal and SimpleSAMLphp, and from hosting providers for externally hosted sites.
-
Report suspected compromise. Signs include web server or PHP-FPM processes spawning shells, unexpected PHP workers crashing repeatedly, and unexpected files appearing in web or temporary directories. Report these to GARNET CSIRT so we can correlate activity across the constituency.
This advisory is published with a detached PGP signature against the CSIRT key. Confirm it is genuine and unmodified before acting:
Downloads: source .md · signature .md.asc · public key. Check the fingerprint (684C7B7DA77E4F1B68AED3ECE84B541C6184CC6F) on the PGP page — if gpg reports a “Good signature” from that key, this advisory is authentic.
Think a system in the community is affected or compromised?Report an incident