CVE-2026-129182: Use-after-free in PHP 8.5 fatal-error backtraces after shutdown
- Vendor
- PHP Group
CVE-2026-129182 is a use-after-free vulnerability affecting PHP 8.5.0 through 8.5.12. A fatal error raised while restoring modified INI settings during request shutdown can repopulate the last_fatal_error_backtrace global after executor cleanup. Request memory is subsequently freed, leaving a stale backtrace reference. An early diagnostic emitted before executor initialization in a later request handled by the same PHP-FPM or Apache mod_php worker can access this freed memory. The vulnerability covers additional shutdown scenarios not prevented by the PHP 8.5.12 fix for CVE-2026-109619. Exploitation can cause memory corruption and worker crashes and may permit remote code execution, although code execution through these entry points has not been demonstrated.
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.
Demonstrated effects include heap use-after-free and PHP worker crashes, compromising service availability. Memory corruption could potentially permit arbitrary code execution with the PHP worker's privileges and consequent compromise of data and application integrity. Remote code execution through this specific vulnerability has not been demonstrated.
Mitigation
If you can’t patch tonight, do this now.
Administratively set fatal_error_backtraces=0 and restart all workers. Ensure request-specific configuration cannot override this setting and re-enable fatal-error backtraces. This is an interim workaround, not a replacement for upgrading.
Remediation
Patch, then assume compromise.
Upgrade PHP 8.5 deployments to PHP 8.5.13 or a later supported fixed release, or install a vendor package explicitly incorporating the fix. The fix prevents creation or consumption of fatal-error backtraces while the executor is inactive. Restart PHP-FPM or Apache so all workers load the patched runtime; rebuild and redeploy affected container images. Verify the runtime or vendor package revision actually serving requests rather than relying solely on the command-line PHP version.
Exploits
No validated public exploits yet. Hidden: 1 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.
Frequently asked questions
- Is CVE-2026-129182 exploited in the wild?
- As of Nov 28, 2026, Mallory has no reports of CVE-2026-129182 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-129182?
- As of Nov 28, 2026, Mallory has found no public exploit for CVE-2026-129182.
- Is there a patch for CVE-2026-129182?
- Upgrade PHP 8.5 deployments to PHP 8.5.13 or a later supported fixed release, or install a vendor package explicitly incorporating the fix. The fix prevents creation or consumption of fatal-error backtraces while the executor is inactive.
- What products are affected by CVE-2026-129182?
- PHP Group Php.
- How severe is CVE-2026-129182?
- CVE-2026-129182 has a CVSS v4 score of 9.2 (Critical) and an EPSS score of 24.0% (98th percentile) as of Nov 28, 2026.
Recent activity
92 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.