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

CVE-2026-129182: 
PHP vulnerability analysis and mitigation

Overview

CVE-2026-129182 is a use-after-free vulnerability in PHP 8.5 involving the repopulation of the last_fatal_error_backtrace global after executor shutdown. It affects PHP versions 8.5.0 through 8.5.12 (fixed in 8.5.13). The flaw was disclosed on November 19, 2026, via a GitHub Security Advisory. It carries a CVSS v4.0 base score of 9.2 (Critical) (GitHub Advisory).

Technical details

The root cause is a use-after-free (CWE-416) combined with incomplete cleanup (CWE-459) in PHP's fatal error backtrace handling. During request shutdown, PHP restores modified INI settings; if a fatal error occurs at this stage — triggered by conflicting max_memory_limit or zlib.output_compression/output_handler settings — the last_fatal_error_backtrace global is repopulated after the executor has already been torn down. The request heap is subsequently freed, but a diagnostic emitted early in a later request handled by the same PHP-FPM or mod_php worker can access the now-stale backtrace pointer, causing a heap use-after-free. Exploitation requires specific per-path INI configuration (e.g., max_memory_limit overrides or zlib.output_compression + output_handler via .user.ini) and an early diagnostic trigger in a subsequent request (via Apache per-directory config or FastCGI PHP_VALUE/PHP_ADMIN_VALUE parameters). This vulnerability is a follow-on to CVE-2026-109619 (GHSA-6wmf-4rv5-p3rp), which addressed a related but narrower scenario (GitHub Advisory).

Impact

Successful exploitation can result in memory corruption, PHP-FPM or mod_php worker crashes (availability impact), and potentially full remote code execution (RCE), though RCE through the specific identified entry points has not yet been demonstrated. An unauthenticated attacker could also read sensitive data from freed memory regions, exposing confidential server-side information. The integrity of the affected worker process is also at risk due to heap corruption (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 specific server-side configuration conditions (per-path INI overrides and an early diagnostic trigger), which limits the attack surface compared to fully unauthenticated, configuration-agnostic vulnerabilities (GitHub Advisory).

Exploitation steps

  1. Reconnaissance: Identify servers running PHP 8.5.0–8.5.12 with PHP-FPM or mod_php, particularly those with per-path INI configuration (e.g., .user.ini files or Apache <Directory> blocks).
  2. Trigger INI conflict at shutdown: Craft or leverage an application path where .user.ini sets zlib.output_compression=0 and output_handler=ob_gzhandler while the global config has zlib.output_compression=1, or where a path-specific max_memory_limit is lower than the global value and memory usage exceeds it at shutdown.
  3. Cause fatal error during INI restoration: Send a request to the targeted path that causes PHP to consume enough memory (or trigger the zlib conflict) so that restoring the global INI settings during shutdown raises a fatal error, repopulating last_fatal_error_backtrace after executor cleanup.
  4. Trigger early diagnostic in subsequent request: Send a follow-up request to the same worker (same PHP-FPM process or mod_php thread) that causes a diagnostic to be emitted before executor initialization — achievable via Apache per-directory config or by sending a PHP_VALUE/PHP_ADMIN_VALUE FastCGI parameter from a controlled or compromised frontend.
  5. Achieve use-after-free: The early diagnostic accesses the stale backtrace pointer in freed heap memory, causing memory corruption. Depending on heap layout, this may allow reading sensitive data or achieving code execution (GitHub Advisory).

Indicators of compromise

  • Logs: PHP error logs showing fatal errors during INI restoration at shutdown (e.g., messages referencing max_memory_limit exceeded or zlib/output_handler conflicts); repeated worker crash/restart events in PHP-FPM logs ([pool www] child ... exited on signal 11 (SIGSEGV)).
  • Process: Unexpected PHP-FPM worker crashes or restarts, particularly correlated with requests to paths using .user.ini with zlib.output_compression or output_handler overrides.
  • Network: Unusual or repeated FastCGI requests containing PHP_VALUE or PHP_ADMIN_VALUE parameters from the frontend proxy, especially those setting INI values that conflict with global configuration.
  • File System: Presence of .user.ini files in web-accessible directories containing zlib.output_compression, output_handler, or max_memory_limit directives that differ from global PHP configuration.

Mitigation and workarounds

Upgrade to PHP 8.5.13 or later, which contains the fix that prevents PHP from creating or consuming the fatal-error backtrace while the executor is inactive. As an immediate workaround, set fatal_error_backtraces=0 in php.ini and restart all PHP-FPM or mod_php workers; ensure that request-specific configuration (e.g., .user.ini) cannot re-enable this setting. Administrators should also audit per-path INI configurations for conflicting zlib.output_compression/output_handler or max_memory_limit overrides to reduce the attack surface (GitHub Advisory).

Community reactions

The vulnerability received broad coverage from security media outlets including The Hacker News, SecurityWeek, Infosecurity Magazine, and CyberSecurityNews, all noting PHP's November 2026 security release patching multiple critical flaws. Checkmarx published analysis noting the significance of the release. Community discussion on Mastodon (infosec.exchange) and developer blogs (ma.ttias.be, dev.to) highlighted the complexity of the exploitation preconditions. Patchstack flagged the release as relevant to WordPress hosting environments due to PHP-FPM usage (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

Fixed

trixie

php8.4

Fixed

Ubuntu

Unknown

bionic (esm-infra)

php7.2

Unknown

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

Unknown

RHEL / CentOS

Affected

RHEL 8

Not Affected

RHEL 9

Not Affected

RHEL 10

Not Affected

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