CVE-2026-129474: 
PHP Análisis y mitigación de vulnerabilidades

Vista general

CVE-2026-129474 is a use-after-free vulnerability in PHP's magic method backtrace handling that can lead to remote code execution. It affects PHP versions 8.5.0 through 8.5.12 (fixed in 8.5.13), and was disclosed on November 19, 2026 via a GitHub Security Advisory. The flaw occurs when PHP collects arguments for methods handled by __call() or __callStatic() during backtrace generation, potentially reading stale values referencing freed memory. It carries a CVSS v4.0 base score of 9.2 (Critical) (GitHub Advisory).

Detalles técnicos

The root cause is a use-after-free (CWE-416) in PHP's backtrace collection logic. Before PHP enters a magic method (__call() or __callStatic()), it briefly represents the requested method as a separate call frame; a backtrace taken during this interval can collect stale values from an earlier call that reference already-freed memory. Exploitation requires two non-default-safe conditions to be simultaneously active: fatal_error_backtraces=1 (the PHP 8.5 default) and zend.exception_ignore_args=0 (the PHP built-in default, but overridden by php.ini-production). The demonstrated attack vector involves submitting a crafted, oversized JSON body to an endpoint that processes it and logs via a magic static method, causing a memory_limit fatal error at the precise moment the magic method call is being entered — a behavior enabled by delayed allocation-failure handling introduced in PHP 8.5.12. Successful exploitation also requires knowledge of usable memory addresses to bypass ASLR for reliable code execution (GitHub Advisory).

Impacto

Successful exploitation allows an unauthenticated remote attacker to execute arbitrary code with the privileges of the PHP worker process, resulting in full compromise of confidentiality, integrity, and availability of the affected system. Less sophisticated attempts can crash the PHP worker process (denial of service) or produce ordinary resource-limit errors. Potentially affected application patterns include Laravel facades and Magento guest shipping estimation endpoints, though full exploitation of complete framework installations has not been publicly demonstrated (GitHub Advisory).

Explotabilidad

As of the disclosure date (November 19, 2026), there is no public proof-of-concept exploit and no evidence of in-the-wild exploitation (GitHub Advisory). The EPSS score is 0.0, reflecting the absence of observed exploitation activity at time of publication (Feedly). Exploitation complexity is high, requiring specific configuration conditions, control over memory allocation via request data, a reachable magic method call path, and knowledge of memory addresses to achieve reliable code execution rather than a crash. The vulnerability is not listed in the CISA KEV catalog at this time.

Pasos de explotación

  1. Reconnaissance: Identify PHP 8.5.0–8.5.12 deployments running with fatal_error_backtraces=1 (default) and zend.exception_ignore_args=0 (built-in default). Target applications using __call() or __callStatic() magic methods in request-handling paths, such as Laravel facade-based logging or Magento guest endpoints.
  2. Identify a suitable endpoint: Find an application endpoint that accepts large, attacker-controlled request bodies (e.g., JSON import endpoints) and processes them through a code path that invokes a magic method — particularly one that also performs logging or other operations that trigger __callStatic().
  3. Craft the malicious request: Size the request body precisely so that constructing a logging argument (or similar operation) causes PHP to cross the memory_limit threshold exactly while the magic method call frame is being entered, triggering a fatal error at the vulnerable interval.
  4. Trigger the use-after-free: The fatal error causes PHP to collect a backtrace including arguments; because zend.exception_ignore_args=0, PHP reads stale values from the freed call frame, which may contain attacker-influenced bytes from reused memory.
  5. Achieve memory corruption or code execution: With knowledge of memory layout (e.g., via information leaks or heap grooming), craft the request data so that the freed memory contains a controlled value that redirects execution — achieving RCE as the PHP worker process user. Without address knowledge, the outcome is typically a worker crash (GitHub Advisory).

Indicadores de compromiso

  • Network: Unusually large HTTP POST requests (near or exceeding memory_limit) to endpoints known to use magic method dispatch (e.g., logging facades, API import endpoints); repeated requests from the same source with varying body sizes suggesting heap-grooming attempts.
  • Logs: PHP error logs showing Fatal error: Allowed memory size exhausted coinciding with magic method invocations (__call or __callStatic); PHP-FPM logs showing unexpected worker process crashes or restarts (SIGABRT, SIGSEGV) correlated with specific request patterns.
  • Process: PHP worker processes terminating abnormally (segmentation faults) without corresponding application-level exceptions; unexpected child processes spawned by the PHP-FPM worker (e.g., shells, network utilities) if code execution is achieved.
  • File System: Unexpected files written to web-accessible directories or /tmp by the PHP worker user; new cron entries or SSH authorized keys added under the web server account (GitHub Advisory).

Mitigación y soluciones alternativas

The primary remediation is upgrading to PHP 8.5.13 or later, which contains the fix (GitHub Advisory). For immediate workarounds prior to upgrading, set zend.exception_ignore_args=1 in the php.ini configuration used by affected PHP workers (including FPM pool configs) and restart them — note that changing only the CLI configuration is insufficient. Alternatively, setting fatal_error_backtraces=0 on PHP 8.5+ also blocks this attack path. Administrators using php.ini-production as their base configuration are already protected, as it sets zend.exception_ignore_args=1 by default. Additionally, enforcing request-size limits and avoiding expensive processing or logging of untrusted request bodies can reduce exposure, but these are not complete substitutes for the configuration fix or upgrade.

Reacciones de la comunidad

The vulnerability received broad coverage across the security community upon disclosure on November 19, 2026, with outlets including BleepingComputer, SecurityWeek, The Hacker News, and Infosecurity Magazine reporting on the PHP 8.5.13 release fixing multiple critical flaws (BleepingComputer, SecurityWeek, The Hacker News). Checkmarx published analysis noting the complexity of exploitation and the configuration-dependent nature of the attack (Checkmarx). OX Security contextualized the flaw within a broader wave of PHP critical vulnerabilities in 2026 (OX Security). Patchstack highlighted implications for WordPress hosting environments (Patchstack).

Recursos adicionales

Estado de corrección de la distribución Linux

Arreglar la disponibilidad en las principales distribuciones de Linux y sus lanzamientos.

Debian

Arreglado

bookworm

php8.2

Arreglado

sid

php8.4

Arreglado

trixie

php8.4

Arreglado

Ubuntu

Arreglado

bionic (esm-infra)

php7.2

No afectado

devel

php8.5

Afectados

focal (esm-infra)

php7.4

No afectado

jammy

php8.1

No afectado

noble

php8.3

No afectado

resolute

php8.5: 8.5.4-0ubuntu1.6

Arreglado

trusty (esm-infra-legacy)

php5

No afectado

xenial (esm-infra-legacy)

php7.0

No afectado

RHEL / CentOS

Afectados

RHEL 8

No afectado

RHEL 9

No afectado

RHEL 10

No afectado

Fuente: Este informe se generó usando IA

Relacionado PHP Vulnerabilidades:

CVE ID

Gravedad

Puntuación

Tecnologías

Nombre del componente

Exploit CISA KEV

Tiene solución

Fecha de publicación

GHSA-h8fv-vm7c-r6fhCRITICALN/A
  • PHP logoPHP
  • simplesamlphp/saml2
NoNoNov 24, 2026
GHSA-5vjv-wq72-r667MEDIUMN/A
  • PHP logoPHP
  • youthweb/bbcode-parser
NoSíNov 24, 2026
GHSA-3685-v2g8-q27vMEDIUMN/A
  • PHP logoPHP
  • youthweb/bbcode-parser
NoSíNov 24, 2026
GHSA-26cq-29p9-57xjMEDIUMN/A
  • PHP logoPHP
  • youthweb/bbcode-parser
NoSíNov 24, 2026
GHSA-pm4m-j3qg-fqqqMEDIUMN/A
  • PHP logoPHP
  • youthweb/bbcode-parser
NoSíNov 24, 2026

Evaluación gratuita de vulnerabilidades

Haz un benchmark de tu postura de seguridad en la nube

Evalúa tus prácticas de seguridad en la nube en 9 dominios de seguridad para evaluar tu nivel de riesgo e identificar brechas en tus defensas.

Evaluación de solicitudes

Recursos adicionales de Wiz

Obtén una demostración personalizada

¿Listo para ver a Wiz en acción?

"La mejor experiencia de usuario que he visto en mi vida, proporciona una visibilidad completa de las cargas de trabajo en la nube."
David EstlickCISO
"Wiz proporciona un panel único para ver lo que ocurre en nuestros entornos en la nube."
Adam FletcherJefe de Seguridad
"Sabemos que si Wiz identifica algo como crítico, en realidad lo es."
Greg PoniatowskiJefe de Gestión de Amenazas y Vulnerabilidades