← All articles

PHP vulnerability fixes two critical remote code flaws

PHP vulnerability fixes two critical remote code flaws

The PHP vulnerability alert covers two critical flaws that can let an unauthenticated attacker remotely run code on a web server. PHP has released fixes in versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Sites using WordPress, Drupal, Magento, Joomla, Laravel or any other PHP application are exposed when the underlying PHP installation remains vulnerable.

The flaws, CVE-2026-109618 and CVE-2026-109619, both received a Critical rating of 9.2 under CVSS v4.0, a standard scale for assessing vulnerability severity. They affect PHP itself rather than a particular content management system or application. According to PHP, every installation serving web requests may be at risk, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. PHP-FPM is a system that keeps PHP processes ready to handle web requests, while mod_php runs PHP directly inside the Apache web server. PHP considers mod_php the highest-risk configuration because a malicious request can trigger the vulnerability before the website's own application code starts.

CVE-2026-109618 concerns out-of-memory handling. If PHP runs short of available memory at the wrong moment, processing can stop while internal request information is only partly prepared. Cleanup code may then mistake invalid information for valid data. CVE-2026-109619 concerns stale internal state: information belonging to one request can remain after its memory has been freed, allowing a later request handled by the same PHP worker process to use it before normal setup replaces it.

Wiz Research, which reported the flaws to PHP, says at least one issue affects every PHP version back to 5.4. Its researchers demonstrated unauthenticated remote code execution against the latest WordPress, Drupal and Joomla container images. A container image is a packaged software environment used to run an application consistently. They also exploited a simple Hello World application and showed that PHP worker memory could be read without first achieving code execution. That memory may hold passwords, access tokens and API keys. Wiz says PHP's correction addresses the underlying fault and other variants of the attack.

Details leaked on 20 October 2026, before the planned coordinated disclosure, and the issue became known as PHP2Shell. watchTowr had confirmed that the flaws were genuine before the fixes appeared. Patchstack said hosting partners reported multiple active exploitation incidents at 07:34 UTC on 21 October. Cloudflare reported early attacks at 07:43 UTC and deployed initial Web Application Firewall rules, which filter suspicious web requests, for known exploit methods. At 13:52 UTC, PHP published the four corrected releases. Five minutes later, Patchstack said its telemetry showed probing but no hard evidence of breaches at that point, while warning that exploitation was expected to increase as technical details became public.

Several organisations temporarily removed services from the internet while waiting for the update. Dutch broadcaster NOS reported outages affecting DigiD, MijnOverheid, the Dutch House of Representatives' website, Tweakers and the Dutch National Cyber Security Centre's own site. ITmedia reported emergency maintenance involving Japanese services including Kodmon, Shadowverse: Worlds Beyond and Sakura Rental Server, with BASE and Xserver expected to follow. The SEO Framework's developers also took their servers offline. CERT-EU issued an advisory, while the UK's National Cyber Security Centre urged immediate updates.

Linux distributions and long-term support vendors received advance patches, so administrators should install the corrected package supplied for their platform. The volunteer-maintained rpms.remirepo.net repository was not expected to publish updates on release day; PHP advised affected users to move to distribution packages or compile PHP from source. PHP 8.1 and older no longer receive project updates, although several maintainers have backported the corrections. As of 22 October, Sury packages covered end-of-life branches from PHP 5.6 through 8.1, and Ubuntu 22.04 had fixed its PHP 8.1 package in php8.1 8.1.2-1ubuntu2.28. Ubuntu Pro covered releases 14.04 through 20.04, with its Legacy add-on required for 14.04 and 16.04.

Freexian ELTS offered paid coverage for PHP 7.0 on Debian 9, PHP 7.3 on Debian 10 and PHP 7.4 on Debian 11. Debian's own long-term support for Debian 11 ended on 31 August 2026, although Sury's php7.4 package provided a free route. AlmaLinux released packages for PHP streams on versions 8, 9 and 10, including end-of-life streams, but did not guarantee later fixes. Red Hat supplied fixes for php:7.4 on RHEL 8 and PHP 8.0 on RHEL 9, while retired streams including 7.2 and 8.1 on RHEL 9 received none. Remi provided fixes for 7.4, 8.0 and 8.1 on RHEL 8 and 9, but not 7.2 or 7.3.

CloudLinux released corrected EasyApache 4 ea-php packages from ea-php52 through ea-php85 for cPanel. TuxCare ELS was rolling out fixes by branch, and Zend said its long-term support builds of 7.2, 7.3, 7.4 and 8.1 were patched when released. The official Docker php image receives no correction for PHP 8.1 or older. PHP also published last-resort backports for 7.4, 8.0 and 8.1, but described them as minimal mitigation rather than restored support. They disable session upload progress regardless of php.ini and add no hard memory limit.

Package version numbers alone may not always reveal whether the update is present. On Ubuntu and older Sury branches, administrators should inspect the changelog for both CVE identifiers. Debian and newer Sury packages may simply state that a new upstream release was installed, so the version must be compared with the corrected release. RHEL 8.2 and 8.3 stream changelogs may only say rebase; PHP advises using dnf updateinfo. Where no vendor fix exists, the recommended course is moving to a supported PHP release. PHP 8.2 receives security corrections only until 31 December 2026 and PHP 8.3 until 31 December 2027, so PHP recommends aiming for 8.4 or 8.5.

Only installing a corrected release fully resolves the PHP vulnerability. Temporary measures for CVE-2026-109618 include enforcing memory_limit=-1 where applications cannot override it, reducing post_max_size to 8M without file uploads or 32M with uploads, and keeping upload_max_filesize lower. Web servers or proxies can also restrict total request size, field count and multipart parts. A container or cgroup resource boundary may limit disruption, preferably by terminating only the affected worker. PHP warns against RLIMIT_AS and RLIMIT_DATA because they can cause the allocation failure that reaches the vulnerable path.

For CVE-2026-109619, administrators can set session.upload_progress.enabled=0 in php.ini, an FPM pool or server configuration, then restart every worker. On PHP 8.5, setting fatal_error_backtraces=0 and restarting workers blocks the confirmed fatal-backtrace path. These steps do not cover every variant.

Also available in: DeutschItalianoShqip