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 versionphp -v
Update
Debian / Ubuntusudo apt update && sudo apt install --only-upgrade "php*"
sudo dnf upgrade "php*"
brew update && brew upgrade php
docker pull php:8.2 docker run --rm php:8.2 php -v
docker pull php:8.3 docker run --rm php:8.3 php -v
docker pull php:8.4 docker run --rm php:8.4 php -v
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.