Vulnerability DatabaseCVE-2026-129291

CVE-2026-129291: 
PHP vulnerability analysis and mitigation

Overview

CVE-2026-129291 is a use-after-free (UAF) vulnerability in PHP-FPM's worker output capture mechanism that can lead to local privilege escalation. When catch_workers_output is enabled and the epoll event backend is used, the PHP-FPM master process can dispatch an epoll event referencing a freed worker record, allowing a local attacker who can execute PHP code in an FPM worker to crash the master or execute arbitrary commands with its privileges (commonly root). Affected versions include PHP 8.2.7–8.2.35, 8.3.0–8.3.36, 8.4.0–8.4.27, and 8.5.0–8.5.12. It was published on November 19, 2026, with a CVSS v4.0 base score of 8.8 (High) (GitHub Advisory).

Technical details

The vulnerability is classified as CWE-416 (Use After Free) and was introduced in the delayed-cleanup path added in PHP 8.1.20 and 8.2.7. When catch_workers_output is enabled, the FPM master monitors worker stdout/stderr pipes via epoll, with event structures embedded in worker records. When a worker exits and fpm_child_close() drains output pipes, if a helper process holds the pipe's write end open, the read returns EAGAIN instead of EOF; the master then closes the pipe's read descriptor without removing its epoll event or invalidating the stored descriptor number, deferring cleanup by one second. An attacker can stop a newly forked sibling worker after it drops to the pool user but before it closes inherited descriptors, keeping the original pipe and epoll watch alive; the delayed cleanup then operates on a reused descriptor number, and a subsequent write to the old pipe causes epoll to return a pointer into freed memory, which is passed to fpm_event_fire(). The demonstrated exploit uses the stale output callback to corrupt the allocator's free list and replace the callback with an arbitrary command, with Curl and OPcache used for memory address resolution (though not required to trigger the UAF) (GitHub Advisory).

Impact

Successful exploitation allows a local attacker executing PHP code in an unprivileged FPM worker to escalate privileges to those of the FPM master process, which commonly runs as root, achieving full system compromise including arbitrary command execution, access to all data on the host, and complete loss of confidentiality, integrity, and availability. In containerized environments (such as the official PHP-FPM Docker images, which enable catch_workers_output by default), exploitation grants the master's container privileges but does not by itself constitute a container escape. Even without full exploitation, the underlying descriptor-lifetime bug can close another worker's reused descriptor, disrupt logging or request handling, cause repeated worker respawns, or crash the master process (GitHub Advisory).

Exploitability

As of the disclosure date (November 19, 2026), there is no public proof-of-concept exploit and no evidence of in-the-wild exploitation. The EPSS score is 0.0, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires several preconditions: local code execution in an FPM worker, catch_workers_output enabled in the pool configuration, the epoll event backend, and the ability to manipulate worker lifetimes and retain inherited pipe descriptors. The exploit is also dependent on memory layout and process timing, increasing complexity. Root command execution was reproduced internally against unmodified PHP 8.5.12 Docker images on Linux arm64 and x86-64 (GitHub Advisory).

Exploitation steps

  1. Gain code execution in an FPM worker: Obtain the ability to execute PHP code within an FPM worker process (e.g., via a web application vulnerability or legitimate low-privileged access to a PHP application running under the target pool).
  2. Verify preconditions: Confirm that catch_workers_output is enabled in the pool configuration (default in official PHP-FPM Docker images) and that the epoll event backend is active (default on Linux).
  3. Fork a sibling worker and stop it at the right moment: From the malicious PHP worker, trigger the forking of a new sibling worker process. After the sibling drops to the pool user but before it closes inherited file descriptors, send it a SIGSTOP signal to freeze it in place.
  4. Keep the original pipe and epoll watch alive: The stopped sibling retains the original pipe's write end and the epoll descriptor, preventing EOF from being delivered to the master and keeping the original epoll watch active after the master closes its own descriptors.
  5. Trigger the deferred cleanup race: Allow the master's one-second deferred cleanup to fire. Because the sibling holds the pipe open, the master's descriptor is closed and the file descriptor number is reused by another resource, but the epoll event still references the freed worker record.
  6. Write to the old pipe to trigger the UAF: Write data to the original pipe (via the stopped sibling or another mechanism), causing epoll to return an event with a pointer into the freed worker record.
  7. Corrupt memory and hijack control flow: Use the stale output callback to write through the freed logging buffer, corrupt the allocator's free list (leveraging Curl and OPcache for memory address resolution), and overwrite the event callback pointer with the address of a chosen function.
  8. Execute arbitrary commands as root: The master calls fpm_event_fire() with the corrupted pointer, invoking the attacker-controlled callback and executing arbitrary commands with the FPM master's privileges (commonly root) (GitHub Advisory).

Indicators of compromise

  • Process: Unexpected child processes spawned by the PHP-FPM master (e.g., /bin/sh, bash, curl, wget) with the master's UID (often root); FPM worker processes in a stopped (T) state for extended periods (indicating deliberate SIGSTOP).
  • Logs: PHP-FPM error logs showing repeated worker respawns, descriptor-related errors, or fpm_event_fire() crashes; unusual EAGAIN patterns on worker output pipes in FPM debug logs.
  • File System: New files or scripts created in world-writable directories or the web root by the FPM master's UID; unexpected modifications to system binaries or cron jobs owned by root.
  • Network: Outbound connections from the PHP-FPM master process to unexpected external IPs (indicating reverse shell or data exfiltration post-exploitation).
  • System: Sudden PHP-FPM master crashes or core dumps in /var/crash or the FPM working directory; unexpected epoll_ctl or close syscall errors in strace output from the master process (GitHub Advisory).

Mitigation and workarounds

Upgrade PHP to the fixed versions: 8.2.36, 8.3.37, 8.4.28, or 8.5.13 depending on your deployed branch. The fix unregisters each stdio epoll event while its original descriptor is still valid, closes the descriptor, and sets the stored descriptor to -1 to prevent delayed cleanup from acting on it again. As an immediate workaround, disable catch_workers_output in all affected pool configurations (set catch_workers_output = no), which eliminates the attack surface entirely. Running the FPM master as an unprivileged user limits the impact of exploitation but does not fix the underlying UAF. Disabling Curl or OPcache only removes parts of the demonstrated exploit chain and should not be treated as a complete mitigation (GitHub Advisory).

Community reactions

The vulnerability received broad coverage from the security community shortly after its November 19, 2026 disclosure. Security news outlets including BleepingComputer, Infosecurity Magazine, CyberSecurityNews, and SecurityOnline.info covered the release as part of a larger PHP security update fixing 18 flaws. WordPress and Joomla ecosystem blogs (Patchstack, MySites.guru) highlighted the impact on PHP-FPM Docker deployments. Mattias Geniar published a dedicated security release summary, and HeroDevs added it to their vulnerability directory. Tenable flagged it in their plugin pipeline. Community sentiment emphasized the elevated risk for users of official PHP-FPM Docker images, where catch_workers_output is enabled by default (GitHub Advisory).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

php8.2: 8.2.36-1~deb12u1

Fixed

sid

php8.4: 8.4.28-2

Fixed

trixie

php8.4: 8.4.28-1~deb13u1

Fixed

Ubuntu

Fixed

bionic (esm-infra)

php7.2: 7.2.24-0ubuntu0.18.04.17+esm15

Fixed

devel

php8.5

Affected

focal (esm-infra)

php7.4: 7.4.3-4ubuntu2.29+esm6

Fixed

jammy

php8.1: 8.1.2-1ubuntu2.29

Fixed

noble

php8.3: 8.3.6-0ubuntu0.24.04.14

Fixed

resolute

php8.5: 8.5.4-0ubuntu1.6

Fixed

trusty (esm-infra-legacy)

php5: 5.5.9+dfsg-1ubuntu4.29+esm19

Fixed

xenial (esm-infra-legacy)

php7.0: 7.0.33-0ubuntu0.16.04.16+esm23

Fixed

RHEL / CentOS

Fixed

RHEL 8

php:7.4/php.src

Affected

RHEL 9

:appstream:php-0:8.2-9080020261120141350.9.src

Fixed

RHEL 10

php8.4-0:8.4.28-1.el10_2.src

Fixed

Alpine

Fixed

edge

php83: 8.3.37-r0, 8.5.13-r0

Fixed

Source: This report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-104883HIGH7.2
  • PHP logoPHP
  • contao/core-bundle
NoYesNov 20, 2026
GHSA-vw9g-2c4c-g767MEDIUM6.8
  • PHP logoPHP
  • livewire/livewire
NoYesNov 21, 2026
CVE-2026-104882MEDIUM6.5
  • PHP logoPHP
  • cpe:2.3:a:contao:contao
NoYesNov 20, 2026
GHSA-2g6w-c7gx-fxj8MEDIUM5.4
  • PHP logoPHP
  • guzzlehttp/guzzle
NoYesNov 21, 2026
CVE-2026-104884MEDIUM5.4
  • PHP logoPHP
  • composer://contao/contao
NoYesNov 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management