GHSA-QH22-76GF-QWC4
SSRF filter bypass in Mastodon/Telegram/GroupMe/RadioReg webhook connectors (incomplete fix for GHSA-3jp3-3wqw-jvw4)
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-QH22-76GF-QWC4 divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
SSRF filter bypass in Mastodon/Telegram/GroupMe/RadioReg webhook connectors (incomplete fix for GHSA-3jp3-3wqw-jvw4)
Summary
The UserUrlFilter SSRF guard introduced in commit e9c4598 (Version20260807193430 migration) to fix GHSA-3jp3-3wqw-jvw4 was only applied to three of the seven webhook connectors that accept user-configurable URLs. The Mastodon, Telegram, GroupMe, and RadioReg connectors dispatch outbound HTTP requests to station-manager-supplied URLs without passing them through `UserUrlFilter::filterSensitiveUserUrl()`, bypassing the `filter_local_user_urls` protection entirely.
Affected component / versions
- Package: AzuraCast/AzuraCast
- Affected versions: all versions including the GHSA-3jp3-3wqw-jvw4 fix (tested against commit `e9c4598`)
- Vulnerable files:
- `backend/src/Webhook/Connector/Mastodon.php` (instance_url)
- `backend/src/Webhook/Connector/Telegram.php` (api)
- `backend/src/Webhook/Connector/GroupMe.php` (api)
- `backend/src/Webhook/Connector/RadioReg.php` (webhookurl)
Details
Root cause (CWE-918)
The GHSA-3jp3-3wqw-jvw4 fix replaced the old `AbstractConnector::getValidUrl()` with `UserUrlFilter::filterSensitiveUserUrl()` in three connectors:
- `Generic.php` -- FIXED
- `Discord.php` -- FIXED
- `MatomoAnalytics.php` -- FIXED
Four connectors with user-configurable destination URLs were not updated:
1. Mastodon.php (line 33, 49)
$instanceUri = Urls::parseUserUrl($instanceUrl, 'Mastodon Instance URL');
// ...
$response = $this->httpClient->request('POST', $instanceUri->withPath('/api/v1/statuses'), ...);`Urls::parseUserUrl()` only validates URL syntax (scheme is http/https). It does NOT resolve the hostname or check if the IP is private/loopback/reserved. The `instance_url` field is entirely user-controlled.
2. Telegram.php (line 44-49)
$apiUrl = Types::stringOrNull($config['api'], true);
$apiUrl = (null !== $apiUrl) ? rtrim($apiUrl, '/') : 'https://api.telegram.org';
$webhookUrl = $apiUrl . '/bot' . $botToken . '/sendMessage';
// ...
$response = $this->httpClient->request('POST', $webhookUrl, ...);The `api` config field defaults to `https://api.telegram.org` but is user-overridable. No SSRF filter applied.
3. GroupMe.php (line 43-48)
$apiUrl = Types::stringOrNull($config['api'], true);
$apiUrl = (null !== $apiUrl) ? rtrim($apiUrl, '/') : 'https://api.groupme.com/v3';
$webhookUrl = $apiUrl . '/bots/post';
// ...
$response = $this->httpClient->request('POST', $webhookUrl, ...);Same pattern as Telegram. User-overridable API URL, no SSRF filter.
4. RadioReg.php (line 30, 54)
if (empty($config['apikey']) || empty($config['webhookurl'])) { ... }
// ...
$response = $this->httpClient->post($config['webhookurl'], ...);`webhookurl` is entirely user-controlled. No SSRF filter applied.
Trust boundary
All four connectors are accessible to any user with the station-scoped `StationPermissions::WebHooks` permission -- the same low-privilege role identified in GHSA-3jp3-3wqw-jvw4. The test webhook endpoint (`PUT /station/{id}/webhook/{id}/test`) allows immediate dispatch without waiting for a real event.
Attack chain
- Attacker has `WebHooks` permission for any station.
- Attacker creates a Mastodon-type webhook with `instance_url` set to `http://169.254.169.254` (cloud metadata) or `http://172.17.0.1:3306` (Docker internal MySQL).
- `Urls::parseUserUrl()` validates syntax only. `UserUrlFilter::filterSensitiveUserUrl()` is never called.
- Attacker triggers test dispatch via `PUT /station/{id}/webhook/{id}/test`.
- The server sends `POST http://169.254.169.254/api/v1/statuses` with the NowPlaying JSON body.
- Response is logged via `logHttpResponse()`.
The same attack works with Telegram (set `api` to internal URL), GroupMe (set `api` to internal URL), and RadioReg (set `webhookurl` to internal URL).
Impact
A station-level user with only the `WebHooks` permission can make the AzuraCast server issue outbound HTTP requests to loopback, private-network, and cloud-metadata endpoints, bypassing the SSRF guard that was specifically introduced to prevent this. This is a direct incomplete fix of GHSA-3jp3-3wqw-jvw4.
Remediation
Apply `UserUrlFilter::filterSensitiveUserUrl()` to ALL webhook connectors that accept user-configurable URLs, not just Generic/Discord/MatomoAnalytics. The Mastodon `instance_url`, Telegram `api`, GroupMe `api`, and RadioReg `webhookurl` fields should all pass through the filter before being used in HTTP requests.
Credit
Reported by tonghuaroot (tonghuaroot@gmail.com).
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-qh22-76gf-qwc4Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
