Skip to content
Pixels for Breakfast

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35: two critical RCE fixes

· Menno-Paul Schreuder

Two PHP bugs allow remote code execution without logging in. What is affected, which versions fix it, and what to do today if you can't update yet.

  • Security
  • Laravel
  • Statamic

On 20 October 2026 the PHP security team announced a release a day in advance, something they rarely do. On 21 October it came out: PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix two vulnerabilities that can let someone run code on your server without logging in. Both are rated 9.2 out of 10 (CVSS v4.0).

If you run a Laravel application or a Statamic site (or anything else built on PHP: Symfony, WordPress, Drupal, Craft CMS), this is about you. The bugs are in PHP itself, not in a framework or a package, so composer update doesn't fix them. The PHP binary on the server has to change.

What's wrong

Both bugs are about what PHP does when a request ends badly.

  • RCE via OOM corruption (CVE-2026-109618 (opens in a new tab)). When PHP runs out of memory, it can stop halfway through setting up a request. The cleanup that follows then treats half-written internal data as valid. An attacker doesn't need your application for this: a crafted file-upload request (multipart form data) can push PHP over its memory limit before any of your code runs.
  • RCE via stale global state (CVE-2026-109619 (opens in a new tab)). After a fatal error, such as running out of memory or hitting the maximum execution time, some internal state can survive into the next request on the same PHP worker, pointing at memory that has already been freed. One request sets it up, a second one uses it.

Neither needs an account, a login or a click from anyone. Exploiting them isn't trivial (the score's "high attack complexity" says as much), but the PHP team demonstrated a working attack over plain HTTP.

Who is at risk

According to the PHP announcement (opens in a new tab): every PHP installation that serves web requests. That includes PHP-FPM (the usual setup behind nginx), Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. The risk is highest with Apache mod_php, where the exploit works before any application code runs. That's still a common setup on shared hosting.

Command-line PHP (cron jobs, queue workers, artisan) isn't the target: the attacks come in through web requests.

What to do

Update PHP. That's the only complete fix, according to both advisories.

  1. Check what the server runs: php -v on the command line, and for the web side, the version your hosting control panel shows or a phpinfo() page you remove right after. They aren't always the same.
  2. Update to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, depending on your branch. Linux distributions and long-term support vendors got the patches in advance, so updated packages should already be there or arrive soon.
  3. Restart PHP-FPM or Apache. A new package on disk changes nothing until the workers restart.
  4. On managed or shared hosting: ask your host when they update, and get a date.

One catch: the volunteer-run rpms.remirepo.net repository, popular on Red Hat-style servers, won't have updates on release day. The PHP team advises switching to your distribution's packages or building from source.

On PHP 8.1 or older

PHP 8.1 and older no longer get updates from the PHP project. Because these bugs are this serious, the PHP team made an exception and published minimal source patches for 7.4 (opens in a new tab), 8.0 (opens in a new tab) and 8.1 (opens in a new tab). That helps if you build PHP yourself. Most sites don't, and depend on their distribution or host for a backport.

Don't count on the next exception. And PHP 8.2 itself reaches end of life on 31 December 2026, so a site on 8.2 is ten weeks away from the same position. For a Laravel application that usually means a framework upgrade first, because recent Laravel versions require a newer PHP.

If you can't update today

The advisories list measures that close specific attack paths. They reduce the risk, they don't remove it. Set them in php.ini, the FPM pool or the Apache configuration, not with ini_set() or a .user.ini, and restart every worker afterwards.

  • session.upload_progress.enabled=0. Blocks the confirmed session path of the second bug. Laravel and Statamic have their own session handling and don't use this PHP feature, so turning it off costs nothing. The advisory suggests leaving it off after patching too.
  • On PHP 8.5: fatal_error_backtraces=0. Blocks the strongest known path of the second bug.
  • A low post_max_size. The PHP team suggests 8M without file uploads and 32M with them, with upload_max_filesize below it. Limit request size at nginx or Apache too, including requests without a Content-Length header.
  • No multipart requests where you don't need them. If an application never accepts uploads or form posts with multipart/form-data, block them at the web server.

The first advisory also mentions memory_limit=-1, an unlimited memory limit, which removes PHP's own out-of-memory error. It's not a complete fix either, and it trades one risk for another: a single runaway request can then take all the server's memory. Only use it together with a container or cgroup memory limit.

What I'd take from this

The update itself is routine. The risk is in everything around it: not knowing which PHP version a site runs, a server nobody restarts, a host without an update date, an application stuck on PHP 8.1 because the framework upgrade never got scheduled. Those are the things to check this week, also for the sites you think are fine.

Sources: PHP.net announcement (opens in a new tab), advisories GHSA-w8hw-w9fx-j79w (opens in a new tab) and GHSA-6wmf-4rv5-p3rp (opens in a new tab).

Search

Nothing found for “”.

Try a broader term, or one of the services below.

Recent searches

Services

All results for “”