GHSA-Q9CC-MP52-VRP9
Unauthenticated on-demand download endpoint bypasses playlist On-Demand restrictions
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-Q9CC-MP52-VRP9 divulgada · CVSS 5.9 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
AzuraCast’s public On-Demand download endpoint allows unauthenticated users to download station media files that are not included in any On-Demand-enabled playlist.
The public On-Demand list endpoint only exposes media from playlists where `include_in_on_demand = 1`. However, the download endpoint accepts any valid `StationMedia.unique_id` belonging to the station and streams the file without checking whether the media belongs to an enabled On-Demand playlist.
As a result, a public listener can bypass the station operator’s intended On-Demand access control and download media that is intentionally excluded from the On-Demand player.
Affected endpoint
GET /api/station/{station_id}/ondemand/download/{media_id}Vulnerability type
Missing authorization / broken object-level authorization
CWE
CWE-862: Missing Authorization
Impact
An unauthenticated attacker can download station media files that are not intended to be available through On-Demand.
This may expose private, licensed, unreleased, or otherwise non-downloadable audio content.
Required privileges
None.
The attack is unauthenticated.
Attack conditions
The issue is exploitable when:
- The station has On-Demand streaming enabled.
- The attacker knows or obtains the `unique_id` of a media item in the station.
- The media item belongs to the station but is not assigned to an On-Demand-enabled playlist.
Tested environment
AzuraCast: Rolling Release cfc70a2e
Deployment: Docker
Station short name: teststationTechnical details
In my test setup, I created two playlists.
Private playlist
name: private_playlist
is_enabled: 1
include_in_on_demand: 0
media: private_secret_test.mp3Public On-Demand playlist
name: public_ondemand_playlist
is_enabled: 1
include_in_on_demand: 1
media: public_ondemand_test.mp3Database mapping from the test instance:
2 private_playlist 1 0 a7a9a1e95f9ea69ce255bf6b private_secret_test.mp3 PRIVATE_SECRET_TEST PRIVATE_ARTIST
3 public_ondemand_playlist 1 1 6094e10b5d02068825f8e362 public_ondemand_test.mp3 PUBLIC_ONDEMAND_TEST PUBLIC_ARTISTThe private media had this `unique_id`:
a7a9a1e95f9ea69ce255bf6bThe public On-Demand media had this `unique_id`:
6094e10b5d02068825f8e362Reproduction steps
1. Create a station
Create a station with the following settings enabled:
Enable Public Pages: ON
Enable On-Demand Streaming: ON
Enable Downloads on On-Demand Page: ON2. Create two playlists
Create a playlist that is not included in On-Demand:
Playlist name: private_playlist
Include in On-Demand Player: OFFCreate a playlist that is included in On-Demand:
Playlist name: public_ondemand_playlist
Include in On-Demand Player: ON3. Upload two media files
Upload two test media files:
private_secret_test.mp3
public_ondemand_test.mp3Assign them as follows:
private_secret_test.mp3 -> private_playlist
public_ondemand_test.mp3 -> public_ondemand_playlist4. Confirm playlist mapping
The test database mapping confirmed that the private media is in a playlist where `include_in_on_demand = 0`, while the public media is in a playlist where `include_in_on_demand = 1`.
2 private_playlist 1 0 a7a9a1e95f9ea69ce255bf6b private_secret_test.mp3 PRIVATE_SECRET_TEST PRIVATE_ARTIST
3 public_ondemand_playlist 1 1 6094e10b5d02068825f8e362 public_ondemand_test.mp3 PUBLIC_ONDEMAND_TEST PUBLIC_ARTIST5. Confirm the private media is not listed in the public On-Demand API
Request:
GET /api/station/teststation/ondemandResponse:
[
{
"track_id": "6094e10b5d02068825f8e362",
"download_url": "/api/station/1/ondemand/download/6094e10b5d02068825f8e362",
"media": {
"id": "55329041237695a7575a8aa89687765c",
"art": "http://localhost/api/station/teststation/art/6094e10b5d02068825f8e362",
"custom_fields": [],
"text": "PUBLIC_ARTIST - PUBLIC_ONDEMAND_TEST",
"artist": "PUBLIC_ARTIST",
"title": "PUBLIC_ONDEMAND_TEST",
"album": "",
"genre": "",
"isrc": "",
"lyrics": ""
}
}
]The private media ID was not present in the On-Demand list:
PRIVATE_ID_NOT_IN_ONDEMAND_LIST6. Download the private media directly without authentication
Request:
GET /api/station/teststation/ondemand/download/a7a9a1e95f9ea69ce255bf6bResponse:
HTTP/1.1 200 OK
Server: nginx
Content-Type: audio/mpeg
Content-Length: 64649
Content-Disposition: attachment; filename="private_secret_test.mp3"; filename*=UTF-8''private_secret_test.mp3
Access-Control-Allow-Origin: *
Accept-Ranges: bytesThe downloaded file was a valid MP3:
private-downloaded.mp3: Audio file with ID3 version 2.4.0, contains: MPEG ADTS, layer III, v1, 56 kbps, 44.1 kHz, Monaural
de0736a31728b739e457b6b3f787129c115b1eeb72bb0e8a4587652d208f123f private-downloaded.mp3Expected behavior
The download endpoint should only stream media that belongs to at least one enabled playlist where `include_in_on_demand = 1`, matching the behavior of the public On-Demand list endpoint.
If the media is not included in an On-Demand-enabled playlist, the endpoint should return `404 Not Found` or `403 Forbidden`.
Actual behavior
The On-Demand list endpoint correctly enforces the playlist-level On-Demand restriction.
However, the download endpoint only checks that the media belongs to the station. It does not verify whether the media belongs to an enabled On-Demand playlist.
This allows unauthenticated users to download media that is intentionally excluded from the On-Demand player.
Why this is a security issue
The “Include in On-Demand Player” playlist setting is an access-control boundary for public On-Demand availability.
Station operators can intentionally exclude certain playlists from On-Demand while still allowing those tracks to be used for normal radio playback. The public list endpoint respects this boundary, but the actual download endpoint does not.
Because the download endpoint is the enforcement point for file access, this creates a direct bypass of the station operator’s intended access-control decision.
Potential fix
The On-Demand download action should verify that the requested media belongs to at least one enabled playlist where `include_in_on_demand = 1` before streaming the file.
For example, after resolving the media by `unique_id`, the download action should check playlist membership using the same On-Demand eligibility rules as the list endpoint:
station_media belongs to station
AND playlist is enabled
AND playlist.include_in_on_demand = 1
AND playlist contains the requested mediaIf the media does not satisfy those conditions, the endpoint should return `404 Not Found` or `403 Forbidden`.
Reporter credit
Tatsuki Onishi
GitHub: @ikkyu3
If you confirm this issue, could you please publish it as a GitHub Security Advisory and request a CVE ID if it meets your criteria?
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Estado del parche por paquete
La fuente no informa paquetes ni versiones corregidas.
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-q9cc-mp52-vrp9Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
