Critical PHP update (21 Oct 2026) First fixed upstream releases: 8.6.0, 8.5.13, 8.4.28, 8.3.37, 8.2.36. What to do now New (23 Oct): CVE-2026-115560

Guide · Nginx administrators

Nginx + PHP-FPM

Page last updated: Data verified:

Contents

Why the topology matters#

With Nginx, PHP runs in separate PHP-FPM processes. A server may have several FPM masters (one per PHP version) and many pools (one per site or user). If you upgrade one version and a site uses another, that site remains vulnerable.

Calif reports that its PHP-FPM demo ran behind Nginx. The FPM attack paths require a second request to the same worker, which survives after the error.

1. Which socket/pool serves each site#

Read-only: changes nothing

# Where Nginx sends PHP requests
sudo grep -RnE 'fastcgi_pass|server_name' /etc/nginx/ | grep -v '#'

# Which pools listen on which sockets/ports
sudo grep -RnE '^\s*(\[|listen\s*=)' /etc/php/*/fpm/pool.d/ /etc/php-fpm.d/ /etc/opt/remi/*/php-fpm.d/ 2>/dev/null

# Running FPM masters and the configuration file of each
ps -eo pid,args | grep '[p]hp-fpm: master'

2. Upgrade#

Follow the guide for your distribution: Debian/Ubuntu or RHEL/AlmaLinux/Rocky.

3. Restart FPM#

Restart: possible brief service interruption

# Debian/Ubuntu (one service per version)
sudo systemctl restart php8.3-fpm
# RHEL-based
sudo systemctl restart php-fpm

restart interrupts requests being served at that moment. After a package upgrade, prefer a full restart so the new binary is definitely loaded, and check it with step 5. Nginx does not need restarting for the PHP fix.

4. Limits in Nginx (temporary exposure reduction)#

Changes packages or configuration: back up and test first

The PHP project recommends limits at the web server/proxy, especially for requests without a usable Content-Length. In Nginx, client_max_body_size also applies to chunked bodies. See the details and side effects under temporary mitigations.

http {
    client_max_body_size 8m;          # adjust to your actual uploads
    large_client_header_buffers 4 8k;
}
sudo nginx -t && sudo systemctl reload nginx

Also check that fastcgi_request_buffering has not been disabled (the default is on). This way Nginx receives the whole body and enforces the limit before passing it to PHP.

5. Verify#

Read-only: changes nothing

# No FPM worker with a deleted (old) binary
for p in $(pgrep -f php-fpm); do ls -l /proc/$p/exe 2>/dev/null; done | grep deleted

# Version of the FPM binary
php-fpm8.3 -v 2>/dev/null || php-fpm -v

Finally, check via the web for each site (step 5).

Main source: PHP project · php-src (GitHub) · Calif