llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · github.com/dunglas/frankenphp

GHSA-RGPJ-F2QX-XWHF

Use-after-free when putenv() is called during request shutdown

Texto original en inglés · Ver en español

Parche disponible
Descargar PNG JSON
CVSS 3.1
6.5
Media
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche el mismo día de la divulgación
Exposición25 dDesde la divulgación, 26 oct 2026, 11:53 a. m.
Detección24 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Revisa, agenda, parchea. El clásico de siempre.Tranqui, va para la ventana de mantenimiento.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche v1.13.4
Monitoreo
Detectada +1
26 oct 26
19 nov 26
21 nov 26
26 oct 26
2 nov 26
8 nov 26
15 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-RGPJ-F2QX-XWHF divulgada · CVSS 6.5 (GitHub)
Divulgación Modificada Última actualización del registro
Remediación Parche v1.13.4 github.com/dunglas/frankenphp · 0 d desde divulgación
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Impact

If an application calls `putenv()` from code that runs during request shutdown (a shutdown function, the destructor of an object alive at the end of the script, or a session `write()`/`close()` handler), FrankenPHP keeps a pointer to a freed environment table. The next script on the same PHP thread uses it on its first `getenv()` or `putenv()` call, which most frameworks make on every request.

On a release build of PHP 8.5 with the default allocator, this crashes the whole process (segmentation fault). With `USE_ZEND_ALLOC=0`, the next request can read the previous request's value back.

Classic mode is affected on every thread. Worker mode is affected when a worker script restarts.

Patches

Fixed in 1.13.4 by https://github.com/php/frankenphp/commit/ab174aa6c27738b9ee56c97ac276d152bfb38f5e.

Workarounds

Don't call `putenv()` from shutdown functions, destructors or session handlers.

Details

The first `putenv()` of a script allocates FrankenPHP's environment sandbox on the request heap. FrankenPHP released the sandbox before `php_request_shutdown()`, but shutdown functions, destructors and session handlers run inside `php_request_shutdown()`. A `putenv()` there allocated a new sandbox, which `php_request_shutdown()` then freed along with the request heap, leaving the thread-local pointer dangling. FrankenPHP now clears the pointer once `php_request_shutdown()` returns.

Proof of concept

With one PHP thread, request 1 runs:

<?php
register_shutdown_function(static fn () => putenv('LATE=1'));

Request 2 runs `getenv('LATE');`, which reads the freed table (heap use-after-free under ASan, segmentation fault on a release build).

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:L
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
7.1/ 10Alto
Vector 7.1 (fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
github.com/dunglas/frankenphp≤ 1.13.3
1.13.3
v1.13.6
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
gogithub.com/dunglas/frankenphp
Corregida v1.13.4 0 d v1.13.6 no afectada
Versiones corregidasv1.13.4
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/php/frankenphp/security/advisories/GHSA-rgpj-f2qx-xwhf

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.