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

GHSA-Q3X9-QGV6-HGQ3

Station-scoped waveform endpoints (GET/POST .../waveform/{media_id}) carry no Permissions middleware, unlike every sibling media route, allowing any authenticated user to read and overwrite another station's cached waveform data

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
5.4
Media
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N 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, 11:23 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
4 nov 26
12 nov 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-Q3X9-QGV6-HGQ3 divulgada · CVSS 5.4 (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

GET and POST /api/station/{station_id}/waveform/{media_id} (GetWaveformAction /
PostCacheWaveformAction) are registered in backend/config/routes/api_station.php
inside the "Authenticated Functions" group, gated only by Middleware\RequireLogin.
Unlike every other station-scoped route in the same group (/quota, /art,
/files/*, /mounts/*, /reports/*, /webhooks/*, etc.), neither carries a
Middleware\Permissions(StationPermissions::X, true) gate. GetStation (which
resolves {station_id}) performs only an entity lookup, and neither controller
action does an inline ACL check either. Any authenticated user -- with zero
station assignment of any kind -- can therefore read another station's cached
waveform JSON for any media_id, and overwrite it with arbitrary attacker-
supplied content.

Ecosystem / Package

Ecosystem: Packagist / Composer (self-hosted PHP/Slim app)
Package: azuracast/azuracast

Affected versions

Confirmed against the main branch (rolling release) as of 2026-09-04, verified
by booting the real application and introspecting its live, compiled route
table. No version-gated history visible for these two routes.

Severity / CVSS

CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Suggested severity: Medium (~5.5)

Rationale: network-reachable, low complexity, requires only the lowest
privilege tier (any logged-in account, no station grant needed) -- PR:L. No
user interaction. Limited confidentiality impact -- cached waveform peak/shape
JSON for another station's media, not the media file itself or credentials
(C:L). Limited integrity impact -- the write path lets an attacker corrupt one
specific per-media cache file per station with attacker-controlled JSON,
not an arbitrary path or the underlying media (I:L). No availability impact
beyond the minor forced-computation side effect on cache miss.

Details (paste as-is)

backend/config/routes/api_station.php ("Authenticated Functions" group,
RequireLogin-gated):

  $group->get('/quota[/{type}]', Controller\Api\Stations\GetQuotaAction::class)
      ->setName('api:stations:quota')
      ->add(new Middleware\Permissions(StationPermissions::View, true));      // sibling: gated

  $group->get(
      '/waveform/{media_id:[a-zA-Z0-9\-]+}[-{timestamp}.json]',
      Controller\Api\Stations\Waveform\GetWaveformAction::class
  )->setName('api:stations:media:waveform')
      ->add(new Middleware\Cache\SetStaticFileCache());                       // NO Permissions

  $group->post(
      '/waveform/{media_id:[a-zA-Z0-9\-]+}',
      Controller\Api\Stations\Waveform\PostCacheWaveformAction::class
  )->setName('api:stations:media:waveform-cache');                            // NO middleware at all

backend/src/Middleware/GetStation.php resolves {station_id} with only a
repository lookup, no permission check:

  public function __invoke(ServerRequest $request, RequestHandlerInterface $handler): ResponseInterface
  {
      $id = RouteContext::fromRequest($request)->getRoute()?->getArguments()['station_id'] ?? null;
      if (!empty($id)) {
          $record = $this->stationRepo->findByIdentifier($id);
          if ($record instanceof Station) {
              $request = $request->withAttribute(ServerRequest::ATTR_STATION, $record);
          }
      }
      return $handler->handle($request);
  }

backend/src/Controller/Api/Stations/Waveform/GetWaveformAction.php streams the
file scoped only by $request->getStation() (any station in the URL) and the
attacker-supplied media_id:

  $station = $request->getStation();
  $media = $this->mediaRepo->requireByUniqueId($mediaId, $station);
  $waveformPath = StationMedia::getWaveformPath($media->unique_id);
  if (!$fsMedia->fileExists($waveformPath)) {
      $this->mediaRepo->updateWaveform($media);   // forces computation on the victim station
  }
  return $response->streamFilesystemFile($fsMedia, $waveformPath, null, 'inline');

backend/src/Controller/Api/Stations/Waveform/PostCacheWaveformAction.php
writes attacker-controlled data with zero permission check:

  $waveformData = Types::arrayOrNull($request->getParsedBody());   // fully attacker-controlled
  $this->mediaRepo->saveWaveformData($media, $waveformData);       // overwrites victim station's cache

StationMediaRepository::saveWaveformData() writes the attacker's JSON
(re-encoded, not otherwise validated) to waveforms/{media->unique_id}.json on
that station's filesystem.

Vulnerability class: CWE-862 (Missing Authorization).

Impact

- Cross-station information disclosure: GET .../waveform/{media_id} streams
  the victim station's cached waveform JSON for any media_id the attacker can
  guess/enumerate, forcing computation+caching on a miss (minor resource-
  consumption side effect against a station the attacker has no access to).
- Cross-station data tampering: POST .../waveform/{media_id} overwrites that
  station's cached waveform JSON with arbitrary attacker content, corrupting
  the Visual Cue Editor data the victim station's own authorized users will
  next see/edit.
- Requires only the lowest privilege tier -- any authenticated account, zero
  station assignment.
- Every other route on the same StationMedia resource (/art, /files/*,
  /quota) correctly requires Permissions(Media|View, true), confirming this
  is a specific omission, not an intentionally public feature.

Proof of Concept

Dynamic: boots the real, unmodified AzuraCast Slim application via
App\AppFactory::createApp() -- the same bootstrap the production/CLI
entrypoints use, firing the real App\Event\BuildRoutes listener chain that
loads config/routes/api_station.php verbatim -- inside a php:8.4-cli Docker
container (composer install). The live, compiled Slim\Routing\Route objects
are introspected via reflection to read each route's actual middleware
stack, proving the gap in the running application's own compiled route
table, not just a reading of source text.

=== Live route-table middleware audit (real, booted AzuraCast App container) ===

api:stations:media:waveform
  GET  /api/station/{id}/waveform/{media_id}      -- streams cached waveform JSON for any media_id
  route-level middleware found on the LIVE route object: App\Middleware\Cache\SetStaticFileCache
  App\Middleware\Permissions present: *** NO ***

api:stations:media:waveform-cache
  POST /api/station/{id}/waveform/{media_id}      -- OVERWRITES cached waveform JSON with attacker-supplied body
  route-level middleware found on the LIVE route object: (none)
  App\Middleware\Permissions present: *** NO ***

api:stations:quota
  GET  /api/station/{id}/quota                    -- sibling: requires Permissions(View, true)
  route-level middleware found on the LIVE route object: App\Middleware\Permissions
  App\Middleware\Permissions present: YES

Full script: poc/poc_route_middleware_check.php.

Note: a full HTTP walkthrough (real MySQL/Redis + two real low-privilege
users) would additionally require AzuraCast's full runtime, normally
provisioned by its own external installer/Docker images rather than this
source repo -- not practical within the available time. The above instead
dynamically proves the exact mechanism a real HTTP request would hit (the
live, compiled per-request middleware stack), and the controller/middleware
source quoted above (read in full) independently confirms no other
authorization check exists anywhere else in the request path.

Suggested remediation

1. Add ->add(new Middleware\Permissions(StationPermissions::Media, true)) to
   both the api:stations:media:waveform and api:stations:media:waveform-cache
   route registrations in backend/config/routes/api_station.php, matching the
   sibling /art, /quota, and /files/* routes.
2. Add a regression test asserting every route inside the RequireLogin-gated
   station group that touches a StationMedia/station-owned resource carries a
   Permissions middleware -- this is the second time this exact class of gap
   has produced a reportable finding in this codebase's history (cf.
   GHSA-qff7-q5fm-8p76).

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:L
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida
azuracast/azuracasttodas
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-q3x9-qgv6-hgq3

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