Skip to content
NewCybercrime Report 2026 · Eight Chapters · A Post Is Not An Incident → Explore The ChaptersCybercrime Report 2026 → Explore

PHP Magic Method Backtrace RCE (CVE-2026-129474)

CVE-2026-129474 is a use-after-free flaw in PHP's handling of magic method arguments during backtrace collection.

Reviewed by
Brandefense Analyst Team
Published
Reading Time
3 min read
CVE ID
CVE-2026-129474
Vendor
PHP Group
Affected Product
PHP
Exploitation
Not confirmed
Published
2026-11-19

PHP's advisory says a remote attacker may cause memory corruption or a worker crash. Under narrower conditions, the flaw may permit code execution with the PHP worker's privileges.The PHP CNA published the record on 19 November 2026. It assigns a CVSS 4.0 score of 9.2, rated Critical. The affected range is PHP 8.5.0 through 8.5.12, and PHP 8.5.13 contains the fix.

What it allows

How Does CVE-2026-129474 Work?

The PHP advisory describes stale argument values in a backtrace for a call handled by __call() or __callStatic(). Some stale values may point to freed memory. If a fatal error occurs while the application enters the magic method, backtrace collection can read those values.

The demonstrated remote path requires fatal_error_backtraces=1 and zend.exception_ignore_args=0. The first setting is enabled by default in PHP 8.5, while php.ini-production sets the second to 1. A reachable application path, attacker influence over memory allocation, and a fatal error at the relevant point are also needed.

Successful code execution requires usable memory-address knowledge despite address space randomisation, according to PHP. Other outcomes include a worker crash or an ordinary resource-limit error. The PHP advisory names framework paths that reach magic methods, but says complete framework installations were not demonstrated as exploitable.

For context, see our PHP security release coverage. Teams can use Vulnerability Intelligence to organize exposure and prioritization, while verifying the actual PHP configuration on each worker.

Who is affected

Version Check

PHP
Release LineAffected RangeFixed In
8.5.x8.5.0 to before 8.5.138.5.13
Release ranges source

For distribution packages and custom builds, check the supplier’s advisory.

Check the effective version of the running web worker; distribution backports require vendor patch verification.

Which PHP Versions Are Affected by CVE-2026-129474?

The PHP CNA lists the PHP engine from 8.5.0 inclusive to 8.5.13 exclusive. PHP 8.5.13 is the patched version in the advisory and official change log. The affected range includes earlier 8.5 releases, although the advisory's demonstrated fatal-error chain describes a behavior introduced in 8.5.12.

The vendor says PHP 8.2 through 8.4 contain the underlying backtrace error. Those branches are outside this advisory's affected range because no attacker-controlled remote trigger was established for them. Do not classify every PHP installation as remotely exploitable from its version alone.

Check the effective fatal_error_backtraces and zend.exception_ignore_args settings for web-facing workers, including FPM pool or application overrides. A CLI-only check may miss the running web configuration. Track the deployment and confirmation in your patch management process.

Timeline

  1. 2026-11-19

    The PHP Group published its advisory and PHP CNA CVE record.

  2. 2026-11-19

    PHP 8.5.13 was released with the CVE-2026-129474 fix in the official change log.

What to do

  1. Inventory running PHP 8.5 workers

    Identify PHP 8.5.0 through 8.5.12 in web-facing deployments. Record the running worker version, configuration source, application path and owner.

  2. Upgrade to PHP 8.5.13

    Apply PHP 8.5.13 or the relevant vendor-supplied fix. Confirm that each restarted web worker reports the patched running version or a documented backported fix.

  3. Apply the temporary configuration workaround

    If patching is delayed, set zend.exception_ignore_args=1 for affected workers and restart them. PHP also says fatal_error_backtraces=0 blocks this fatal-error path on PHP 8.5 and later.

  4. Verify effective web configuration

    Check FPM pools and application overrides after restart. PHP warns that a CLI setting alone or display_errors=0 does not establish protection for the running web workers.

  5. Review worker failures

    Review application and PHP worker logs for fatal errors and abnormal worker exits on exposed paths. This is a defensive review suggestion, not a vendor detection signature or proof of exploitation.

What Brandefense can do

Frequently Asked Questions

Does every PHP 8.5 installation permit remote code execution?

No. The PHP advisory requires a reachable magic method path, particular backtrace settings, a fatal error, and favorable memory conditions. Code execution needs usable memory-address knowledge.

Which release fixes CVE-2026-129474?

PHP lists 8.5.13 as patched. Verify the running web worker after upgrading, or confirm a vendor-documented backport for a distribution package.

Can display_errors=0 prevent the flaw?

PHP says it cannot. The runtime can still construct a backtrace, so check the effective worker settings and apply the patched release.

Are PHP 8.2 through 8.4 in this advisory's affected range?

No. PHP says they contain the underlying error, but it has not established an attacker-controlled remote trigger for those branches.

Sources

  1. PHP Security Advisory GHSA-8mjj-2r7p-4hg2PHP Group
  2. CVE-2026-129474 RecordPHP CNA via CVE Program
  3. PHP 8 ChangeLogPHP Group
ShareLinkedInX
Brandefense logo

Stay Ahead of Digital Threats.

Take control of your digital security with an exclusive demo of our AI-driven threat intelligence platform.

Open The Full Demo Form →