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

CVE-2026-129474: 
PHP vulnerability analysis and mitigation

Overview

CVE-2026-129474 is a use-after-free vulnerability in PHP's magic method backtrace handling that can lead to remote code execution. It affects PHP versions 8.5.0 through 8.5.12 (fixed in 8.5.13), and was disclosed on November 19, 2026 via a GitHub Security Advisory. The flaw occurs when PHP collects arguments for methods handled by __call() or __callStatic() during backtrace generation, potentially reading stale values referencing freed memory. 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) in PHP's backtrace collection logic. Before PHP enters a magic method (__call() or __callStatic()), it briefly represents the requested method as a separate call frame; a backtrace taken during this interval can collect stale values from an earlier call that reference already-freed memory. Exploitation requires two non-default-safe conditions to be simultaneously active: fatal_error_backtraces=1 (the PHP 8.5 default) and zend.exception_ignore_args=0 (the PHP built-in default, but overridden by php.ini-production). The demonstrated attack vector involves submitting a crafted, oversized JSON body to an endpoint that processes it and logs via a magic static method, causing a memory_limit fatal error at the precise moment the magic method call is being entered — a behavior enabled by delayed allocation-failure handling introduced in PHP 8.5.12. Successful exploitation also requires knowledge of usable memory addresses to bypass ASLR for reliable code execution (GitHub Advisory).

Impact

Successful exploitation allows an unauthenticated remote attacker to execute arbitrary code with the privileges of the PHP worker process, resulting in full compromise of confidentiality, integrity, and availability of the affected system. Less sophisticated attempts can crash the PHP worker process (denial of service) or produce ordinary resource-limit errors. Potentially affected application patterns include Laravel facades and Magento guest shipping estimation endpoints, though full exploitation of complete framework installations has not been publicly demonstrated (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 (GitHub Advisory). The EPSS score is 0.0, reflecting the absence of observed exploitation activity at time of publication (Feedly). Exploitation complexity is high, requiring specific configuration conditions, control over memory allocation via request data, a reachable magic method call path, and knowledge of memory addresses to achieve reliable code execution rather than a crash. The vulnerability is not listed in the CISA KEV catalog at this time.

Exploitation steps

  1. Reconnaissance: Identify PHP 8.5.0–8.5.12 deployments running with fatal_error_backtraces=1 (default) and zend.exception_ignore_args=0 (built-in default). Target applications using __call() or __callStatic() magic methods in request-handling paths, such as Laravel facade-based logging or Magento guest endpoints.
  2. Identify a suitable endpoint: Find an application endpoint that accepts large, attacker-controlled request bodies (e.g., JSON import endpoints) and processes them through a code path that invokes a magic method — particularly one that also performs logging or other operations that trigger __callStatic().
  3. Craft the malicious request: Size the request body precisely so that constructing a logging argument (or similar operation) causes PHP to cross the memory_limit threshold exactly while the magic method call frame is being entered, triggering a fatal error at the vulnerable interval.
  4. Trigger the use-after-free: The fatal error causes PHP to collect a backtrace including arguments; because zend.exception_ignore_args=0, PHP reads stale values from the freed call frame, which may contain attacker-influenced bytes from reused memory.
  5. Achieve memory corruption or code execution: With knowledge of memory layout (e.g., via information leaks or heap grooming), craft the request data so that the freed memory contains a controlled value that redirects execution — achieving RCE as the PHP worker process user. Without address knowledge, the outcome is typically a worker crash (GitHub Advisory).

Indicators of compromise

  • Network: Unusually large HTTP POST requests (near or exceeding memory_limit) to endpoints known to use magic method dispatch (e.g., logging facades, API import endpoints); repeated requests from the same source with varying body sizes suggesting heap-grooming attempts.
  • Logs: PHP error logs showing Fatal error: Allowed memory size exhausted coinciding with magic method invocations (__call or __callStatic); PHP-FPM logs showing unexpected worker process crashes or restarts (SIGABRT, SIGSEGV) correlated with specific request patterns.
  • Process: PHP worker processes terminating abnormally (segmentation faults) without corresponding application-level exceptions; unexpected child processes spawned by the PHP-FPM worker (e.g., shells, network utilities) if code execution is achieved.
  • File System: Unexpected files written to web-accessible directories or /tmp by the PHP worker user; new cron entries or SSH authorized keys added under the web server account (GitHub Advisory).

Mitigation and workarounds

The primary remediation is upgrading to PHP 8.5.13 or later, which contains the fix (GitHub Advisory). For immediate workarounds prior to upgrading, set zend.exception_ignore_args=1 in the php.ini configuration used by affected PHP workers (including FPM pool configs) and restart them — note that changing only the CLI configuration is insufficient. Alternatively, setting fatal_error_backtraces=0 on PHP 8.5+ also blocks this attack path. Administrators using php.ini-production as their base configuration are already protected, as it sets zend.exception_ignore_args=1 by default. Additionally, enforcing request-size limits and avoiding expensive processing or logging of untrusted request bodies can reduce exposure, but these are not complete substitutes for the configuration fix or upgrade.

Community reactions

The vulnerability received broad coverage across the security community upon disclosure on November 19, 2026, with outlets including BleepingComputer, SecurityWeek, The Hacker News, and Infosecurity Magazine reporting on the PHP 8.5.13 release fixing multiple critical flaws (BleepingComputer, SecurityWeek, The Hacker News). Checkmarx published analysis noting the complexity of exploitation and the configuration-dependent nature of the attack (Checkmarx). OX Security contextualized the flaw within a broader wave of PHP critical vulnerabilities in 2026 (OX Security). Patchstack highlighted implications for WordPress hosting environments (Patchstack).

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

Fixed

bionic (esm-infra)

php7.2

Not Affected

devel

php8.5

Affected

focal (esm-infra)

php7.4

Not Affected

jammy

php8.1

Not Affected

noble

php8.3

Not Affected

resolute

php8.5: 8.5.4-0ubuntu1.6

Fixed

trusty (esm-infra-legacy)

php5

Not Affected

xenial (esm-infra-legacy)

php7.0

Not Affected

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-hg3m-q4fj-ggmqCRITICAL9.3
  • PHP logoPHP
  • wallabag/wallabag
NoNoNov 20, 2026
CVE-2026-63012MEDIUM6.5
  • PHP logoPHP
  • baserproject/baser-core
NoYesNov 19, 2026
GHSA-crpp-mf59-rhpqMEDIUMN/A
  • PHP logoPHP
  • api-platform/core
NoYesNov 20, 2026
GHSA-9wh3-m3m5-jffxMEDIUMN/A
  • PHP logoPHP
  • nowo-tech/transaction-doctrine
NoYesNov 20, 2026
GHSA-65w2-9r4h-848gMEDIUMN/A
  • PHP logoPHP
  • nowo-tech/transaction-doctrine
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