PHP security update: the October 2026 fixed versions
By Flavio
Updated
Tagged: PHP
PHP released security fixes on October 21, 2026. The fixed release for each branch, how to update, and temporary mitigations if you can't patch yet.
If you run a PHP website, update PHP to the fixed release for your branch.
The fixes are available. PHP released its security update on October 21, 2026. Install the patched release for your branch:
| PHP branch | Fixed release |
|---|---|
| PHP 8.2 | 8.2.35 |
| PHP 8.3 | 8.3.36 |
| PHP 8.4 | 8.4.27 |
| PHP 8.5 | 8.5.12 |
Your Linux distribution may backport the fixes without bumping to these exact upstream version numbers. Check its security advisory and package revision.
This is about the PHP runtime itself, underneath your application. Updating WordPress plugins or running composer update won’t fix it.
What’s happening?
The vulnerabilities, CVE-2026-109618 and CVE-2026-109619, can let an attacker run code on your server without logging in. Both carry a CVSS v4.0 score of 9.2 out of 10.
PHP’s warning covers installations serving web requests, including PHP-FPM, Apache’s PHP module, CGI, FrankenPHP, and LiteSpeed. Some confirmed exploit paths run before application code, so a login screen or a framework maintenance page doesn’t protect the runtime.
The PHP Foundation confirmed that remote code execution was demonstrated before application code on mod_php with default settings, and through application-level code paths on PHP-FPM.
If you run Laravel, WordPress, Drupal, or another PHP application, check the PHP installation serving it, including old sites and admin tools you rarely open.
The core issue
A PHP worker stays up and handles many requests. When a request hits a fatal error, including running out of memory, PHP doesn’t return from the function it was in; it jumps straight out with longjmp(). PHP calls that jump a bailout.
The jump skips cleanup for the work in progress. The request’s internal data can be left half-built, or the worker can still hold a pointer into memory that request already freed. Shutdown, or the next request on that same worker, then treats the leftover memory as real data. That’s how an attacker can get the worker to run their code.
The changelog line for the fix is “Avoid state corruption via bailout.” The two CVE numbers are two ways into it.
Out of memory
CVE-2026-109618 is the case where the jump happens while PHP is still setting the request up. Shutdown then reads that unfinished memory. On Apache with mod_php, a demonstrated case hits this before any of your application code runs.
The patched releases store the out-of-memory error and raise it at the next safe point in the virtual machine, once the normal memory_limit is crossed. A second, higher limit kills the process with _exit() and skips that cleanup.
Leftover pointers
CVE-2026-109619 is the pointer left behind. The worker keeps global fields for errors, sessions, and similar state, and those fields point into the current request’s memory. A bailout can free that memory and leave the fields in place, letting the next request on the same worker use them before normal startup replaces them. The patch clears that state when the request ends.
Why the fix took time
According to the Foundation, early signs of the out-of-memory issue showed up in 2024. Compatibility concerns, limited resources, and disagreement on the right fix slowed things down until remote code execution reports made it the team’s top security priority in August 2026. The team is now changing how it handles these decisions so similar issues get resolved faster.
Leaked CVE IDs pushed PHP to move the release up from October 22 to October 21. When the update went out, the security team hadn’t found a working exploit in the public PoCs it checked, which only speaks to those early samples. Treat unpatched servers as exposed and update right away. The Foundation’s account has the full disclosure timeline and funding details.
If you use Laravel Cloud, Forge, or Vapor
Laravel shared what it’s doing across its platforms. Check Laravel’s latest status updates to make sure your apps got the patch:
| Platform | What you need to do |
|---|---|
| Laravel Cloud | Patched automatically, with no manual steps needed. Check Laravel’s status updates to verify the rollout finished for your apps. |
| Laravel Forge | Update your server’s PHP version manually in the Forge dashboard as soon as the patched package shows up. Laravel says to power down the server if you can’t update it yet. |
| Laravel Vapor | PHP 8 apps are redeployed automatically. If you’re still on PHP 7, upgrade to PHP 8. Check that your latest deployment has the fix. |
On Forge, Laravel shared the exact dashboard path: open your server, go to Runtime → Versions, click the three-dot menu, and pick the update option for your PHP version.
If you manage the server yourself
Check your distribution or PHP package provider’s security advisory and install its fixed packages. If you deploy containers, rebuild with a patched PHP base image and replace the running containers. Static builds like FrankenPHP bundle their own PHP runtime, so updating the system’s PHP package won’t update that binary.
Restart any PHP services and long-running workers so they pick up the updated runtime. Then test the site and check which PHP version is serving web requests, since php -v only checks your CLI binary.
If you use shared or managed hosting, ask your provider whether the fix has been applied to your site’s PHP runtime. Check each site if your account uses several PHP versions.
PHP currently supports branches 8.2 through 8.5. PHP 8.1 and older are end of life upstream, though your Linux distribution may still maintain its own packages (as Ubuntu does for PHP 8.1 below). As a one-off, the PHP security team published minimal source backports for 7.4, 8.0, and 8.1, but they aren’t ready-made packages and don’t bring those branches back under regular support. Ask your vendor about a maintained fix or upgrade to a supported branch.
Ubuntu and Debian fixes are available
Ubuntu’s security notice USN-8948-1 lists these fixed package revisions:
| Ubuntu release | Fixed PHP package revision |
|---|---|
| 22.04 LTS | 8.1.2-1ubuntu2.28 |
| 24.04 LTS | 8.3.6-0ubuntu0.24.04.13 |
| 26.04 LTS | 8.5.4-0ubuntu1.5 |
| 26.10 | 8.5.9-0ubuntu2.1 |
Those numbers apply to Ubuntu’s official packages. If you’re using a third-party PHP repo, check that provider’s advisory and fixed revisions instead.
An older upstream version number can still include the fix. Because Ubuntu backports patches, compare the full package revision against the notice. Ubuntu 22.04’s patched PHP 8.1 package is a good example of distribution maintenance continuing after upstream support ends.
Debian’s trackers for CVE-2026-109618 and CVE-2026-109619 list these fixed security packages:
| Debian release | Fixed PHP package revision |
|---|---|
| Debian 12 (Bookworm) | 8.2.35-1~deb12u1 |
| Debian 13 (Trixie) | 8.4.27-1~deb13u1 |
Install the security updates for your release, restart any services using PHP, and verify the running site as described above.
If you use Cloudflare
Cloudflare rolled out PHP-specific WAF rules, including on Free plans. Free users get them automatically; on paid plans, make sure the Cloudflare Managed Ruleset is set to Block mode.
Cloudflare is already seeing live attack attempts, including payloads tweaked to get past its filters. So far that’s reported as active probing rather than confirmed break-ins, which is still more than enough reason to patch fast.
Some of the new rules look at both the incoming request and your origin’s response, blocking a match before it gets back to the attacker. That means PHP may have already processed the request by the time Cloudflare catches it.
Keep the WAF on while you patch, and make sure attackers can’t hit your origin directly to bypass Cloudflare. Update PHP even with these rules turned on. Cloudflare’s announcement includes rule IDs and instructions for reviewing matched traffic under Security → Security Analytics → Events. The php2shell card on Cloudflare Zero Wire has the short version of this update, including the agent prompt for checking the runtime serving requests.
Temporary mitigations if you can’t update yet
Mattias Geniar’s mitigation guide walks through practical config workarounds and where they fall short, and PHP has published its own guidance too. These measures only cut down exposure to specific attack paths. Updating PHP is the real fix.
If you can install a patched package right now, do that first.
Disable session upload progress
The stale-state advisory recommends turning off session upload progress to block the confirmed session paths. Add this to the config used by your web-serving PHP runtime:
session.upload_progress.enabled = 0
On PHP 8.5, disable fatal error backtraces too:
fatal_error_backtraces = 0
Put these in php.ini, your FPM pool config, or server config applied before request parsing. Restart every PHP worker and verify the effective settings. Calling ini_set() in application code or using FPM .user.ini runs too late to help.
These settings still leave other paths open. Clean up any obsolete or invalid per-request PHP settings that generate warnings, too. Hiding those warnings with display_errors or error_reporting doesn’t fix the underlying problem.
Reduce the request and memory attack surface
The out-of-memory advisory recommends blocking multipart requests at the frontend when your app doesn’t need them. That has to happen before PHP parses the body. Check your forms first, though, because blocking multipart can break legitimate requests like file uploads.
As a partial workaround, PHP also suggests setting memory_limit=-1 at the server level so user code can’t override it. Removing PHP’s per-request memory cap lets a single request consume the server’s memory. A container or cgroup limit can keep the whole box from running dry, though it may kill multiple workers and still won’t eliminate every vulnerable allocation failure. Don’t substitute RLIMIT_AS or RLIMIT_DATA, which can trigger that failure.
Keep request limits conservative and enforce decoded body size at the frontend too. PHP’s guidance suggests post_max_size=8M without uploads, or 32M with uploads, keeping upload_max_filesize below it. A small post_max_size alone doesn’t cover every parsing path.
Don’t copy memory-limit changes into production without checking what they do to your app and host. The linked advisory has the full config details and caveats.
Take the site offline safely if you cannot patch
CERT-EU recommends isolating the server if you can’t patch right away.
Mattias points out an easy trap here: removing the PHP handler can make a web server serve your PHP source as plain text, potentially leaking secrets. Block access, stop the web server, or return a static maintenance response without passing requests to PHP, then check the result from outside.
Keep these temporary protections in place until the updated runtime is live and you’ve checked the site. Then review your temporary settings: put a sensible PHP memory cap back if you removed it, and test your uploads before lifting a multipart block. If you suspect a break-in, isolate the server and preserve the logs, because patching PHP won’t remove files or changes an attacker may already have left behind.
The PHP release is one example of a larger shift. I wrote about security in the age of AI after this.
Want me to talk about your product? You can sponsor this site.