llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · getgrav/grav-plugin-api

GHSA-HQ2V-CGW4-FW2W

Webhook delivery re-resolves the target hostname after validating it, allowing the SSRF guard to be bypassed by DNS rebinding

Sin parche publicado
Descargar PNG JSON
CVSS
—
low
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición102 dDesde la divulgación, 10 ago 2026, 12:05 p. m.
Detección100 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
10 ago 26
18 nov 26
20 nov 26
10 ago 26
5 sept 26
30 sept 26
26 oct 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-HQ2V-CGW4-FW2W divulgada
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

When the Grav API plugin delivers a webhook, it validates that the target hostname resolves to a public address and then hands the hostname to cURL, which performs its own separate lookup for the actual connection. The two lookups are independent, so someone who controls DNS for the hostname they configured can answer with a public address for the validation and a private one for the delivery, defeating the SSRF guard.

Affected versions

Grav API plugin (`getgrav/grav-plugin-api`) <= 1.0.15.

Details

`WebhookDispatcher::httpPost()` re-validates the target at dispatch time. That guard was added for GHSA-58q8, to catch a hostname that passed validation when the webhook was configured and changed before delivery:

$host = (string) parse_url($url, PHP_URL_HOST);
if ($host === '' || !self::hostIsPublic($host)) {
    throw new \RuntimeException('Webhook URL targets a private or reserved address.');
}

$ch = curl_init($url);

`hostIsPublic()` resolves the hostname itself and returns only a boolean; the addresses it validated are discarded. `curl_init()` then receives the URL with the hostname intact, so libcurl resolves it again when the request is made. Nothing links the address that was checked to the address that is connected to, and neither `CURLOPT_RESOLVE` nor `CURLOPT_CONNECT_TO` is set.

The redirect-based and scheme-based variants of this attack are already closed correctly by `CURLOPT_FOLLOWLOCATION => false` and the protocol restrictions in the same function. Only the rebinding variant remains open.

Impact

Someone able to configure a webhook can cause the site to issue a request to an address on its internal network, carrying the webhook's configured headers and body. Part of the response is retained in the delivery log, which gives a limited read-back channel.

Configuring a webhook requires the `api.webhooks.write` permission. We reviewed the codebase for lower-privileged paths that could set or influence a webhook URL and found none: the only writers are the webhook create and update endpoints, both behind that permission.

Exploitation is probabilistic rather than deterministic. It requires control of authoritative DNS for the hostname with a very low TTL, and winning a race between two lookups. Webhook delivery is repeatable, which gives an attacker repeated attempts.

Severity

Rated Low. Grav rates security issues by whether an actor can escape the trust scope of their role. Configuring a webhook is an administrative capability, and an account holding it can already direct outbound requests to arbitrary internet addresses and read back part of the response. This issue closes a gap in a defence-in-depth measure we added ourselves, rather than granting access that was not already delegated. Our security policy describes the full rating criteria.

Patches

Fixed in Grav API plugin 1.0.16. The hostname is now resolved once and the validated addresses are pinned onto the connection, so a delivery reaches exactly the address that was checked. The `Host` header, TLS SNI and certificate verification continue to use the hostname from the URL, so virtual hosting and HTTPS behave as before.

Credits

Reported by @alham-rizvi.

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

Versiones

Rangos afectados

Afectada Corregida
getgrav/grav-plugin-api≤ 1.0.15
1.0.15
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistgetgrav/grav-plugin-api
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/getgrav/grav/security/advisories/GHSA-hq2v-cgw4-fw2w

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