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

Vista general

CVE-2026-129481 is a heap use-after-free vulnerability in PHP's session extension, triggered by interrupted session shutdown via a fatal error in a user-defined stream wrapper callback. It affects PHP versions 8.3.0–8.3.36, 8.4.0–8.4.27, and 8.5.0–8.5.12; PHP 8.2 and earlier are not affected. The vulnerability was disclosed on November 19, 2026, and is described as an incomplete fix for CVE-2026-109619. It carries a CVSS v4.0 base score of 9.2 (Critical) (GitHub Advisory).

Detalles técnicos

The root cause is classified as CWE-416 (Use After Free) and CWE-459 (Incomplete Cleanup). When a PHP session starts, the session extension records the executing script's filename in an internal global variable. If a fatal error occurs in an application callback during session variable destruction at shutdown — such as in a user-defined stream wrapper's stream_close() method — session shutdown is aborted before the filename pointer is released or cleared. The request heap is subsequently freed while the worker process retains the stale filename pointer; a subsequent request handled by the same worker can then release this dangling pointer, triggering the use-after-free. Exploitation requires OPcache to be disabled (so the filename is allocated in request memory rather than persistent OPcache memory) and that both requests reach the same PHP-FPM worker (GitHub Advisory).

Impacto

Successful exploitation can result in memory corruption or a PHP worker process crash, causing denial of service. An attacker who can control session cleanup behavior may also potentially read sensitive memory contents through the heap use-after-free condition. While remote code execution has not been demonstrated through this specific field, the advisory notes it is theoretically possible if memory layout can be controlled. The two requests involved do not need to belong to the same user or session — only the same PHP-FPM worker process (GitHub Advisory).

Explotabilidad

No public proof-of-concept exploit code is known to exist, and there is no evidence of active in-the-wild exploitation as of the disclosure date (GitHub Advisory). The EPSS score is 0.0, reflecting the current absence of observed exploitation activity. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. Exploitation requires high attack complexity, including the ability to trigger a fatal error in a session cleanup callback and route a follow-up request to the same PHP-FPM worker, with OPcache disabled.

Pasos de explotación

  1. Identify target: Locate a PHP application running PHP-FPM with OPcache disabled, using PHP 8.3.x < 8.3.37, 8.4.x < 8.4.28, or 8.5.x < 8.5.13, that allows user-influenced session handling with custom stream wrappers.
  2. Craft malicious session interaction: Send a request that initiates a PHP session and registers a user-defined stream wrapper (e.g., via stream_wrapper_register()) that stores a stream resource in the session. The stream wrapper's stream_close() method must be designed to raise a fatal error during cleanup.
  3. Trigger interrupted shutdown: Submit a request that causes the fatal error in stream_close() during session variable destruction at shutdown, aborting session cleanup before the script filename pointer is released.
  4. Send follow-up request: Send a subsequent request to the same PHP-FPM worker process (without needing the same user or session). This request's session initialization does not reset the stale filename field, and starting or shutting down a session in this request will release the dangling pointer.
  5. Achieve use-after-free: The freed memory region may be reallocated and overwritten, enabling memory corruption, worker crash, or — under controlled memory layout conditions — potential code execution (GitHub Advisory).

Indicadores de compromiso

  • Logs: PHP-FPM error logs showing fatal errors during session shutdown, particularly originating from stream wrapper stream_close() callbacks; repeated worker crashes or restarts in php-fpm.log.
  • Process: Unexpected PHP-FPM worker process terminations (segmentation faults) logged in system logs (e.g., /var/log/syslog or dmesg) referencing PHP worker PIDs.
  • Network: Unusual patterns of repeated requests to the same PHP-FPM endpoint from different clients or sessions in rapid succession, potentially targeting session-handling endpoints.
  • File System: Presence of custom stream wrapper PHP scripts or session files that register error-triggering stream_close() callbacks, particularly in upload or user-controlled directories (GitHub Advisory).

Mitigación y soluciones alternativas

Upgrade PHP to the fixed versions: 8.3.37, 8.4.28, or 8.5.13. The fix clears the recorded session filename and line number during session initialization and terminates the PHP process if a module's request-shutdown handler bails out, preventing reuse of a partially cleaned-up worker. If immediate patching is not possible, set pm.max_requests=1 in PHP-FPM configuration to prevent a worker from handling a second request after a failed cleanup (at a performance cost). Additionally, avoid fatal errors in callbacks reached during session cleanup, and consider disabling or restricting user-defined stream wrappers. Enabling OPcache alone is not a reliable mitigation, as scripts can still execute without being cached (GitHub Advisory).

Reacciones de la comunidad

The vulnerability received broad coverage across the security community following the November 19, 2026 PHP security release. Security outlets including The Hacker News, SecurityWeek, Infosecurity Magazine, and CyberSecurityNews reported on the PHP patch batch, which addressed multiple critical flaws. Patchstack highlighted the implications for WordPress environments, and Checkmarx published analysis noting what is known and unknown about the critical PHP security release. Community discussion was active on Mastodon and developer forums, with practitioners emphasizing the importance of upgrading PHP-FPM deployments promptly (GitHub Advisory).

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: 8.4.28-2

Arreglado

trixie

php8.4: 8.4.28-1~deb13u1

Arreglado

Ubuntu

Arreglado

bionic (esm-infra)

php7.2: 7.2.24-0ubuntu0.18.04.17+esm15

Arreglado

devel

php8.5

Afectados

focal (esm-infra)

php7.4: 7.4.3-4ubuntu2.29+esm6

Arreglado

jammy

php8.1: 8.1.2-1ubuntu2.29

Arreglado

noble

php8.3: 8.3.6-0ubuntu0.24.04.14

Arreglado

resolute

php8.5: 8.5.4-0ubuntu1.6

Arreglado

trusty (esm-infra-legacy)

php5: 5.5.9+dfsg-1ubuntu4.29+esm19

Arreglado

xenial (esm-infra-legacy)

php7.0: 7.0.33-0ubuntu0.16.04.16+esm23

Arreglado

RHEL / CentOS

Arreglado

RHEL 8

No afectado

RHEL 9

:appstream:php-0:8.3-9060020261121170731.9.src

Arreglado

RHEL 10

php-0:8.3.37-1.el10_0.src

Arreglado

Alpine

Arreglado

edge

php83: 8.3.37-r0, 8.5.13-r0

Arreglado

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