Skip to main content
Published on November 22, 2026
CVE-2026-129291 — PHP-FPM, CVSS v4.0 8.8. An attacker who already runs PHP code in a PHP-FPM worker can gain the privileges of the master process, often root, when the pool captures worker output (catch_workers_output). Fixed in PHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36, released on November 19, 2026. The official php:*-fpm Docker images turn that setting on: update, or turn it off in the meantime.

The bug in two sentences

With catch_workers_output on and the epoll backend, the PHP-FPM master can close a worker’s output pipe without removing the matching epoll event, then free that worker’s record. A later event on the old pipe goes through a pointer into freed memory: the master calls a stale callback. This is a use-after-free (CWE-416). The attacker must already run PHP code in a worker, control worker lifetimes and keep inherited pipe descriptors open. The payoff: moving from the pool user, such as www-data, to the master’s privileges. The researcher who reported the flaw got root command execution from a www-data worker on unmodified official PHP 8.5.12 Docker images (x86-64 and arm64). According to the PHP advisory, the exploit depends on memory layout and timing. The flaw can also crash the master, disrupt logging or requests, and make workers respawn over and over. Affected versions:
  • PHP 8.1.20 through 8.1.34, with no upstream fix;
  • PHP 8.2.7 through 8.2.35, fixed in 8.2.36;
  • PHP 8.3.0 through 8.3.36, fixed in 8.3.37;
  • PHP 8.4.0 through 8.4.27, fixed in 8.4.28;
  • PHP 8.5.0 through 8.5.12, fixed in 8.5.13.
The faulty code came in with PHP 8.1.20 and 8.2.7, as part of the fix for bug GH-10461. The PHP project scores the flaw 8.8 in CVSS 4.0 (AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H); NVD carries the same score. Red Hat rates it “Important” with 7.0 in CVSS 3.1, Ubuntu medium priority. The full advisory is GHSA-jm4m-qfqx-967m.
According to the CISA assessment shown by NVD, no exploitation is reported and the attack is not automatable. The flaw is a second-stage bug: paired with code execution in a worker, such as the one in PHP-FPM (CVE-2026-129289), fixed by the same release, it leads all the way to the master’s privileges.

Sizing your exposure

The question to ask: does any of your PHP-FPM pools have catch_workers_output turned on? The default is no. On Linux, PHP-FPM picks epoll by default, so the second precondition is almost always met. Look for the setting in your pool configuration:
A catch_workers_output = yes line marks an affected pool. A line commented out with ; is inactive. Then check which user runs the master:
In a container built on the official image, the setting lives in /usr/local/etc/php-fpm.d/docker.conf:
In a container, the attacker gets the master’s privileges inside that container. According to the PHP advisory, that alone does not give them a container escape.

Updating PHP, distro by distro

The real fix is a PHP package update followed by a restart of PHP-FPM: a master that is already running keeps the old code. Take a snapshot of your VPS first.

Debian

These are the same advisories as for CVE-2026-129289: one update covers both flaws.

Ubuntu

Don’t rely on the version printed by php -v alone. Debian and Ubuntu backport the fix: Ubuntu 24.04 still reports PHP 8.3.6 once patched. Only the full package version, compared with your distribution’s advisory, is the reference.

RHEL and AlmaLinux

Red Hat shipped its fixes between November 20 and 22, 2026: As of November 22, 2026, the base php package of RHEL 9, its php:8.2, php:8.3 and php:8.4 streams, and the php:8.2 stream of RHEL 8 are still marked “Affected” with no erratum: follow the Red Hat CVE page. For AlmaLinux, watch errata.almalinux.org.
Until the package lands, apply the mitigation below.

Docker containers

Rebuild your images on a fixed php:*-fpm base image (8.2.36, 8.3.37, 8.4.28 or 8.5.13), then redeploy. Check the version inside:

Turning off catch_workers_output until you can update

If you can’t update right away, the PHP team recommends turning off catch_workers_output in the affected pools. Without it, worker stdout and stderr go to /dev/null: whatever your scripts write to stderr no longer shows up in the PHP-FPM log.

On a VPS

In each affected pool, replace the line with:
Test the configuration, then restart:

In an official Docker image

Add a step to your Dockerfile that rewrites the setting in docker.conf:
Rebuild the image and redeploy the container.
Running the PHP-FPM master as a non-root user narrows the privileges gained, but does not fix the use-after-free. Turning off curl or OPcache only removes pieces of the demonstrated exploit. None of these replaces the update.

Checking the mitigation

If you turned the setting off, run the grep from “Sizing your exposure” again: no catch_workers_output = yes line should remain, on the VPS or in the container.

Turning catch_workers_output back on after the update

Once PHP is fixed and PHP-FPM restarted, you can bring capture back if you read worker output in the PHP-FPM log:
In a Docker image, just drop the sed step and rebuild on the fixed base image.

What next?

Turning off catch_workers_output is only a stopgap: the target remains your distribution’s fixed PHP package, or a rebuilt Docker image. The same PHP release fixes the critical PHP-FPM flaw (CVE-2026-129289): check both in a single pass. Turn on automatic security updates and go through the Linux VPS security tips. For any technical question, open a ticket from your OnetSolutions customer area.