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

CVE-2026-129474

Assigned byThe organization (CNA) that assigned this CVE ID and published the record, usually the vendor.
PHP Group (opens in new tab)
Published
Last modified
NVD status
Received
Zero Wire briefingOur analysis of who's affected and what to do.
CVSS 4.09.2Critical

Description

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 memory_limit occurs while an application enters such a call, with fatal_error_backtraces enabled (the default) and zend.exception_ignore_args 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.exception_ignore_args, which prevents this.

This issue affects PHP versions 8.5.* before 8.5.13.

Exploitation

Whether attackers are exploiting this vulnerability, and how likely they are to try in the next 30 days.

CISA SSVC assessmentAbout SSVC (opens in new tab)

CISA's assessment of whether it's exploited, whether attacks can be automated and how much control an attacker gains.

ExploitationWhether CISA has seen exploit code or attacks for this vulnerability.
None known
AutomatableWhether attackers can exploit it at scale without manual steps.
No
Technical impactHow much control of the affected system an attacker gains.
Full control
Assessed

Affected products

The products and versions with the vulnerability.

Listed by CNA

The products and versions affected, according to the organization that published this CVE.

VendorProductAffected versions
PHP GroupPHP
  • 8.5.0 to < 8.5.13

How to fix the vulnerability, or reduce the risk until you can.

Cloudflare's guidance

What to do now, from the Zero Wire briefings that cover this vulnerability.

Severity

How serious the vulnerability is if exploited, scored from 0 to 10 with the CVSS standard (opens in new tab).

  • 9.2 CriticalCVSS 4.0 · SecondaryPrimary scores are NVD's own. Secondary scores come from the organization that published the CVE, or from CISA. · Scored by PHP Group (opens in new tab)
    Attack vectorWhere the attacker has to be. Network is the widest: anywhere on the Internet.
    Network
    Attack complexityWhether the attack depends on conditions the attacker doesn't control.
    High
    Attack requirementsWhether the attack depends on how the target is deployed or configured.
    Present
    Privileges requiredThe access the attacker needs before attacking.
    None
    User interactionWhether someone other than the attacker has to do something, like open a link.
    None
    ConfidentialityHow much data the attacker can read.
    High
    IntegrityHow much data the attacker can change.
    High
    AvailabilityHow much the attacker can disrupt the system or service.
    High
    Confidentiality, other systemsThe impact on other systems that depend on the vulnerable one.
    None
    Integrity, other systemsThe impact on other systems that depend on the vulnerable one.
    None
    Availability, other systemsThe impact on other systems that depend on the vulnerable one.
    None

    CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NView in FIRST's calculator (opens in new tab)

Weaknesses and attack patterns

The type of bug behind the vulnerability, and how attackers exploit that type.

  • Use After Free · CWE-416 (opens in new tab)

    The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.

    Likelihood of exploitHow likely MITRE rates attacks on this type of weakness, in general rather than for this vulnerability.
    High
    Abstraction
    Variant
    Mapping guidance
    Allowed
    Part of

References

Advisories, patches, exploits and more about this vulnerability.

This product uses the NVD API but is not endorsed or certified by the NVD (opens in new tab). CVE records from the CVE List (opens in new tab), weakness types from MITRE's CWE (opens in new tab)™ and attack patterns from its CAPEC (opens in new tab)™ are © The MITRE Corporation, used under the CVE (opens in new tab), CWE (opens in new tab) and CAPEC (opens in new tab) terms of use. Known exploited vulnerabilities and SSVC assessments are from CISA. Exploit predictions are from FIRST's EPSS (opens in new tab). About this data