GHSA-Q6VV-3P75-53WR
exit() with a negative status makes FrankenPHP panic and stop
Texto original en inglés · Ver en español
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-Q6VV-3P75-53WR divulgada · CVSS 5.9 (GitHub) | |
| Divulgación | Modificada | Última actualización del registro | |
| Remediación | Parche v1.13.5 | github.com/dunglas/frankenphp · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Impact
A PHP script that calls `exit()` or `die()` with a negative integer status, such as `die(-1)` on an error path, makes FrankenPHP panic. The whole process exits, with every site and in-flight request it serves. Classic and worker modes are both affected.
Exploitation requires an application that passes a negative or attacker-influenced integer to `exit()` on a path a client can reach. Any status whose low 32 bits are negative as a signed integer triggers it, for example `-1` or `4294967295`. String arguments, uncaught exceptions and fatal errors do not.
Patches
Fixed in 1.13.5.
Workarounds
Do not pass negative integers, or integers derived from request data, to `exit()` or `die()`.
Details
After each script, `php_thread()` passes `EG(exit_status)` to `go_frankenphp_after_script_execution()`, which panicked on a negative value. The check dates from when a negative value meant FrankenPHP itself failed to run the script, which it no longer reports this way. `EG(exit_status)` holds the integer given to `exit()` without a range check, so a script could reach the panic. It ran on a PHP thread where nothing recovers it.
The check is removed. The thread handlers already handle any status: regular threads ignore it, and workers only distinguish zero from non-zero.
Proof of concept
<?php
// exit.php
echo 'bye';
exit(-1);$ frankenphp php-server --listen 127.0.0.1:8080 &
$ curl http://127.0.0.1:8080/exit.php
curl: (52) Empty reply from serverThe server logs `panic: error during PHP script execution` and exits with status 2.
Credits
Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-UV4G0KZN.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogithub.com/dunglas/frankenphp |
Corregida | v1.13.5 | 0 d | v1.13.6 no afectada |
v1.13.5Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/php/frankenphp/security/advisories/GHSA-q6vv-3p75-53wrLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
