CVE-2026-129291: PHP-FPM master uses a freed worker record, letting a PHP script escalate to root

ByLinuxtastic

November 30, 2026 #CVE, #PHP

PHP-FPM’s master process, which usually runs as root, can be made to use a worker record after it has been freed. The trigger is a pool with catch_workers_output = yes on the epoll event backend, the default on Linux: when the master closes a worker’s output pipe it leaves the pipe’s epoll registration in place, the delayed cleanup frees the worker record while that registration is still live, and a later event is dispatched through a pointer into freed memory. Anyone who can run PHP code inside a worker of that pool can crash the master or run code with its privileges. The setting is off by default and on in the official PHP-FPM Docker images. Upgrade PHP to 8.5.13, 8.4.28, 8.3.37 or 8.2.36 (or your distribution’s patched package) and restart PHP-FPM; where you cannot yet, set catch_workers_output = no in every pool and reload. PHP running under Apache’s module, or as plain CGI, is not affected.

CVE-2026-129291 at a glance.

ComponentPHP-FPM, the FastCGI process manager (sapi/fpm), the master’s handling of worker stdio pipes under the epoll backend when catch_workers_output is on; Debian and Ubuntu php8.x-fpm, Red Hat php-fpm, the official php:*-fpm Docker images
Affected versionsPHP 8.2.7 to 8.2.35, 8.3.0 to 8.3.36, 8.4.0 to 8.4.27 and 8.5.0 to 8.5.12, plus the end-of-life 8.1.20 to 8.1.34 (the record; the delayed-cleanup path arrived in 8.1.20 and 8.2.7). Red Hat also shipped errata for its 7.4 and 8.0 streams
Fixed inPHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36, the 19 November 2026 security releases (the fix unregisters each stdio event while its descriptor is still valid, closes it, and records the descriptor as closed); no fix for 8.1. Distribution packages below
SeverityPHP Group CVSS 4.0 8.8 High (AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H): local, high complexity, needs the setting, full impact on the host. Red Hat Important, 7.0 (CVSS 3.1, AV:L/AC:H/PR:L, CWE-825); SUSE important, 7.4 (CVSS 4.0 8.8). NVD Awaiting Analysis. CWE-416, use after free
Exploited in the wildNot on CISA’s Known Exploited Vulnerabilities list as of 30 November 2026; CISA’s SSVC says no known exploitation, not automatable, total technical impact. EPSS 0.0139 (73rd percentile) on 26 November 2026
Who is exposedPHP-FPM hosts where a pool has catch_workers_output = yes and the master runs as root (the usual setup), and where someone who can get PHP code into that pool is not fully trusted: shared hosting, a site with a file-upload or template-injection weakness, any container built from the official php:*-fpm image, which turns the setting on. The attacker is already executing PHP as the pool user; this bug is the step from there to root. Pools with the setting off, Apache mod_php, and the CLI are not affected
PublishedCVE record and GHSA-jm4m-qfqx-967m 19 November 2026 (credit Thomas Chauchefoin, with Ian P. Christian, Nora Dossche and Jakub Zelenka); this page built 30 November 2026, last updated 30 November 2026

What it is

PHP-FPM is one master and many workers. With catch_workers_output = yes, the master keeps a pipe to each worker’s stdout and stderr and copies what the worker prints into the FPM log, which is why the official Docker images enable it: it is how a container’s PHP warnings reach docker logs. The master watches those pipes through its event backend, and on Linux that is epoll. The record describes the slip: when a worker goes away, fpm_child_close() closes the pipe but does not remove the pipe’s epoll registration, and because the worker record’s cleanup is deferred, the record is freed while epoll still points at it. The next event on that registration is dispatched through the stale pointer, into memory that may by then hold something else.

That is a use-after-free in a root process, reachable by the one kind of attacker PHP-FPM always has: code running inside a worker. A worker controls when it exits and what it writes to its pipes, so it controls when the event fires and can shape the heap in between; the record says the outcome ranges from crashing the master to executing code with the master’s privileges, “commonly root”. The fix in the four November releases unregisters each stdio event while its file descriptor is still valid, closes the descriptor, and stores -1 so nothing can touch it afterwards.

The advisory is careful about what does and does not help. Turning catch_workers_output off removes the pipes and the bug with them, at the cost of worker output going nowhere unless the worker logs elsewhere. Running the master as a non-root user limits what the attacker gains but “does not correct the use-after-free”. Disabling OPcache or curl, which some hardening guides suggest for heap-shaping bugs, “should not be treated as a complete mitigation”. Red Hat and SUSE score it 7.0 and 7.4 with high complexity because the attacker must already be running PHP in the pool and must win a race against the master’s cleanup; the PHP Group’s 8.8 reflects what a win is worth.

Who is affected on Linux

Each row is what the distribution’s own security tracker said on 30 November 2026; the link in the row is the tracker page, which will be newer than this one.

DistributionStatusFixed package
Debian bookworm, trixie, forky, sidFixed in bookworm-security (DLA-4916-1) and trixie-security (DSA-6641-1), forky and sidbookworm php8.2 8.2.36-1~deb12u1, trixie php8.4 8.4.28-1~deb13u1, forky and sid php8.4 8.4.28-3; the plain bookworm 8.2.32-1~deb12u1 and trixie 8.4.27-1~deb13u1 builds are vulnerable, so take the security update
Ubuntu 20.04 to 26.04Tracker unreachable on 30 November 2026Ubuntu’s CVE page was rate-limited and then refused automated readers when this page was built; the 19 November PHP batch went out as USN-9185-1 on the sibling pages, so start there, but confirm this CVE on the tracker link
RHEL 7 ELS, 8, 9, 10 (and rebuilds)Important (7.0), fixed by errata of 20 to 25 NovemberRHEL 10 php8.4-8.4.28-1.el10_3 (RHSA-2026:100821) and php-8.3.37-1.el10_3 (RHSA-2026:102300); RHEL 9 php:8.4, php:8.3, php:8.2 streams (RHSA-2026:102255, 102226, 102261) and php-8.0.30-8.el9_9.2 (RHSA-2026:102297); RHEL 8 php:8.2 (RHSA-2026:101276) and php:7.4 (RHSA-2026:100991); EUS, E4S, AUS and TUS streams and RHEL 7 ELS php-5.4.16-48.el7_9.2 (RHSA-2026:101337) likewise; RHEL 6 out of support
SUSE SLE 15 SP4 to SP7, openSUSE Leap 15.ximportant, under analysis; packages listedphp8 8.3.37-150700.3.27.1 for SLE 15 SP7, php8 8.2.36-150600.3.46.1 for 15 SP6-LTSS, php8 8.0.30-150400.4.83.1 and php7 7.4.33-150400.4.84.1 for the 15 SP4/SP5 LTSS products (from the part of the page that was readable; SUSE bug 1290692)
Fedora, Arch, AlpineNot consultedAlpine’s tracker refused automated readers; Fedora and Arch not read for this page; all three track upstream, so 8.4.28 / 8.3.37 and later are the builds to look for
Official php:*-fpm Docker images, source builds, third-party repositoriesAffected below the fixed releases, and the images ship with the setting onimages built from 8.5.13, 8.4.28, 8.3.37 or 8.2.36; rebuild or re-pull, since a running container keeps the PHP it started with

How to check

Three questions: is the PHP-FPM build an affected one, is catch_workers_output on in any pool, and does the master run as root. The second clears most distribution installs, whose pools ship with the setting off.

# 1. the build: affected 8.2.7..8.2.35, 8.3.0..8.3.36, 8.4.0..8.4.27, 8.5.0..8.5.12 (and all 8.1.20..8.1.34)
php-fpm -v 2>/dev/null | head -1; ls /usr/sbin/php-fpm* 2>/dev/null
dpkg -l 'php*-fpm' 2>/dev/null | grep '^ii' | awk '{print $2, $3}'   # Debian / Ubuntu
rpm -q php-fpm php8.4-fpm 2>/dev/null                                  # RHEL family / SUSE

# 2. the setting: any pool with catch_workers_output = yes is the vulnerable configuration
grep -rniE '^\s*catch_workers_output\s*=' /etc/php/*/fpm/pool.d/ /etc/php-fpm.d/ /etc/php8*/fpm/ /usr/local/etc/php-fpm.d/ 2>/dev/null
# the event backend (epoll is the Linux default; the bug is in the epoll path)
grep -rniE '^\s*events\.mechanism' /etc/php/*/fpm/php-fpm.conf /etc/php-fpm.conf /usr/local/etc/php-fpm.conf 2>/dev/null || echo "events.mechanism not set: epoll on Linux"

# 3. who the master runs as (root is the usual answer, and the privilege the bug hands over)
ps -o pid,user,args -C php-fpm 2>/dev/null | grep -i master
# containers from the official image carry the setting in zz-docker.conf or docker-php-fpm config
docker ps --format '{{.Names}} {{.Image}}' 2>/dev/null | grep -i fpm

A fixed build means you are done. An affected build whose pools all have the setting off, or unset (the default is no), is a patching chore: the pipes the bug needs do not exist. An affected build with the setting on, a root master and PHP code you do not fully trust in that pool is the vulnerable configuration, and every container built from the official FPM image is in that state unless you overrode it.

How to fix it

Upgrade and restart PHP-FPM; the master is the process with the bug, so a reload is not enough, it must be the master that is replaced. Containers need a new image, not a package update inside the running one.

# Debian / Ubuntu (DLA-4916-1, DSA-6641-1)
apt update && apt install --only-upgrade 'php8.*-fpm' 'php8.*-common'
systemctl restart php8.4-fpm      # or php8.3-fpm / php8.2-fpm, whichever runs
# RHEL family (RHSA-2026:100821 and the per-stream errata) / SUSE
dnf update php php-fpm php8.4-fpm; systemctl restart php-fpm
zypper patch; systemctl restart php-fpm
php-fpm -v | head -1              # must show 8.5.13 / 8.4.28 / 8.3.37 / 8.2.36 or later
# containers: pull the 19 November images and recreate
docker pull php:8.4-fpm && docker compose up -d --force-recreate

If you cannot upgrade yet, turn the setting off in every pool and reload; the advisory names this as the temporary workaround. Worker output then stops reaching the FPM log, so point the application’s logging at a file or syslog first if you rely on it. Two things not to do, both from the advisory: do not count a non-root master as the fix, because it limits the prize without removing the bug, and do not treat disabling OPcache or curl as a mitigation.

# mitigation: catch_workers_output = no in every pool, then reload
sed -i -E 's/^\s*catch_workers_output\s*=\s*yes/catch_workers_output = no/' /etc/php/*/fpm/pool.d/*.conf /etc/php-fpm.d/*.conf 2>/dev/null
php-fpm -t 2>/dev/null || php-fpm8.4 -t
systemctl reload php8.4-fpm 2>/dev/null || systemctl reload php-fpm
grep -rniE '^\s*catch_workers_output\s*=\s*yes' /etc/php/*/fpm/pool.d/ /etc/php-fpm.d/ 2>/dev/null || echo "no pool still catches worker output"

Sources

  • CVE-2026-129291 at CVE.org — the PHP Group CNA record (19 November 2026): the epoll description, CVSS 4.0 8.8, CWE-416, the affected ranges and the credits
  • GHSA-jm4m-qfqx-967m — the PHP security advisory: patched versions, the workaround, what does not count as a mitigation, and the shape of the fix
  • PHP 8 ChangeLog — the FPM line naming this CVE in the 19 November 2026 releases
  • NVD entry — Awaiting Analysis; CVSS 4.0 8.8 from the PHP Group, CPE ranges per branch
  • Distribution trackers: Debian (DLA-4916-1, DSA-6641-1) · Ubuntu (unreachable on 30 November) · Red Hat (Important, 7.0, CWE-825, errata 20 to 25 November) · SUSE
  • EPSS score for this CVE, 26 November 2026

Related reading

This advisory page was assembled from the primary sources listed above on 30 November 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.