The bug in two sentences
When PHP builds the backtrace of a call forwarded to__call() or __callStatic(), it can read stale arguments, some of which point to memory that has already been freed. If a fatal error, such as exceeding memory_limit, fires at that exact moment and backtraces include arguments, request-controlled bytes can be treated as live PHP values.
This is a use-after-free (CWE-416). Frameworks rely heavily on these magic methods to forward calls: logging facades, database layers, service proxies.
The PHP advisory describes the demonstrated attack: crafted JSON sent to an import endpoint, later logged through a magic static method, and sized so that building a logging argument exceeds memory_limit. An execution time limit expiring in the same window is another possible trigger.
The demonstrated path requires:
fatal_error_backtraces=1, the PHP 8.5 default;zend.exception_ignore_args=0;- a request path that reaches a magic method with enough data to influence memory allocation;
- knowledge of usable memory addresses despite ASLR.
- PHP 8.5.0 through 8.5.12, fixed in 8.5.13;
- PHP 8.2 through 8.4 contain the underlying bug with no known remote trigger: the PHP project keeps them out of the affected range.
AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N); NVD carries the same score. Red Hat scores it 8.1 in CVSS 3.1, Ubuntu rates it medium priority. The full advisory is GHSA-8mjj-2r7p-4hg2.
According to the CISA assessment shown by NVD, no exploitation is reported and the attack is not automatable. The PHP advisory cites Laravel facades and Magento’s guest shipping estimation as paths that reach a magic method, with no exploitation demonstrated on a full installation of either.
Sizing your exposure
The question to ask: does any of your sites run PHP 8.5 withzend.exception_ignore_args set to 0? The php.ini-production file shipped by PHP sets it to 1, which blocks the demonstrated path.
Start with the PHP version your sites run:
php_admin_value, php_value or php_admin_flag line in a pool wins over php.ini. As the PHP advisory points out, changing only the CLI configuration is not enough.
display_errors=0 is not a mitigation: it hides the error output, but the backtrace is still built.Updating PHP by distribution
The real fix is PHP 8.5.13 or your distribution’s fixed package, followed by a restart of PHP-FPM: workers that are already running keep the old code. Take a snapshot of your VPS first.Ubuntu
Do not rely on the number shown by
php -v alone. Ubuntu backports the fix: a fixed package can report PHP 8.5.4 or 8.5.9. Only the full package version, checked against the advisory, counts.Debian
The Debian tracker marksphp8.4 (Debian 13) and php8.2 (Debian 12) as not affected: the flaw only hits PHP 8.5. If you install PHP 8.5 from a third-party repository, apply that repository’s update to 8.5.13, or the settings below.
RHEL and AlmaLinux
According to bulletin RHSB-2026-020, the PHP versions shipped by RHEL are not affected: Red Hat does not ship PHP 8.5. If you install PHP 8.5 from a third-party repository, update it to 8.5.13:Docker containers
Rebuild your images on aphp:8.5 base image at version 8.5.13 or later, then redeploy. Check the bundled version:
zend.exception_ignore_args to 1:
Blocking the attack path in the meantime
If you cannot update right away, PHP and Red Hat give the same mitigation:zend.exception_ignore_args=1 and, to close the trigger as well, fatal_error_backtraces=0. The first setting strips arguments from exception traces: your logs still show the call stack, without the values passed.
On an Ubuntu VPS
Create an ini file read by PHP-FPM:ini_set() or a .user.ini, also pin them in each pool, for example /etc/php/8.5/fpm/pool.d/www.conf:
With PHP 8.5 from a third-party repository on RHEL or AlmaLinux
Red Hat says to set both values in/etc/php.ini or in the pool file under /etc/php-fpm.d/, then restart:
According to Red Hat, the same mitigation covers CVE-2026-129182, another PHP 8.5-only use-after-free in fatal error backtraces, fixed by the same 8.5.13 release.
Checking the mitigation
php -i on the command line does not show pool overrides. The check that counts goes through PHP-FPM: drop a temporary script into a site’s document root, query it, then delete it.
"1". The second must be "0" or empty if you also turned backtraces off.
After an update, also check the restart:
Restoring backtraces after the update
Once PHP 8.5.13 or the fixed package is in place, you can turnfatal_error_backtraces back on if you read those traces in your logs: remove the matching line from the ini file and the pool, then restart PHP-FPM.
zend.exception_ignore_args = 1: it is the php.ini-production value, and it keeps function arguments out of your logs.

