CVE-2026-129474: Remote Code Execution in PHP 8.5 Magic-Method Backtraces
- Vendor
- PHP Group
CVE-2026-129474 is a use-after-free vulnerability in PHP engine backtrace argument collection, affecting PHP 8.5.0 through 8.5.12. When entering a method call handled by __call() or __callStatic(), backtrace construction can read stale argument values referencing freed memory. A fatal error, such as exceeding memory_limit, at the relevant point can expose this condition when fatal_error_backtraces is enabled and zend.exception_ignore_args is disabled. Attackers able to influence memory allocation through request data may cause memory corruption or worker crashes and, with knowledge of usable memory addresses, execute arbitrary code.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can execute arbitrary native code with the PHP worker's privileges, compromising the confidentiality, integrity, and availability of resources accessible to that process. Other exploitation attempts can corrupt memory or crash workers, disrupting application availability. Code execution is conditional on application behavior, effective configuration, attacker influence over allocation, and usable memory-address knowledge; it is not an unconditional takeover of every affected PHP installation.
Mitigation
If you can’t patch tonight, do this now.
Set zend.exception_ignore_args=1 in the effective configuration used by affected workers and restart them. This is the php.ini-production default and blocks the documented attack path. Alternatively, set fatal_error_backtraces=0 to disable the demonstrated fatal-error backtrace path. Verify effective settings, including FPM pool settings and application overrides. Setting display_errors=0 does not prevent backtrace construction. Request-size limits and avoiding expensive processing or logging of untrusted request bodies can reduce exposure but do not replace patching or the configuration workaround.
Remediation
Patch, then assume compromise.
Upgrade PHP 8.5 installations to PHP 8.5.13 or a later supported fixed release, or install a vendor package explicitly containing the fix. PHP 8.6.0 also includes the fix. Restart PHP-serving processes so all workers load the patched runtime. Rebuild and redeploy affected containers, and verify the build or full vendor package revision actually serving requests rather than relying solely on the command-line PHP version.
Exploits
No validated public exploits yet. Hidden: 3 rejected by Mallory's analysis as not a working exploit.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2026-129474 exploited in the wild?
- As of Nov 28, 2026, Mallory has no reports of CVE-2026-129474 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-129474?
- As of Nov 28, 2026, Mallory has found no public exploit for CVE-2026-129474.
- Is there a patch for CVE-2026-129474?
- Upgrade PHP 8.5 installations to PHP 8.5.13 or a later supported fixed release, or install a vendor package explicitly containing the fix. PHP 8.6.0 also includes the fix.
- What products are affected by CVE-2026-129474?
- PHP Group Php.
- How severe is CVE-2026-129474?
- CVE-2026-129474 has a CVSS v4 score of 9.2 (Critical) and an EPSS score of 21.2% (98th percentile) as of Nov 28, 2026.
Recent activity
178 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.