GHSA-CP2Q-FC46-38F5
Extension Workers.SendRequest() runs arbitrary files when its worker is not running
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:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-CP2Q-FC46-38F5 divulgada · CVSS 3.7 (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
Only custom builds that link a Go extension using the experimental extension workers API and forwarding client requests with `Workers.SendRequest()` are affected. Stock binaries and Docker images are not affected.
When the extension's worker was not running, `SendRequest()` did not fail: the request was served as a regular PHP request, with the server's working directory as document root and the request path as script name. A remote client could then run any PHP file below the working directory, including files outside the document root, and read other files there (such as `.env`) verbatim.
With Caddy, this state is reached after the configuration is reloaded twice: `FrankenPHPApp.Stop()` cleared the workers registered with `caddy.RegisterWorkers()`, and since Caddy stops the old app after starting the new one, the workers were missing from the second reload on. It is also reached with the library alone after `Shutdown()` and `Init()` without the extension's option, or when the workers are registered with an empty name. In these states `SendMessage()` blocked until its context ended.
Patches
Fixed in 1.13.5.
Workarounds
Restart the server instead of reloading its configuration. Extensions can also refuse to forward requests when `NumThreads()` returns 0, and must register their workers with a non-empty name.
Details
`SendRequest()` looked up its worker by name with `WithWorkerName()`, which left the worker unset when no worker had that name. The request then fell through to the regular request path.
`WithWorkerName()` now returns an error for an unknown worker name, and `SendRequest()` and `SendMessage()` return an error when the handle's worker was not started by the running instance. A call queued on a worker stopped in the meantime fails too, and the autoscaler no longer starts threads for it. Extension workers can still be missing after a reload until a separate fix lands; calls to them now return an error instead of running a script.
Proof of concept
An extension registers its workers in `init()` and serves a route with them:
var worker = caddy.RegisterWorkers("reports", "reports-worker.php", 2)
func (h Reports) ServeHTTP(w http.ResponseWriter, r *http.Request, _ caddyhttp.Handler) error {
return worker.SendRequest(w, r)
}example.com {
root public/
handle_path /reports/* {
reports
}
php_server
}After running `frankenphp reload --force` twice, `GET /reports/bin/maintenance.php` executes `bin/maintenance.php` from the working directory, outside the document root.
Credits
Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-XRD9JA0Y.
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-cp2q-fc46-38f5Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
