GHSA-GXQX-8C54-274X
SSRF allow and deny list bypassable by redirect, userinfo and subdomain suffix
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 |
|---|---|---|---|
| Remediación | Parche 2.0.1 | io.kestra:core · -18 d desde divulgación | |
| Divulgación | Publicada | GHSA-GXQX-8C54-274X divulgada · CVSS 6.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The SSRF allow and deny lists added for GHSA-r56g-8mwp-6h4f / CVE-2026-73247 match on the raw URI string with `startsWith` and never resolve the authority, and they are applied once to the initial URI while the client follows redirects with no per-hop re-check. Both lists also default to empty, so a stock deployment has no SSRF control at all, and a deployment that configures them can be bypassed.
Where it is
`core/src/main/java/io/kestra/core/http/client/HttpClient.java`
private void validateUri(URI uri) {
String requestUri = uri.toString();
List<String> allowedList = (List<String>) ((DefaultRunContext) runContext).getTaskProperty("kestra.tasks.http.allowed-list", List.class).orElse(Collections.emptyList());
List<String> deniedList = (List<String>) ((DefaultRunContext) runContext).getTaskProperty("kestra.tasks.http.denied-list", List.class).orElse(Collections.emptyList());
// first check that if there is an allow list, it matches one
if (!allowedList.isEmpty()) {
if (allowedList.stream().noneMatch(requestUri::startsWith)) {
throw new IllegalArgumentException("The URI " + requestUri + " is not in the configured allowed list (kestra.tasks.http.allowed-list).");
}
}
// then check that there are no exclusion for it
if (deniedList.stream().anyMatch(requestUri::startsWith)) {
throw new IllegalArgumentException("The URI " + requestUri + " is in the configured denied list (kestra.tasks.http.denied-list).");
}
}
Three separate problems in that method and its caller:
- `requestUri::startsWith` is a string prefix test on the whole URI. It never extracts the RFC 3986 authority, so it does not know what host the request will actually connect to.
- Both lists fall back to `Collections.emptyList()`, and no deny list ships in `cli/application.yml`. On a default install `allowedList` is empty so the allow check is skipped, and `deniedList` is empty so the deny check matches nothing.
- `request()` calls `validateUri(request.getUri())` once, on the initial URI. `client.execute` then follows redirects (`followRedirects` defaults to true in `HttpConfiguration`), and no re-validation happens per hop.
Impact
Governs the `HTTP` task family (`Request`, `Download`, `Trigger`, `SseRequest`) and the Pebble `{{ http(uri=...) }}` function. Privilege required is the ability to author or influence a flow. On the open-source default with no basic auth that is unauthenticated, which is the same reachability GHSA-r56g was rated on; with auth enabled it is any authenticated user, and on EE any tenant flow editor.
Bypasses, in order of how cleanly they defeat the control:
- Redirect. Point at an attacker-controlled public host that answers `302 Location: http://169.254.169.254/latest/meta-data`. The initial URI passes any deny list; the redirect target is never checked.
- Allow-list subdomain suffix. With `https://api.trusted.com` allowed, `https://api.trusted.com.attacker.example/` passes `startsWith` and connects to the attacker.
- Allow-list userinfo. `https://api.trusted.com@169.254.169.254/` passes `startsWith` while the real authority host is the metadata address.
- Deny-list alternate encodings: decimal, hex, IPv6-mapped forms of a denied address.
Proof of concept
Executed at HEAD: I reimplemented `validateUri`'s `startsWith` logic and compared it against RFC 3986 authority parsing (the same parse `java.net.URI` performs). With `https://api.trusted.com` in the allow list, both the userinfo payload and the subdomain-suffix payload pass the check while the connect host is internal or attacker-controlled.
Source-verified rather than executed: the missing redirect re-validation and the empty defaults. Both are plain in the code and `cli/application.yml` ships no deny list, but I did not stand up a Kestra instance and watch a redirect chain reach an internal address.
One residual uncertainty I want to flag rather than paper over: I have not confirmed whether Micronaut's `UriBuilder` preserves userinfo on the Pebble `http()` path specifically. The redirect, subdomain and default-empty vectors do not depend on that, so the finding holds regardless, but the userinfo vector on that one path is the part I would not assert.
Suggested fix
Match on the parsed authority host rather than the URI string, re-validate on every redirect hop before connecting, and ship a non-empty default deny list covering loopback, link-local, and RFC 1918 ranges. Resolving the hostname and checking the resulting IP at connect time would be stronger still, though that is a larger change than I would prescribe from outside.
Deduplication
This is a follow-on to GHSA-r56g-8mwp-6h4f / CVE-2026-73247, which was patched in 2.0.0 by adding exactly this allow and deny list. The finding is that the remediation is off by default, bypassable, and that it governs the HTTP task family and not only the `http()` function. It is not a duplicate of the already-patched no-validation bug. I searched the repository advisories and the issues and pull requests touching `HttpClient.java`.
The neighbouring surfaces are fine and I am not reporting them: `LocalStorage` traversal is guarded by `FileUtils.isParentTraversal` plus a prefix check, `NamespaceFile` normalizes, the authentication filter collapses slashes, and cross-execution file access validates.
How I found it and a note on tooling
I was checking whether the control added for CVE-2026-73247 actually constrains the connection or only the string, since a prefix match on a URI is a common shortcut that does not survive userinfo or a suffix. It turned out to be both that and unapplied on redirects. I used AI assistance while investigating, but I ran the comparison between the prefix match and real authority parsing myself, and I have separated that from the parts I only read.
My GitHub handle is arpitjain099 for crediting.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Versiones afectadas
2.0.0Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
mavenio.kestra:core |
Corregida | 2.0.1 | -18 d | 2.0.10 no afectada |
2.0.1Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/kestra-io/kestra/security/advisories/GHSA-gxqx-8c54-274xLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
