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

GHSA-388M-835F-7723

Basic auth header overrides REMOTE_USER and other values set with the env directive

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

Parche disponible
Descargar PNG JSON
CVSS 3.1
6.8
Media
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N 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.
No es drama, es prevención. Hazme caso.Seguimiento de cerca: yo sé de mirar de cerca.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
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-388M-835F-7723 divulgada · CVSS 6.8 (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
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Impact

Values set with the `env` subdirective of `php_server`/`php` (or `frankenphp.WithRequestEnv()` in the library) are documented to take priority over the variables FrankenPHP populates automatically. Since 1.12.0, five variables are registered after the `env` values and replace them: `REMOTE_USER`, `CONTENT_TYPE`, `PATH_TRANSLATED`, `QUERY_STRING` and `REQUEST_METHOD`.

A common setup authenticates users in Caddy (`forward_auth`, mTLS, an auth plugin) and passes the verified identity to PHP with `env REMOTE_USER {http.auth.user.id}` or a similar placeholder. On affected versions, a client sending its own `Authorization: Basic` header replaces `$_SERVER['REMOTE_USER']` with an arbitrary, unverified user name. Applications that trust `$_SERVER['REMOTE_USER']` can then be accessed as any user.

Deployments that do not set any of the five variables with `env` are not affected.

Patches

Fixed in 1.13.5.

Workarounds

Pass the verified identity to PHP under a name FrankenPHP does not populate itself (for example `env AUTH_USER_ID {http.auth.user.id}`) and read that variable in the application, or strip the `Authorization` header before it reaches `php_server` when the application does not use it (`request_header -Authorization`).

Details

`go_register_server_variables()` merged the prepared environment at the end of its own work, but its C caller `frankenphp_register_variables()` then called `frankenphp_register_variables_from_request_info()`, which writes `CONTENT_TYPE`, `PATH_TRANSLATED`, `QUERY_STRING`, `REMOTE_USER` (from `SG(request_info).auth_user`, decoded by PHP from the `Authorization` header without any check) and `REQUEST_METHOD` with `zend_hash_update`. The ordering was introduced in 1.12.0 by a refactoring of the CGI variable registration.

The fix merges the prepared environment as the last step of `frankenphp_register_variables()`.

`PHP_AUTH_USER`, `PHP_AUTH_PW` and `PHP_AUTH_DIGEST` are registered by PHP itself after the SAPI variables, from the `Authorization` header, so `env` cannot override them (as with php-fpm). Don't use these names to pass a verified identity.

Proof of concept
example.com {
	tls {
		client_auth {
			mode require_and_verify
			trust_pool file /etc/caddy/client-ca.pem
		}
	}

	php_server {
		env REMOTE_USER {http.request.tls.client.subject}
	}
}
<?php
echo $_SERVER['REMOTE_USER'];

A client holding a valid certificate for `CN=alice` sends:

curl --cert alice.pem --key alice.key -u admin:x https://example.com/index.php

Affected versions print `admin`; patched versions print `CN=alice`.

Credits

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

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:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
5.9/ 10Medio
Vector 5.9 (moderada) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
github.com/dunglas/frankenphp≥ 1.12.0 ≤ 1.13.4
1.12.0
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-388m-835f-7723

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