GHSA-WPFX-2C2Q-HJQ9
Host header injection via SERVER_NAME fallback poisons the OIDC redirect_uri (incomplete fix of CVE-2026-54588)
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:L
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-WPFX-2C2Q-HJQ9 divulgada · CVSS 9.6 (GitHub) | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
## Summary
Poweradmin builds the OIDC `redirect_uri` from `$_SERVER['SERVER_NAME']` when `interface.application_url` is unset (the default). Under the shipped FrankenPHP/Caddy Docker image and Apache with the default `UseCanonicalName Off`, `SERVER_NAME` comes from the client `Host` header, so an attacker can make the IdP send a victim's authorization code to an attacker host.
## Root Cause
The CVE-2026-54588 fix (introduced in v4.2.4 / v4.3.3) swapped `HTTP_HOST` for `$_SERVER['SERVER_NAME']` in the host-fallback path. This sink reads `SERVER_NAME` raw, with no hostname check or allowlist:
- `OidcService::getCallbackUrl()` (`OidcService.php:524`) — builds OIDC `redirect_uri`. Reached pre-auth via `GET /oidc/login` (`OidcLoginController` ctor calls `parent::__construct($request, false)`).
`interface.application_url` defaults to `''` (`settings.defaults.php:149`), so the safe branch is skipped in every sink. There is no global Symfony `trusted_hosts`/`trusted_proxies` guard, and `BaseController`'s host allowlist is `$allowedHosts = []` (disabled).
Deployment host-source (verified): FrankenPHP `cgi.go` sets `$_SERVER['SERVER_NAME']` from `net.SplitHostPort(request.Host)` = the client `Host` header; the shipped `Dockerfile` bakes a hostname-less Caddy site block (`:{$SERVER_PORT:80}`) so nothing pins it. Apache with the documented-default `UseCanonicalName Off` likewise derives SERVER_NAME from the client Host. (Stock nginx from the shipped `nginx.conf.example` pins `server_name your-domain.com` and is NOT affected.)
## Impact
- OIDC (HIGH): poisoned `redirect_uri` delivers the victim's authorization code/token to the attacker under the same loose-IdP-registration threat model under which CVE-2026-54588 was accepted → account takeover.
Proof of Concept
# OIDC redirect_uri poisoning (pre-auth):
GET /oidc/login HTTP/1.1
Host: evil.tld
# FrankenPHP sets $_SERVER['SERVER_NAME']='evil.tld'; getCallbackUrl() skips the unset
# application_url branch and reads SERVER_NAME raw -> redirect_uri=https://evil.tld/oidc/callback
# is sent to the IdP; the victim's auth code is delivered to evil.tld.## Attack Chain
1. Entry: `GET /oidc/login` (pre-auth; `OidcLoginController` ctor `parent::__construct($request, false)`) with `Host: evil.tld`. Guard: none at ingress.
2. Source: request reaches the official FrankenPHP Docker image. Guard: shipped Caddyfile pins no hostname (`:{$SERVER_PORT:80}`). Bypass proof: FrankenPHP `cgi.go` sets `$_SERVER['SERVER_NAME'] = SplitHostPort(request.Host)` = `evil.tld`.
3. Check: `OidcService::getCallbackUrl()` `:511` `application_url` branch. Guard: use configured URL if set. Bypass proof: `application_url` defaults to `''` (`settings.defaults.php:149`) → branch skipped → falls to `:524`.
4. Sink: `:524` `getServerParam('SERVER_NAME','localhost')` returned verbatim (`Request.php:73-76`), no `isValidHostname`/allowlist → `redirect_uri = https://evil.tld/oidc/callback`, embedded in the IdP authorization request.
5. Impact: IdP delivers the victim's authorization code to the attacker host → account takeover.
## Bypass Evidence
- Seed advisory GHSA-3735-5339-xfwx describes `HTTP_HOST` only; the string `SERVER_NAME` does not appear in it. Its affected ranges (`< 4.2.4` and `>= 4.3.0, < 4.3.3`) are BEFORE the fix; the SERVER_NAME sinks exist FROM the fix version onward (confirmed present on v4.2.4, v4.2.5, v4.3.3, v4.3.4, v4.4.0 via `git show <tag>:<file>`). Inverted version range + different source header + not mentioned in advisory = incomplete-fix bypass, not a duplicate.
- FrankenPHP `cgi.go` SERVER_NAME=`SplitHostPort(r.Host)` confirmed from source; shipped `Dockerfile`/Caddyfile has no host to pin. Apache `UseCanonicalName Off` is the documented default. Each sink reads SERVER_NAME raw (no validation), unlike `DocsController.php:267` which validates and whose comment concedes SERVER_NAME "could still let unexpected values through."
## Affected Versions
`>= 4.2.4` (SERVER_NAME fallback introduced by the CVE fix), spanning the 4.2.x (`>= 4.2.4`), 4.3.x (`>= 4.3.3`), and 4.4.x (`>= 4.4.0`) lines. 4.3.0 to 4.3.2 still carry the older `HTTP_HOST` shape and are covered by GHSA-3735-5339-xfwx / CVE-2026-54588.
## Deployment note
Only FrankenPHP/official-Docker and Apache-default derive SERVER_NAME from the client Host. Stock nginx (shipped `nginx.conf.example`) pins `server_name` to the configured directive and is NOT affected — advisory text must state this to avoid overstating nginx.
---
Reported by zx (Jace) — GitHub: @manus-use
Split note: this advisory originally covered three sinks with the same fallback. Each needed its own change, so the SAML and logout sinks are now tracked separately: GHSA-c25f-hc8c-2jmw (SAML) and GHSA-hgmw-rc66-m59f (logout redirect).
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 |
|---|---|---|---|---|
Packagistpoweradmin/poweradmin |
Corregida | 4.2.6, 4.3.5, 4.4.1 | — | — |
4.2.64.3.54.4.1Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/poweradmin/poweradmin/security/advisories/GHSA-wpfx-2c2q-hjq9Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
