CVE-2026-129474 and CVE-2026-129182 only affect PHP 8.5.0 to 8.5.12. Both sit in the fatal error backtraces that PHP 8.5 added. CVE-2026-129474 can lead to code execution when zend.exception_ignore_args is off, as it is on installs without php.ini-production. Update to 8.5.13 or 8.6.0.
On this page
The two bugs at a glance
Two of the seven critical fixes in PHP’s 19 November 2026 release only matter if you run PHP 8.5:
| CVE | PHP advisory | Code execution shown? | Typical exposure |
|---|---|---|---|
| CVE-2026-129474 | Use-after-free in magic method backtraces | Yes, on PHP 8.5 | 8.5 without the production php.ini |
| CVE-2026-129182 | Use-after-free via last_fatal_error_backtrace after shutdown |
No, crashes only | Unusual per-directory PHP settings |
Both are rated CVSS 4.0 9.2 by PHP. Both are fixed in 8.5.13 and in 8.6.0, which came out the same day. PHP 8.2, 8.3 and 8.4 are not affected by either.
If you’re on 8.4 or older, you can skip this page and read the full release breakdown instead.
What PHP 8.5 changed
PHP 8.5 added a setting, fatal_error_backtraces, that attaches a stack backtrace to fatal errors, so the log shows how the code got there. It’s on by default. Before 8.5, a fatal error such as “maximum execution time exceeded” told you the file and line but not the call stack.
That’s useful in a log. Both CVEs are bugs in the code that collects or keeps those backtraces, which is why they only exist on 8.5.
CVE-2026-129474: magic method backtraces
PHP’s advisory (GHSA-8mjj-2r7p-4hg2) describes a use-after-free while PHP collects the arguments for a backtrace taken inside a __call() or __callStatic() call. Those magic methods are common: many frameworks and ORMs route method calls through them. An unauthenticated request that causes a fatal error on such a path can trigger the bug.
The demonstrated remote code execution needs two settings:
fatal_error_backtraces = 1, the PHP 8.5 default, andzend.exception_ignore_args = 0, so that function arguments are kept in backtraces.
PHP’s php.ini-production sets zend.exception_ignore_args = 1. Servers that started from the production file are outside the demonstrated path. The ones to worry about are installs using php.ini-development, or no php.ini at all. The official Docker php images are a common example: they don’t enable a php.ini unless you copy one in, and their documentation recommends the production file for that reason.
PHP says code execution “has been confirmed on PHP 8.5 and later”, and that the chain needs usable memory addresses despite ASLR. That makes it harder than a one-request exploit, but not something to ignore. PHP 8.2 to 8.4 contain the underlying backtrace error but have no known remote trigger, so they’re outside the affected range.
The bug was reported by AdamKorcz.
CVE-2026-129182: the backtrace left behind after shutdown
The second advisory (GHSA-2fjv-p558-g82m) is in the same family as PHP2Shell’s CVE-2026-109619: state left over from one request is read by the next. Here, a fatal error raised late in shutdown can refill the global that holds the last fatal error’s backtrace. A diagnostic in a later request on the same worker then reads the stale backtrace.
Getting there needs configuration most servers don’t have. According to the advisory, the shutdown fatal error comes from one of two config conflicts:
max_memory_limitset both globally and for a specific path (admin-level config only), orzlib.output_compression = 1globally, withzlib.output_compression = 0plus anoutput_handlersuch asob_gzhandlerset for a specific path.
On top of that it needs an early diagnostic, which only happens when Apache passes per-directory PHP settings or when a FastCGI front end sends PHP_VALUE or PHP_ADMIN_VALUE parameters to PHP-FPM. Ordinary FPM pool settings and .user.ini files don’t provide it.
The advisory reports heap use-after-free and worker crashes. Code execution through these entry points hasn’t been demonstrated. It was reported by alexandre-daubois.
Who is not affected
- PHP 8.2, 8.3 and 8.4. Neither CVE is in their affected ranges. Debian’s tracker marks its
php8.2andphp8.4packages as not affected by CVE-2026-129182. - RHEL packages. Red Hat says both CVEs don’t affect the PHP shipped in Red Hat Enterprise Linux, which doesn’t include PHP 8.5. Anyone running PHP 8.5 on RHEL from another repository is affected.
- PHP 8.6.0. It shipped on 19 November with the same security fixes as 8.5.13.
Even if neither CVE applies to you, 8.4 and older still need their own November update for the other fixes: 8.4.28, 8.3.37 or 8.2.36.
Check your PHP 8.5 runtime
Look at the PHP that serves the website. The CLI reads its own ini file, and PHP’s advisory warns that changing only the CLI configuration doesn’t help. How to find the right PHP.
# Version and the two settings, as PHP-FPM sees them
php-fpm8.5 -v
php-fpm8.5 -i | grep -E '^(fatal_error_backtraces|zend\.exception_ignore_args) '
# Overrides in php.ini, conf.d and pool files
grep -rn -E 'fatal_error_backtraces|exception_ignore_args' /etc/php/8.5/
php-fpm -i shows php.ini values, not pool-level php_admin_value overrides. If you set things per pool, a temporary phpinfo() page shows the final values; delete it afterwards.
In the official Docker images, the CLI and FPM read the same ini directory, so docker exec <container> php -i | grep exception_ignore_args is a fair check. If it says Off, you’re in the demonstrated configuration until you update.
On Apache with mod_php, use the phpinfo() approach and look for both settings.
Stopgaps if you can’t update today
PHP’s advisories give two settings. Set them in the configuration the web workers read, then restart PHP-FPM or Apache.
For CVE-2026-129474, stop arguments being kept in backtraces:
zend.exception_ignore_args = 1
This is the production default anyway. The side effect is that exception traces in your logs no longer show argument values. On a production server that’s usually what you want.
For both CVEs, turn off the new fatal error backtraces:
fatal_error_backtraces = 0
Fatal errors then log the way they did on PHP 8.4, without a stack trace. PHP says to set this administratively so request-level configuration can’t switch it back on. In an FPM pool:
php_admin_flag[fatal_error_backtraces] = off
php_admin_flag[zend.exception_ignore_args] = on
Two things that don’t help: display_errors = 0 doesn’t stop PHP building the backtrace, and changing only the CLI php.ini leaves the web workers as they were.
Restart, don’t reload:
sudo systemctl restart php8.5-fpm
Updating to 8.5.13
On most systems the update is a normal package upgrade followed by a restart:
- Ubuntu 26.04 and 26.10 ship PHP 8.5 as backported packages, so the version won’t read 8.5.13. Check the changelog for both CVE IDs:
zgrep -E 'CVE-2026-129(474|182)' /usr/share/doc/php8.5-common/changelog.Debian.gz. - cPanel shipped
ea-php858.5.13 in EasyApache 4 release 25.98 on 19 November. cPanel guide. - Docker: rebuild on a
php:8.5.13tag and redeploy. If you use alatesttag anywhere, check what it points to now, as some image vendors movedlatestto PHP 8.6.0 the same day. Docker guide.
Should you jump to 8.6 instead? You don’t need to. PHP 8.5 gets security fixes until the end of 2029, and moving to a new feature release in the middle of a security update adds risk you don’t need today. Plan 8.6 separately. The PHP 8.5 branch page has the support dates.
Is anyone exploiting these?
As of 20 November there were no reports of either CVE being exploited, and neither was on CISA’s Known Exploited Vulnerabilities list. PHP’s own pre-announcement on 18 November said the critical issues in this release “require either non-default configuration or uncommon setups”. For these two, the configuration is the whole story: check the two settings above and you know where you stand.
Rather not do it yourself? We patch and verify one server, from €79. For the day the next PHP security release ships, join the email alerts.
Sources
- GitHub php-src advisory GHSA-8mjj-2r7p-4hg2: Use-after-free in magic method backtraces can lead to remote code execution
- GitHub php-src advisory GHSA-2fjv-p558-g82m: Use-after-free via repopulation of last_fatal_error_backtrace global after shutdown
- php.net: PHP 8.5.13 released (19 Nov 2026)
- php.net: PHP 8.6.0 released (19 Nov 2026)
- php.net: PHP 8 ChangeLog (8.5.13 and 8.6.0)
- Red Hat: RHSB-2026-020: Multiple vulnerabilities in PHP
- Debian security tracker: CVE-2026-129182
- php.net: Upcoming critical PHP security release (18 Nov 2026)