GHSA-3MCM-XM6C-FJ44
SSRF filter bypass via HTTP redirect in Mastodon/Telegram/GroupMe/RadioReg webhook connectors (incomplete fix for GHSA-3jp3/GHSA-qh22)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-3MCM-XM6C-FJ44 divulgada · CVSS 6.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
## Summary
The `UserUrlFilter::filterSensitiveUserUrl()` SSRF guard (added for GHSA-3jp3-3wqw-jvw4 and extended to all seven connectors for GHSA-qh22-76gf-qwc4) validates only the initial, user-supplied URL's host. The shared Guzzle client built in `backend/config/services.php` (`GuzzleFactory`) does not set `allow_redirects`, so it follows HTTP 3xx redirects by default, and redirect targets are never re-validated by the filter.
Three connectors defend against this with `RequestOptions::ALLOW_REDIRECTS => false` (`Generic.php`, `Discord.php`, `MatomoAnalytics.php`). The remaining four user-URL connectors do not, and are bypassable via redirect:
- `backend/src/Webhook/Connector/Mastodon.php` (`instance_url`)
- `backend/src/Webhook/Connector/Telegram.php` (custom `api`)
- `backend/src/Webhook/Connector/GroupMe.php` (custom `api`)
- `backend/src/Webhook/Connector/RadioReg.php` (`webhookurl`)
This is a distinct root cause from GHSA-3jp3 (IP-range coverage) and GHSA-qh22 (filter not applied at all): here the filter IS applied but is bypassed by a redirect. Neither prior advisory mentions redirects.
## Trust boundary
All four connectors are reachable by any user with the station-scoped `StationPermissions::WebHooks` permission — the same low-privilege role identified in GHSA-3jp3/GHSA-qh22. The test endpoint `PUT /station/{id}/webhook/{id}/test` dispatches immediately. The internal response body is captured by `AbstractConnector::logHttpResponse()` and returned via `GET /station/{id}/webhooks/{id}/test-log/{path}` when the user's ACL grants `GlobalPermissions::View` (full read); otherwise a status/error oracle remains and the internal request side effects still occur.
## Attack chain
1. Attacker holds `WebHooks` permission on any station.
2. Creates a Mastodon webhook with `instance_url = https://attacker.example/redir` (or any open redirector, e.g. `https://httpbin.org/redirect-to?url=...`).
3. `filterSensitiveUserUrl('attacker.example')` resolves to a public IP and passes.
4. Attacker triggers the webhook test.
5. The server POSTs to the attacker URL, which returns `302 Location: http://169.254.169.254/latest/meta-data/...` (or `http://127.0.0.1:3306`, internal admin UIs, etc.).
6. The shared Guzzle client follows the redirect to the internal address without re-validation; the response is logged and readable via the test-log.
## Live reproduction
Using the exact app-configured Guzzle client (replicating `services.php`) and the real `PhpIP\IP` filter logic against a public redirector (`httpbin.org/redirect-to`) pointing at a loopback secret server:
[filter] httpbin.org => ALLOWED(3.225.83.162) # public initial host passes
[filter] 127.0.0.1 => BLOCKED(loopback) # filter works directly
[filter] 169.254.169.254 => BLOCKED(link-local) # filter works directly
[VULN no ALLOW_REDIRECTS] status=200 body=INTERNAL-SSRF-SECRET-DATA-9f3a # redirect followed to 127.0.0.1:9999
[FIXED ALLOW_REDIRECTS=false] status=302 (not followed) # internal not reachedThe vulnerable configuration (Mastodon/Telegram/GroupMe/RadioReg) retrieved the internal-only secret; the `ALLOW_REDIRECTS=false` configuration (Generic/Discord/Matomo) did not. `filter_local_user_urls` defaults to `true`.
## Affected versions
All current versions, including the latest rolling release and the latest Docker image (tested `ghcr.io/azuracast/azuracast:latest`, PHP 8.5.12, default-branch commit `53e517d`, 2026-10-21).
## Remediation
Set `RequestOptions::ALLOW_REDIRECTS => false` on the outbound requests in `Mastodon.php`, `Telegram.php`, `GroupMe.php`, and `RadioReg.php` (matching Generic/Discord/MatomoAnalytics), or disable redirect-following for all webhook/remote clients, or re-run `UserUrlFilter` on every redirect hop via Guzzle's `on_redirect`.
## Disclosure
This report was researched and prepared with the assistance of an AI tool (Claude) operated and reviewed by the reporter (kats1123). All findings were verified by hand against source and live-reproduced in an isolated lab.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistazuracast/azuracast |
Corregida | 0.24.0 | — | — |
0.24.0Arsenal 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-3mcm-xm6c-fj44Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
