GHSA-8W86-H2H5-W4CC
Station API 'Anonymous Functions' route group enforces only authentication, not per-station permissions, for non-public stations
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-8W86-H2H5-W4CC divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
## Summary
The Anonymous Functions route group in backend/config/routes/api_station.php (GET /, /nowplaying, /schedule, /requests, /request/{media_id}, /ondemand, /ondemand/download/{media_id}, /art/{media_id}) is guarded by the StationPublicApi middleware only. For stations with enable_public_api=false, this middleware falls back to RequireLogin, which merely checks that *any* user is authenticated — it never consults AzuraCast's per-station permission model that guards every other station API route (App\Middleware\Permissions).
Consequently, any authenticated user can read and interact with every non-public station by changing the station_id path parameter, regardless of the station permissions assigned to their account.
## Affected version(s)
Current master (main branch) as of 2026-11-05; all releases that ship App\Middleware\StationPublicApi with the RequireLogin fallback.
## PoC
1. Deploy AzuraCast with two stations. Station 1: enable_public_api=false, user A granted access to station 1 only. Station 2: enable_public_api=false, user A has no role on it.
2. Log in as user A and request any station-2 endpoint of the group:
GET /api/station/2/ondemand -> lists station 2 media library
GET /api/station/2/ondemand/download/{media_id} -> downloads station 2 media file
POST /api/station/2/request/{media_id} -> submits a song request into station 2
All return 200 instead of 403 because StationPublicApi (RequireLogin fallback) passes and no Permissions check follows.
Code path: backend/src/Middleware/StationPublicApi.php — `if (!$station->enable_public_api) { return parent::__invoke(...); }` with parent RequireLogin only calling `$request->getUser()`.
## Impact
Cross-station authorization bypass (CWE-862): authenticated users can enumerate non-public stations, list and download their on-demand media libraries, read schedule/now-playing data, and write song requests into stations they were never granted access to. On multi-tenant deployments (networks hosting distinct brands/stations) this exposes private station content and allows unauthorized interaction.
## Remediation
Apply the same station-level Permissions middleware used by the remaining station API routes to authenticated (non-anonymous) access within this route group, so a logged-in user without the station's permission still receives 403.
--
Wei Wang (王威), China Academy of Information and Communications Technology (CAICT)
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistazuracast/azuracast |
Corregida | 0.24.0 | — | — |
0.24.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/AzuraCast/AzuraCast/security/advisories/GHSA-8w86-h2h5-w4ccLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
