Skip to main content

Overview

The PHP security team has released PHP 8.5.13, 8.4.28, 8.3.37, and 8.2.36. These releases fix seven critical vulnerabilities, each rated 9.2 under CVSS v4.0, along with four high-severity vulnerabilities. Several of the critical vulnerabilities can lead to remote code execution. Most of these vulnerabilities are only exploitable under specific configurations, but some of them affect default PHP setups. We recommend updating every PHP version on every server.
Laravel Forge’s automatic security updates do not patch PHP. Forge installs PHP from a dedicated package repository, and Ubuntu’s unattended upgrades only apply updates from Ubuntu’s own security repository. You must update PHP on each of your servers yourself, using one of the options below.

Affected PHP versions

PHP 8.1 and earlier have reached end of life, so the PHP team did not publish new releases for them. Instead, Ondřej Surý backported the fixes to these versions as new package revisions. The PHP version number stays the same, so php -v reports the same version before and after the update. To confirm that one of these versions is patched, check that the installed package revision matches the table above, or is newer:
These backports are a stopgap rather than a long-term fix, as end-of-life PHP versions do not receive regular security updates. If any of your sites still run PHP 8.1 or earlier, we strongly recommend installing a supported PHP version and switching your sites to it.

Vulnerabilities

Critical

High severity

  • A local privilege escalation in PHP-FPM.
  • A PHAR signature verification bypass.
  • URLs with a mixed-case scheme, such as HTTPS://, being sent in plaintext.
  • A denial of service through folded HTTP headers.

Where Forge installs PHP from

Forge installs PHP from Ondřej Surý’s PHP packages. The package source depends on your server’s Ubuntu version: Patched packages usually reach these repositories shortly after the upstream release, but they may not be available the moment PHP publishes the release. For this release, packages for Ubuntu 22.04 and 24.04 took several hours to reach the ppa.setup-php.com mirror.

Patch status by Ubuntu version

Patched PHP packages are published separately for each Ubuntu version and processor architecture, so availability depends on your server: To check your server’s architecture, run:
We will update this page as soon as the remaining ARM packages are available. Until then, updating an affected PHP version on an ARM server completes without installing the fix. If your server runs Ubuntu 20.04 or earlier, these versions have reached end of life and will not receive a fix, so we recommend creating a new server on a supported Ubuntu version and migrating your sites to it.

Checking your exposure

The steps below help you understand how exposed your servers are before you patch. They do not replace the update: every server running PHP 8.2 or later should be updated, regardless of these results.

FastCGI connection reuse

The PHP-FPM request smuggling vulnerability (CVE-2026-129289) is fully exploitable when Nginx keeps FastCGI connections open between requests. Check whether any of your Nginx configuration files enable this option:
If the command returns a line containing fastcgi_keep_conn on;, remove that line from the site’s Nginx configuration file and update PHP as soon as possible. If you use Nginx templates, remove the line from those templates as well so that new sites do not inherit it.

Session upload progress

The session serializer mismatch (CVE-2026-115560) requires session.upload_progress to be enabled. PHP installations created by Forge since October 31, 2026 disable this option by default, but older installations may still have it enabled. Check every installed PHP version with:

Exception arguments

The magic method backtrace vulnerability (CVE-2026-129474) only affects PHP 8.5 when zend.exception_ignore_args is set to Off. Check the PHP-FPM configuration with:

What you need to do

Step 1: Check your current PHP version

SSH into your server and run the following command. It checks every PHP version installed on the server and prints the version used by both the CLI and PHP-FPM, along with the installed package version:
The output looks similar to the following:
Make a note of the versions displayed so that you can verify the upgrade afterward.

Step 2: Update PHP

You may update PHP from the Forge dashboard or manually via SSH. We recommend the Forge dashboard because it also repairs the server’s PHP package source before upgrading. Check the Patch status by Ubuntu version table first, as fixed packages are not yet available for every Ubuntu version and architecture. If the update does not install the fixed version listed in the Affected PHP versions table, the fixed package is not available for your server yet: wait a little while and try again.
Updating PHP restarts the PHP-FPM service for that version. Sites running that version may experience a few seconds of downtime, so you may want to update during a period of low traffic.
  1. Navigate to your server in the Forge dashboard and open Runtime > PHP.
  2. Click the … menu next to the PHP version you want to patch.
  3. Click Update PHP X.X and confirm the update.
Repeat these steps for every PHP version installed on the server, including versions that your sites do not currently use. These steps are the same on Ubuntu 22.04, 24.04 and 26.04.If you manage many servers, you may also trigger the update through the Forge API rather than the dashboard.
To patch many servers at once, you may create a Recipe that runs as root and contains the manual commands above, then run it against all of your servers.

Step 3: Restart long-running PHP processes

The package upgrade restarts PHP-FPM. However, long-running PHP processes started from the CLI keep running the old version of PHP until they are restarted. These include queue workers, Laravel Horizon, Laravel Octane, Laravel Reverb, and any other background processes you have configured. Restart these processes after updating PHP. For example, you may run the following in each affected Laravel application:
If PHP-FPM did not restart automatically, you may restart it from your server’s dashboard by opening the actions dropdown and selecting Restart PHP X.X.

Step 4: Verify the fix is active

Run the command from Step 1 again. For PHP 8.2 and later, confirm that the CLI and FPM versions match the fixed versions in the Affected PHP versions table. For PHP 8.1 and earlier, the version number does not change, so confirm that the package version matches the package revision in the same table, or is newer.

More information

For the official release announcement, see the PHP news archive at https://www.php.net/archive/2026.php. To learn more about managing PHP on your servers, see the PHP documentation.