New from Wiz Research: Critical NGINX flaw. Understand the risk and impact.
Vulnerability DatabaseCVE-2026-129481

CVE-2026-129481: 
PHP vulnerability analysis and mitigation

Overview

CVE-2026-129481 is a heap use-after-free vulnerability in PHP's session extension, triggered by interrupted session shutdown via a fatal error in a user-defined stream wrapper callback. It affects PHP versions 8.3.0–8.3.36, 8.4.0–8.4.27, and 8.5.0–8.5.12; PHP 8.2 and earlier are not affected. The vulnerability was disclosed on November 19, 2026, and is described as an incomplete fix for CVE-2026-109619. It carries a CVSS v4.0 base score of 9.2 (Critical) (GitHub Advisory).

Technical details

The root cause is classified as CWE-416 (Use After Free) and CWE-459 (Incomplete Cleanup). When a PHP session starts, the session extension records the executing script's filename in an internal global variable. If a fatal error occurs in an application callback during session variable destruction at shutdown — such as in a user-defined stream wrapper's stream_close() method — session shutdown is aborted before the filename pointer is released or cleared. The request heap is subsequently freed while the worker process retains the stale filename pointer; a subsequent request handled by the same worker can then release this dangling pointer, triggering the use-after-free. Exploitation requires OPcache to be disabled (so the filename is allocated in request memory rather than persistent OPcache memory) and that both requests reach the same PHP-FPM worker (GitHub Advisory).

Impact

Successful exploitation can result in memory corruption or a PHP worker process crash, causing denial of service. An attacker who can control session cleanup behavior may also potentially read sensitive memory contents through the heap use-after-free condition. While remote code execution has not been demonstrated through this specific field, the advisory notes it is theoretically possible if memory layout can be controlled. The two requests involved do not need to belong to the same user or session — only the same PHP-FPM worker process (GitHub Advisory).

Exploitability

No public proof-of-concept exploit code is known to exist, and there is no evidence of active in-the-wild exploitation as of the disclosure date (GitHub Advisory). The EPSS score is 0.0, reflecting the current absence of observed exploitation activity. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. Exploitation requires high attack complexity, including the ability to trigger a fatal error in a session cleanup callback and route a follow-up request to the same PHP-FPM worker, with OPcache disabled.

Exploitation steps

  1. Identify target: Locate a PHP application running PHP-FPM with OPcache disabled, using PHP 8.3.x < 8.3.37, 8.4.x < 8.4.28, or 8.5.x < 8.5.13, that allows user-influenced session handling with custom stream wrappers.
  2. Craft malicious session interaction: Send a request that initiates a PHP session and registers a user-defined stream wrapper (e.g., via stream_wrapper_register()) that stores a stream resource in the session. The stream wrapper's stream_close() method must be designed to raise a fatal error during cleanup.
  3. Trigger interrupted shutdown: Submit a request that causes the fatal error in stream_close() during session variable destruction at shutdown, aborting session cleanup before the script filename pointer is released.
  4. Send follow-up request: Send a subsequent request to the same PHP-FPM worker process (without needing the same user or session). This request's session initialization does not reset the stale filename field, and starting or shutting down a session in this request will release the dangling pointer.
  5. Achieve use-after-free: The freed memory region may be reallocated and overwritten, enabling memory corruption, worker crash, or — under controlled memory layout conditions — potential code execution (GitHub Advisory).

Indicators of compromise

  • Logs: PHP-FPM error logs showing fatal errors during session shutdown, particularly originating from stream wrapper stream_close() callbacks; repeated worker crashes or restarts in php-fpm.log.
  • Process: Unexpected PHP-FPM worker process terminations (segmentation faults) logged in system logs (e.g., /var/log/syslog or dmesg) referencing PHP worker PIDs.
  • Network: Unusual patterns of repeated requests to the same PHP-FPM endpoint from different clients or sessions in rapid succession, potentially targeting session-handling endpoints.
  • File System: Presence of custom stream wrapper PHP scripts or session files that register error-triggering stream_close() callbacks, particularly in upload or user-controlled directories (GitHub Advisory).

Mitigation and workarounds

Upgrade PHP to the fixed versions: 8.3.37, 8.4.28, or 8.5.13. The fix clears the recorded session filename and line number during session initialization and terminates the PHP process if a module's request-shutdown handler bails out, preventing reuse of a partially cleaned-up worker. If immediate patching is not possible, set pm.max_requests=1 in PHP-FPM configuration to prevent a worker from handling a second request after a failed cleanup (at a performance cost). Additionally, avoid fatal errors in callbacks reached during session cleanup, and consider disabling or restricting user-defined stream wrappers. Enabling OPcache alone is not a reliable mitigation, as scripts can still execute without being cached (GitHub Advisory).

Community reactions

The vulnerability received broad coverage across the security community following the November 19, 2026 PHP security release. Security outlets including The Hacker News, SecurityWeek, Infosecurity Magazine, and CyberSecurityNews reported on the PHP patch batch, which addressed multiple critical flaws. Patchstack highlighted the implications for WordPress environments, and Checkmarx published analysis noting what is known and unknown about the critical PHP security release. Community discussion was active on Mastodon and developer forums, with practitioners emphasizing the importance of upgrading PHP-FPM deployments promptly (GitHub Advisory).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

php8.2

Fixed

sid

php8.4

Affected

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

Unknown

focal (esm-infra)

php7.4

Unknown

jammy

php8.1

Unknown

noble

php8.3

Unknown

resolute

php8.5

Unknown

trusty (esm-infra-legacy)

php5

Unknown

xenial (esm-infra-legacy)

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

Fixed

RHEL / CentOS

Affected

RHEL 8

Not Affected

RHEL 9

php:8.3/php.src

Affected

RHEL 10

php.src

Affected

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

GHSA-2cfc-5mg3-74jcHIGH8.8
  • PHP logoPHP
  • wallabag/wallabag
NoYesNov 19, 2026
GHSA-gr83-54pj-xch4HIGH8.1
  • PHP logoPHP
  • wallabag/wallabag
NoYesNov 19, 2026
GHSA-rvg4-ph3q-9x5gHIGH7.7
  • PHP logoPHP
  • wallabag/wallabag
NoYesNov 19, 2026
GHSA-52xm-74j7-7j7fHIGH7.6
  • PHP logoPHP
  • wallabag/wallabag
NoYesNov 19, 2026
GHSA-g3gx-p6xp-9gxqMEDIUM5.3
  • PHP logoPHP
  • lcobucci/jwt
NoYesNov 19, 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