ThinkFacility Sign in
  1. Home
  2. Security
  3. PHP
CriticalPHP

PHP 8.2 to 8.5: security releases fix remote code execution flaws, update now

Anyone running a PHP site or app, whether through PHP-FPM, Apache with mod_php or php-cgi.

How to fix it

You haveUpdate to
< 8.2.36→8.2.36< 8.3.37→8.3.37< 8.4.28→8.4.28< 8.5.13→8.5.13

Check your version

Your PHP version
php -v

Update

Debian / Ubuntu
sudo apt update && sudo apt install --only-upgrade "php*"
Fedora / RHEL
sudo dnf upgrade "php*"
macOS (Homebrew)
brew update && brew upgrade php
Docker · 8.2
docker pull php:8.2
docker run --rm php:8.2 php -v
Docker · 8.3
docker pull php:8.3
docker run --rm php:8.3 php -v
Docker · 8.4
docker pull php:8.4
docker run --rm php:8.4 php -v
Docker · 8.5
docker pull php:8.5
docker run --rm php:8.5 php -v

The session serializer flaw (CVE-2026-115560) hits every branch here; the magic method backtrace flaw (CVE-2026-129474) is in 8.5 only. The 8.5.13 changelog lists more fixes, including PHP-FPM, SOAP and Phar bugs.

Debian and Ubuntu patch their own packages and keep their own version numbers, so after an apt update the version may still read lower than the fixed one. Check your distribution's security notice for the package version that has the fix.

Sources