CVE-2026-129474: PHP 8.5 use-after-free in magic method backtraces, and how to patch it

Data Security

CVE-2026-129474 is a memory safety flaw in PHP 8.5. A fatal error raised at the wrong moment inside a magic method call can corrupt memory and, in the worst case, run code sent by a remote attacker. It was published on November 19, 2026, and Opensolr has been protected against it since that same day.

01 · At a glance

Identifier
CVE-2026-129474
Severity
9.2 Critical (CVSS v4.0)
Published
November 19, 2026
Affected
PHP 8.5.0 to 8.5.12
Fixed in
PHP 8.5.13
Opensolr
Protected since November 19, 2026
Last reviewed
November 20, 2026

02 · What it is

When PHP builds a backtrace it collects the arguments of every call on the stack. For a call handled by __call() or __callStatic(), PHP 8.5 can read values that already point to freed memory.

If a fatal error, such as running over memory_limit, is raised while the application is entering such a call, the backtrace written for that error touches the stale values. A remote attacker who controls enough of the request to steer memory allocation can crash the PHP worker or corrupt its memory. With knowledge of memory addresses, arbitrary code execution is possible.

03 · Who is affected

A server is exposed only when all of the following are true:

  • It runs PHP 8.5.0 to 8.5.12.
  • fatal_error_backtraces is on. That is the default.
  • zend.exception_ignore_args is off. The development php.ini leaves it off; php.ini-production turns it on.
  • The application uses magic methods. Most frameworks and ORMs do.

04 · How to fix it

Upgrade to PHP 8.5.13 or later, then restart PHP-FPM or the web server so the running workers use the new build.

php -v
sudo apt update && sudo apt install --only-upgrade 'php8.5*'
sudo systemctl restart php8.5-fpm

05 · How to mitigate until you can upgrade

Turn argument collection off. The PHP advisory states that this setting prevents the flaw. Set it in the php.ini of the web SAPI (PHP-FPM or mod_php), not only in the command line one, then reload.

zend.exception_ignore_args = On

Backtraces keep their file names and line numbers. They only stop listing function arguments, which also keeps passwords and tokens out of your logs.

06 · How to check a server

php-fpm8.5 -v | head -1
php-fpm8.5 -i | grep -E 'zend.exception_ignore_args|fatal_error_backtraces'

The command line and PHP-FPM read different php.ini files. Check the one that serves web requests.

07 · Opensolr and this vulnerability

Status on November 20, 2026. Opensolr is protected against CVE-2026-129474. The condition it needs was closed on the platform on November 19, 2026, the day the advisory was published. Nothing is required from you: your Opensolr Index, your account and your data are not exposed to it.

  • Opensolr watches newly published vulnerabilities for every component of the platform, around the clock.
  • Each advisory is assessed against the platform as soon as it is published.
  • The fix is applied, or the vulnerable condition is closed, and the result is verified before the case is closed.

More on how Opensolr protects your data: Opensolr Trust Center and all security pages. Questions about a vulnerability that is not listed: contact Opensolr.

Official advisory: PHP security advisory GHSA-8mjj-2r7p-4hg2 · NVD entry.