GHSA-4R56-QJ88-H46C
Station Media user can add tracks to another station's playlists through the media edit endpoint (cross-station playlist injection)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-4R56-QJ88-H46C divulgada · CVSS 5.4 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
A user who has "manage station media" on one station can put their own track into any other station's playlist, including stations they have no role on at all. The other station's AutoDJ then queues that track and its title and artist show up in that station's public now-playing data.
Root cause:
- `PUT /api/station/{station_id}/file/{id}` (`FilesController::editAction`) takes a `playlists` array of playlist ids from the request body and passes it to `StationPlaylistMediaRepository::setPlaylistsForMedia()`.
- `setPlaylistsForMedia()` only scopes the delete side to the current station (`getPlaylistsForMedia($media, $station)`). For the add side it does `$this->em->find(StationPlaylist::class, $playlistId)` and inserts a `StationPlaylistMedia` row without checking that `$playlist->station` is the station in the URL.
- The batch endpoint does this correctly: `Files/BatchAction.php` looks the playlist up with `findOneBy(['station' => $station, 'id' => $playlistId])`, so the same request through `PUT /files/batch` is ignored. The single-file edit path is the one that was missed.
Playlist ids are small sequential integers, so the attacker does not need to learn them from the victim station.
Verification (live, on a disposable lab VM running the official ghcr.io/azuracast/azuracast image, rolling build a683c9d, 0.24.0). Admin created Station A (id 1) and Station B (id 2), a sequential songs playlist on Station B (id 3), and a role with only "view station management" + "manage station media" on Station A. User mallory was given that role.
Controls (as mallory):
- `GET /api/station/1/files` -> 200 (own station works)
- `GET /api/station/2/playlists`, `GET /api/station/2/playlist/3`, `GET /api/station/2/files` -> 403. Mallory has no access to Station B.
- Mallory uploads `injected.mp3` to Station A and sets its title to "MALLORY INJECTED TRACK" (normal use of her permission).
- `PUT /api/station/1/files/batch` with `{"do":"playlist","files":["injected.mp3"],"playlists":[3]}` -> 200, but admin `GET /api/station/2/playlist/3/order` stays `[]`. The batch path correctly ignores the foreign playlist.
Attack (as mallory):
- `PUT /api/station/1/file/1` with `{"playlists":[3]}` -> 200 "Record updated successfully."
- Admin `GET /api/station/2/playlist/3/order` now returns the track: `injected.mp3`, title "MALLORY INJECTED TRACK".
- Mallory still gets 403 on `GET /api/station/2/playlist/3/order`.
- After Station B was started, its AutoDJ picked the track: the Liquidsoap log for station_b shows `API nextsong - Response (200): annotate:title="MALLORY INJECTED TRACK",artist="Mallory",...,playlist_id="3":media:injected.mp3`, `GET /api/station/2/queue` lists it under playlist "B Morning Rotation", and the public `GET /api/nowplaying` shows it as `playing_next` for station_b. Because the file lives in Station A's storage, Liquidsoap then fails it (`Nonexistent file or ill-formed URI "/var/azuracast/stations/station_b/media/injected.mp3"`) and the slot is lost. If the two stations share a storage location, the audio itself plays on Station B.
- Mallory cannot take the entry back out (the delete side is station-scoped), so it stays until Station B's managers notice and remove it.
Impact: on a multi-station install (for example a host that gives each customer a station-level role), any station user with media rights can push entries into other stations' rotations and public now-playing metadata, and cause failed AutoDJ slots on those stations. No data from the other station is disclosed.
Suggested fix: in `setPlaylistsForMedia()` (or in `FilesController::editAction` before calling it), resolve each id with `findOneBy(['station' => $station, 'id' => $playlistId])` the same way `BatchAction` does, and skip ids that don't belong to the station.
This is a different code path from the published cross-station advisories (GHSA-qff7-q5fm-8p76 media download, GHSA-q3x9-qgv6-hgq3 waveform routes); both of those were route-level permission gaps, while this one is an unscoped id inside an otherwise correctly protected route.
Credit: kats1123 (Jona Kats).
This report was prepared with AI assistance and verified by hand on a live instance (the control-vs-attack results above were reproduced end to end, not inferred from source).
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistazuracast/azuracast |
Sin parche | — | — | — |
Arsenal 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-4r56-qj88-h46cLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
