CVE-2026-129474: Use-after-free in magic method backtraces can lead to remote code execution.

Critical CVSS 9.2

CVE id
CVE-2026-129474
Published
Last modified

Affected packages

PackageAffected versionsFixed in
PHP
Runtimes and servers
>= 8.5.0, < 8.5.13 8.5.13

How to fix it

Upgrade PHP to 8.5.13 or later.

php --version
  • Install the patched PHP release of your minor line (the php image tag or your OS packages) and restart PHP-FPM.

A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.

Details

Use-after-free in magic method backtraces can lead to remote code execution.

When collecting the arguments of a method call handled by __call() or _callStatic() for a backtrace, PHP can read stale values that may refer to freed memory. If a fatal error such as exceeding memorylimit occurs while an application enters such a call, with fatalerrorbacktraces enabled (the default) and zend.exceptionignoreargs disabled, a remote attacker who controls enough request data to influence memory allocation may cause memory corruption, crash the PHP worker or, with knowledge of memory addresses, execute arbitrary code. php.ini-production enables zend.exceptionignoreargs, which prevents this.

This issue affects PHP versions 8.5.* before 8.5.13.

References

Am I affected?

Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.

or paste its content

Needed when you paste. package.json and pyproject.toml only have version ranges: use the lockfile next to them.

Only package names and versions are checked; the file itself is not kept. We use your email to send this report and nothing else unless you tick the box above. Privacy policy.

About this data

Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.