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

GHSA-J2F3-WXF2-8QGV

Embedded app directory removed on reload can be recreated by other local users

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

Parche disponible
Descargar PNG JSON
CVSS 3.1
6.7
Media
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/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ón16 dDesde la divulgación, 5 nov 2026, 7:01 a. m.
Detección14 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir de cerca
Monitorear y programar la remediación
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 total. Hay versiones corregidas disponibles.
Anótala en tu libreta de pendientes serios.Hmm… no me convence. Vigílala de cerquita.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche v1.13.5
Monitoreo
Detectada +1
5 nov 26
19 nov 26
21 nov 26
5 nov 26
9 nov 26
13 nov 26
17 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-J2F3-WXF2-8QGV divulgada · CVSS 6.7 (GitHub)
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
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Impact

This is an incomplete fix of GHSA-6q3j-62j9-f9hh.

Binaries embedding a PHP application extract it to `<temp dir>/frankenphp_<euid>_<checksum>`. Since 1.13.2, this directory is created with mode `0700` and an existing one is only reused if the current user owns it. This check runs once, when the process starts.

`Shutdown()` deleted the directory. It runs on every Caddy configuration reload, which restarts PHP in the same process, and when any long-running server process of the same binary and user (`run`, `php-server`) stops. The server still running kept serving PHP files from the deleted path. Any local user able to write to the shared temp directory could then recreate it and get PHP code of their choice executed as the account running the binary.

The attacker cannot trigger the removal and has to wait for a reload or for another process of the binary to stop. Setups using a private temp directory (`PrivateTmp=true`, single-user containers) are not affected. After a reload, affected sites also answered 404 until the directory was recreated.

Patches

Fixed in 1.13.5. Programs using the library without Caddy that set `EmbeddedAppPath` at build time and relied on `Shutdown()` to remove it must now call `frankenphp.RemoveEmbeddedApp()` at process exit. The default directory is kept in the temporary directory across runs. A build-time `EmbeddedAppPath` is still removed when the process exits, so it must not be shared by several processes.

Workarounds

Run the service with a private temp directory (for example `PrivateTmp=true` with systemd), or set `TMPDIR` to a directory only writable by the user running the binary. Avoid configuration reloads, and stop all processes of the binary together.

Details

`shutdown()` in `frankenphp.go` called `os.RemoveAll(EmbeddedAppPath)`. `FrankenPHPApp.Start()` in the Caddy module calls `frankenphp.Shutdown()` then `frankenphp.Init()` on every reload, and `Init()` does not extract the app again. The document root and worker paths kept pointing to the deleted directory. The directory name only depends on the effective user ID and the app checksum, so it is shared by all processes of a binary run by the same user, and visible in a listing of the temp directory.

The default directory is no longer removed: its name includes the checksum of the app, so it never holds another version, and it is already meant to be reused across runs. When `EmbeddedAppPath` is set at build time, the directory is removed by the new `RemoveEmbeddedApp()` function, which the Caddy module calls only when the process exits, so that an upgraded binary does not serve stale files.

Proof of concept

With `my-app` a binary embedding an app with `public/index.php`, run by `svc` (uid 1000) with a Caddyfile containing `php_server`:

svc$      ./my-app run --config Caddyfile
svc$      ./my-app reload --config Caddyfile --force   # /tmp/frankenphp_1000_<md5> is removed
attacker$ mkdir -p /tmp/frankenphp_1000_<md5>/public
attacker$ echo '<?php echo posix_geteuid();' > /tmp/frankenphp_1000_<md5>/public/index.php
anyone$   curl http://localhost:8080/                  # 1000
Credits

Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-OKK6GLE8.

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:L
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
3.8/ 10Bajo
Vector 3.8 (difícil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
github.com/dunglas/frankenphp≥ 1.13.2 ≤ 1.13.4
1.13.2
1.13.4
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.5 0 d v1.13.6 no afectada
Versiones corregidasv1.13.5
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-j2f3-wxf2-8qgv

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