llamaCVEVulnerability Intelligence
/
Advisory · GitHub

GHSA-RRJX-WRHF-8V47

SSRF / local file read in remote playlist AutoDJ fetch (file_get_contents) allows a station Media user to read host files and internal HTTP responses via the queue API

Sin parche publicado
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición103 dDesde la divulgación, 7 ago 2026, 9:49 p. m.
Detección102 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
8 ago 26
18 nov 26
20 nov 26
8 ago 26
3 sept 26
29 sept 26
25 oct 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-RRJX-WRHF-8V47 divulgada
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

A station user with Media permission can set a remote playlist URL to `file:///etc/passwd` (or `http://127.0.0.1/...`). When AutoDJ builds the queue, the backend fetches that URL with raw `file_get_contents()` with no scheme allowlist and no private/loopback/metadata IP policy. Playlist lines are stored in `StationQueue.autodj_custom_uri` and returned by `GET /api/station/{station_id}/queue` to anyone with Broadcasting (often the same station-manager role). That turns an intentional "fetch remote M3U over HTTP" feature into host file disclosure and non-blind internal SSRF.

Affected

  • Product: AzuraCast
  • Tested: commit `3f9d6ff626745d9aa20a7158eec7a8583ed635e0` (rolling), Docker
  • Component: AutoDJ remote playlist fetch (`backend/src/Radio/AutoDJ/QueueBuilder.php` → `getMediaFromRemoteUrl()`)
  • Gate: Playlist `source=remote_url` and `remote_type=playlist` (`StationPlaylist::isPlayable`)
  • Runtime: Stock PHP `allow_url_fopen=1`; Docker PHP config does not disable it

Prerequisites

  • Authenticated station account with Media (set playlist) and Broadcasting (read queue). Frequently the same role.
  • Ability to create/update a playlist with `source=remote_url`, `remote_type=playlist`, `is_enabled=true`.
  • AutoDJ must select that playlist and build a queue entry (normal station operation).

Impact

  • Local file read: `remote_url=file:///etc/passwd` (or `/etc/hostname`, app `.env`, other files readable by the web container UID). Readable lines appear as queue URIs after M3U/PLS parsing.
  • Internal SSRF: `http://127.0.0.1/...`, RFC1918, link-local / cloud metadata style targets. Response body lines that look like playlist entries leak via the queue API.
  • Who is hurt: Operators of multi-user / multi-station AzuraCast where a station Media manager is not a host admin. Single-admin self-host installs still expose the host FS and loopback through a feature that was never meant to accept `file://`.
  • Not by design: Remote M3U over http/https for AutoDJ is intentional. Passing the URL straight into `file_get_contents` with PHP wrappers and no IP policy is the defect.

Attack path

  1. Attacker holds station Media + Broadcasting.
  2. Attacker creates/updates a playlist with `source=remote_url`, `remote_type=playlist`, `remote_url=file:///etc/passwd` (or an internal HTTP URL).
  3. AutoDJ selects the playlist and runs `getMediaFromRemoteUrl()`.
  4. Attacker reads `GET /api/station/{id}/queue` and observes host file / internal response lines in `autodj_custom_uri`.

Steps to reproduce

Environment: AzuraCast Docker at commit `3f9d6ff`, station with Media + Broadcasting. Confirmed end-to-end on 2026-07-24, including a dedicated non-admin Media+Broadcasting role (no Super Admin).

  1. Authenticate as a station Media user and create a remote playlist:
POST /api/station/{station_id}/playlists
X-API-Key: <media-key>
Content-Type: application/json

{
  "name": "ssrf-lfi-test",
  "source": "remote_url",
  "remote_type": "playlist",
  "remote_url": "file:///etc/passwd",
  "is_enabled": true,
  "type": "default",
  "weight": 99,
  "order": "shuffle"
}

Alternate payloads: `file:///etc/hostname`, `file:///etc/hosts`.

  1. Ensure the playlist is the playable AutoDJ source (disable competing song playlists if needed). Wait for a normal AutoDJ queue build tick, or in a lab use `PUT /api/admin/debug/station/{station_id}/clearqueue` (admin) to force rebuild. Production path is the normal AutoDJ/`BuildQueue` sync; admin clearqueue is not required for the bug.
  1. As Broadcasting (same principal is fine), read the queue:
GET /api/station/{station_id}/queue
X-API-Key: <media-key>
  1. Observe `autodj_custom_uri` on queued items. Host file lines (or internal HTTP playlist lines) appear as the URI strings returned from `PlaylistParser::getSongs()`.

Expected: Only `http`/`https` remote playlist URLs are fetched; `file://` and internal targets are rejected.
Actual: Unrestricted `file_get_contents($playlist->remote_url)`; file/HTTP body lines leak via the queue API.

Root cause

When `remote_type` is playlist (not raw stream), AutoDJ loads the remote URL with an unrestricted PHP fetch:

// backend/src/Radio/AutoDJ/QueueBuilder.php (getMediaFromRemoteUrl)
$playlistRemoteUrl = $playlist->remote_url;
if (null !== $playlistRemoteUrl) {
    $playlistRaw = file_get_contents($playlistRemoteUrl);
    if (false !== $playlistRaw) {
        $mediaQueue = PlaylistParser::getSongs($playlistRaw);
    }
}

There is no scheme allowlist (`http`/`https` only), no block on `file://` / `phar://` / other wrappers, and no private/loopback/link-local/metadata IP policy (unlike partial checks elsewhere, e.g. webhook `isLinkLocal`).

Parsed entries are written onto the queue:

$stationQueueEntry->autodj_custom_uri = $mediaUri;

`PlaylistParser` treats non-comment lines as songs (so `/etc/passwd` lines become "URIs"). `QueueController` exposes `autodj_custom_uri` on the station queue API. The playable gate for remote sources is `remote_type === Playlist` in `StationPlaylist::isPlayable()`.

Suggested fix

  1. Allowlist schemes: only `http` and `https`. Reject `file://`, `phar://`, `data://`, and any other wrapper.
  2. SSRF policy: resolve hostnames and block loopback, RFC1918, link-local, and cloud metadata addresses; account for DNS rebinding and redirect-after-validate.
  3. Prefer Guzzle (already used elsewhere) with an SSRF-aware middleware instead of `file_get_contents` for user-controlled URLs.
  4. Optional defense-in-depth: disable `allow_url_fopen` in the web container if nothing else requires it; never treat queue URIs as a channel for raw fetched body lines from untrusted URLs.

### POC screenshot
<img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/ddd45e04-d779-47d6-8bfb-ea13fb9d89dc" />

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Remediación

Estado del parche por paquete

La fuente no informa paquetes ni versiones corregidas.

Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/AzuraCast/AzuraCast/security/advisories/GHSA-rrjx-wrhf-8v47

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