GHSA-3JP3-3WQW-JVW4
SSRF filter bypass in Station Webhooks via hostname and non-link-local private IPs
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-3JP3-3WQW-JVW4 divulgada · CVSS 7.1 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
## Summary
`AbstractConnector::getValidUrl()`, used by the `Generic` and `Discord` webhook connectors to validate a station-manager-supplied webhook URL before AzuraCast sends an outbound HTTP request to it, only rejects URLs whose host is a literal, link-local IP address (169.254.0.0/16 / fe80::/10 — e.g. the AWS/GCP/Azure metadata endpoint). It does not check loopback addresses, RFC1918 private ranges, or any hostname at all (since resolving a hostname to an `IP` object throws, and the exception path skips the check entirely). As a result, a user holding only the station-scoped `WebHooks` permission can make the server issue arbitrary outbound HTTP requests to internal/loopback/private-network targets — a Server-Side Request Forgery.
## Details
`backend/src/Webhook/Connector/AbstractConnector.php`:
protected function getValidUrl(mixed $urlString = null): ?string
{
$uri = Urls::tryParseUserUrl($urlString, 'Webhook');
if (null === $uri) {
return null;
}
try {
$ip = IP::create($uri->getHost()); // throws for any non-literal-IP hostname
} catch (Throwable) {
$ip = null; // -> check below is skipped entirely
}
if ($ip instanceof IP) {
if ($ip->isLinkLocal()) { // only catches 169.254.0.0/16 and fe80::/10
return null;
}
}
return (string)$uri;
}`Urls::tryParseUserUrl()` (`backend/src/Utilities/Urls.php`) only validates that the scheme is `http`/`https`; it performs no host/IP restriction of its own.
`backend/src/Webhook/Connector/Generic.php` uses this to validate `config['webhook_url']` before calling `$this->httpClient->request('POST', $webhookUrl, ...)` with the station's live Now Playing data as the JSON body — and no re-validation happens at request time, so even if a hostname resolves differently between check-time and request-time (DNS rebinding), it would not matter here since the hostname case bypasses the check unconditionally regardless of what it resolves to.
Access to configure a webhook requires only the station-scoped `StationPermissions::WebHooks` permission (`backend/config/routes/api_station.php`, `Middleware\Permissions(StationPermissions::WebHooks, true)`), not full/global administrator rights. Additionally, `Controller/Api/Stations/Webhooks/TestAction.php` lets the same low-privileged user trigger an on-demand webhook dispatch immediately (`PUT /station/{id}/webhook/{id}/test`), without waiting for a real Now Playing event, making exploitation and result observation fast.
## Proof of Concept
Verified by executing the exact pinned dependency AzuraCast uses (`rlanvin/php-ip`, commit `7811f12256a5a610ddcb31ed9840179f4dd3784d`, as locked in `composer.lock`) against the same validation logic used in `getValidUrl()`, in an isolated local sandbox (no AzuraCast server or database was started; only the third-party IP library itself was exercised):
TARGET HOST DESCRIPTION RESULT
169.254.169.254 cloud metadata endpoint BLOCKED (correctly flagged link-local)
127.0.0.1 loopback ALLOWED — bypass
10.0.0.5 RFC1918 private range ALLOWED — bypass
172.17.0.1 default Docker bridge gateway ALLOWED — bypass
192.168.1.1 RFC1918 private range ALLOWED — bypass
::1 IPv6 loopback ALLOWED — bypass
internal-mysql.docker.local attacker-controlled hostname check SKIPPED entirely — bypass
8.8.8.8 public IP (control case) ALLOWED (expected/correct)Only the literal-IP link-local case is actually blocked; every other internal/loopback/private target — and every hostname, regardless of what it resolves to — passes straight through.
## Impact
A user with only the narrow, station-scoped `WebHooks` permission (not a full server administrator) can cause the AzuraCast server to make outbound HTTP requests to:
- Loopback services on the host itself,
- Other containers/services on the internal Docker/private network,
- Any attacker-controlled hostname (trivially defeats the one existing protection),
potentially enabling internal network reconnaissance/port scanning, interaction with internal-only APIs, or (depending on deployment) reaching the cloud metadata service via a hostname that resolves to it (the literal-IP form is blocked, but a hostname pointing at the same IP is not).
## Suggested Fix
Centralize outbound-URL SSRF protection in `Urls` (or a shared helper used by every consumer, see the companion advisory on `StationRemote`) so that:
- The check always resolves the final hostname to its IP(s) (handling DNS) before evaluating it — never skip the check just because the input was a hostname.
- Block loopback, RFC1918 private ranges, and IPv6 unique-local/loopback in addition to link-local, not just link-local.
- Re-validate at request time (or pin the resolved IP for the actual request) to avoid DNS-rebinding TOCTOU gaps.
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-3jp3-3wqw-jvw4Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
