Source. This article is based on PHP security advisory: Critical remote code execution vulnerabilities, update now (21 Oct 2026). Details were checked against it on November 13, 2026; check the source for later changes.
On 21 October 2026 the PHP project published a security advisory for two critical vulnerabilities, CVE-2026-109618 (GHSA-w8hw-w9fx-j79w) and CVE-2026-109619 (GHSA-6wmf-4rv5-p3rp). The advisory says either can allow unauthenticated remote code execution. It lists the fixed releases as PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. The PHP 8 ChangeLog dates those releases 22 October 2026, while the news posts are dated 21 October, so use the advisory date for your records. Our own PHP 8.2 end-of-life article only mentions 8.2.35 in passing; this one covers the vulnerabilities themselves.
All the details below come from the PHP security advisory announcement and the PHP 8 ChangeLog. We have not tested the patches or the workarounds ourselves, and where the advisory is silent we say so.
What the two vulnerabilities are
The advisory describes them in short form. We recommend reading the linked GHSA pages for the technical detail.
- CVE-2026-109618: out-of-memory handling can interrupt PHP while internal request data is only partly initialised, and request cleanup may then treat that invalid data as valid.
- CVE-2026-109619: request-owned internal state can survive after the memory behind it has been freed. A later request handled by the same worker may use that stale state before normal initialisation resets it.
The advisory says all PHP installations serving web requests are at risk, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. It rates the risk highest for mod_php, where it reports a demonstrated exploit in which an unauthenticated request triggers the attack before any application code runs. It also states there are no complete mitigations and that updating is the only safe choice.
Who is affected and how to tell
If you run PHP to serve web requests, assume you are affected until the runtime reports one of the fixed versions or a patched vendor build. Check every runtime separately, since the CLI and the web SAPI often differ on one machine.
php -v
php-fpm -v
apache2ctl -M | grep php # shows whether mod_php is loaded
The fixed upstream versions are:
- PHP 8.5: 8.5.12 or later
- PHP 8.4: 8.4.27 or later
- PHP 8.3: 8.3.36 or later
- PHP 8.2: 8.2.35 or later
Distribution packages often keep an older version number and add fixes as backports, so a lower number is not proof you are vulnerable. The advisory notes that Linux distributions and LTS vendors received the patches in advance and tells you to check your vendor for updated packages. Look at your package changelog for the CVE identifiers.
apt changelog php8.3-fpm | grep -i "CVE-2026-10961" # Debian/Ubuntu
rpm -q --changelog php-fpm | grep -i "CVE-2026-10961" # RHEL family
If the grep finds nothing, ask your vendor whether the fix is included. Do not assume it is.
The fix
Update to a fixed release on your branch, or install your vendor's patched package, then restart every PHP process so the new binary is actually in use.
- Update the package or rebuild your container image from a base that contains 8.5.12, 8.4.27, 8.3.36 or 8.2.35 (or a vendor build that lists the CVEs).
- Restart PHP-FPM, Apache or whichever server hosts PHP. A package upgrade does not always restart long-lived workers.
- Confirm the version from the web SAPI, not only the CLI (see the check below).
sudo systemctl restart php8.3-fpm # adjust to your service name
php -v
If you are on PHP 8.1 or older
The advisory says PHP 8.1 and older no longer receive updates from the PHP project. It points to two options: ask your distribution or LTS vendor whether they ship a backported fix, or upgrade to a supported version. It also says the PHP security team provided minimal source backports for PHP 7.4, 8.0 and 8.1 for people who build from source or have no LTS vendor. That is a stopgap for teams that cannot upgrade in a day. It does not make an unsupported branch maintained.
This is where a legacy system gets expensive. An application on PHP 7.4 or 8.0 cannot just take the 8.4 package. Removed functions, changed warnings and old dependencies get in the way, and we cover those in our PHP 5.6/7 to 8 upgrade guide and the post on running old and new PHP side by side, which helps when you must move an application in stages.
If you cannot update right now
The advisory is explicit that these measures reduce exposure to specific attack paths and do not make an installation safe. It lists them as follows.
For CVE-2026-109618 (out-of-memory path)
- Set
memory_limit=-1, preferably where applications cannot override it, such asphp_admin_valuein the FPM pool or Apache configuration. Check that no pool, directory or application setting puts a finite limit back. The advisory warns an underlying allocation failure can still reach the vulnerable path. - Set a low
post_max_size: 8M if the application needs no file uploads, 32M if it does, and keepupload_max_filesizebelow it. - Consider enforcing limits at the web server or proxy for decoded request size, input field count, multipart part count, header count and nesting depth, including requests without a usable Content-Length.
- Use a container or cgroup limit as an availability boundary, ideally one that kills only the affected worker. The advisory says not to use RLIMIT_AS or RLIMIT_DATA, since these can cause the vulnerable allocation failure.
; FPM pool example (per the advisory's guidance on php_admin_value)
php_admin_value[memory_limit] = -1
php_admin_value[post_max_size] = 8M
For CVE-2026-109619 (stale global state)
- Set
session.upload_progress.enabled=0and restart every worker. Apply it in php.ini, the FPM pool or server configuration, which take effect before request parsing. The advisory says not to rely onini_set()or FPM.user.ini. It blocks the confirmed session paths but not other variants. - On PHP 8.5, set
fatal_error_backtraces=0and restart every worker. This blocks the confirmed fatal backtrace path only. - Remove invalid or deprecated settings applied per request that emit diagnostics before initialisation. Hiding diagnostics with
error_reporting,display_errorsor@does not help, per the advisory. - Fix attacker-reachable fatal errors and execution timeouts, including failures in callbacks, upload or import processing and cleanup.
Treat all of this as temporary. The advisory describes these as partial measures, so plan the real update for the same day if you can.
How to confirm the fix
Confirm the runtime that serves requests, not just the shell. After the restart, check the version from the SAPI itself, for example with a temporary script behind authentication that prints PHP_VERSION, and delete it afterwards. For distribution builds, confirm the package changelog lists CVE-2026-109618 and CVE-2026-109619. Then check that no old PHP container image or CI runner is still deployed anywhere. Also grep your pool and server configuration to make sure a finite memory limit was not reintroduced after you applied the workaround.
The ChangeLog entry for each fixed release reads "Avoid state corruption via bailout" and cites both GHSA identifiers, which is a quick way to confirm you are reading the right release notes.
When this points to a bigger legacy problem
A critical runtime flaw is a stress test for how you run PHP. If patching means finding out which servers exist, which build each one runs and whether the application tolerates a newer version, the risk was there before this advisory. Teams stuck on unsupported branches depend on vendor backports or hand-built patches, and every new PHP advisory repeats that cost. We help with that through legacy PHP modernisation: inventory every runtime, add tests around the risky code and move the application to a supported branch in stages. Our security audit write-up shows what we look at first.
Frequently asked questions
Which PHP versions fix CVE-2026-109618 and CVE-2026-109619?
Per the PHP advisory, PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP 8.1 and older get no upstream updates; check your distribution or LTS vendor.
Is there a workaround if I cannot update PHP immediately?
The advisory lists partial measures, such as memory_limit=-1, a low post_max_size and session.upload_progress.enabled=0. It states they reduce exposure but do not make an installation safe.
Does my WordPress or Laravel site need its own update?
WordPress stated no WordPress update is required or planned for these issues, since they are in PHP itself. The fix is a PHP update, from your host or your own server.
Running PHP you cannot patch quickly?
We inventory your PHP runtimes, then move the application to a supported version in stages.
See our Legacy PHP Modernisation Services