Back to blog
December 4, 2026·5 min read

One endsWith() Away From Root: CVE-2026-49869 in Kestra

CVEAuth BypassRCESource Review

Kestra is an open-source orchestration platform — think scheduled workflows, data pipelines and event-driven automation, with a web UI and a REST API. During a source-code review of the OSS edition I found a single line in its authentication filter that let unauthenticated requests through to any API route ending in /configs — enough to reach remote code execution. It was assigned CVE-2026-49869 and scored CVSS 10.0. This is the write-up.

TL;DR — Kestra's AuthenticationFilter whitelisted its public config endpoint with path.endsWith("/configs"). A suffix match, not an exact match. Any API route whose last segment is configs therefore skipped authentication — and since you can create a workflow named configs and then run it, an unauthenticated attacker reaches full remote code execution. Fixed in Kestra 1.0.45 and 1.3.21.

The public endpoint that started it

Kestra OSS ships with Basic Auth as its default protection. During first-time setup the UI needs to read one endpoint before anyone has logged in — the configuration endpoint, GET /api/v1/configs — so the authentication filter explicitly lets that path through. That part is intentional and fine. The problem is how the exception was expressed.

Root cause: a suffix match instead of an exact match

In AuthenticationFilter.java, the decision to skip Basic Auth for the config endpoint looked like this:

AuthenticationFilter.java — vulnerable
// Intent: allow only the public setup endpoint /api/v1/configs
// Reality: allow ANY request whose path ends in "/configs"
boolean isConfigEndpoint = request.getPath().endsWith("/configs")
    || /* ... basicAuth setup paths ... */;

if (isConfigEndpoint || isOpenUrl || isManagementEndpoint(request) || mcpAuthHandled) {
    return chain.proceed(request); // authentication skipped entirely
}

endsWith("/configs") does not mean “the config endpoint.” It means “any URL that happens to end with /configs.” Kestra's API is REST-shaped, and many of its routes take a resource identifier as the final path segment. If that identifier is the literal string configs, the whole request sails past authentication. The intended allowlist was two exact paths; the actual allowlist was an open-ended pattern.

What the pattern actually unlocks

Walking the controllers, a number of state-changing routes end in a caller-controlled segment. With the suffix match in place, each of the following is reachable with no credentials when that segment is configs:

bypassed routes (final segment = configs)
PUT    /api/v1/{tenant}/flows/{namespace}/configs        → create or overwrite a flow named "configs"
POST   /api/v1/{tenant}/executions/{namespace}/configs   → run that flow
PUT    /api/v1/{tenant}/namespaces/{namespace}/kv/configs → write a KV entry
DELETE /api/v1/{tenant}/flows/{namespace}/configs        → delete flows
DELETE /api/v1/{tenant}/dashboards/configs               → delete dashboards
DELETE /api/v1/{tenant}/logs/{namespace}/configs         → destroy execution logs

That last one matters for incident response: an attacker can delete the very logs that would record the intrusion. But the create-plus-execute pair is what turns an authz bug into something far worse.

From auth bypass to root

Kestra's whole purpose is to run tasks, and a default install bundles script-execution plugins (shell, Python, Node and dozens more). A workflow is just data you PUT to the flows API, and running it spawns a worker container that executes those tasks. Chain that with the bypass and the path is short:

  • Create a flow whose name is configs, containing a single script task — the PUT is unauthenticated because the path ends in /configs.
  • Trigger it with the matching POST .../executions/.../configs — also unauthenticated.
  • The worker runs the task and returns its output through the execution logs.

A minimal, benign flow is enough to prove execution — no exploit payload required to demonstrate the issue:

poc-flow.yaml (benign proof of execution)
id: configs
namespace: tutorial
tasks:
  - id: whoami
    type: io.kestra.plugin.scripts.shell.Commands
    commands:
      - id            # prints the uid the worker runs as
In the test environment the worker executed as uid=0(root) inside its container. The container had no Docker socket mounted and no CAP_SYS_ADMIN, so I could not confirm a host escape — but root-level code execution inside the orchestration worker, reachable with zero credentials, is already a complete compromise of the application.

Secondary reach: SSRF via the template engine

Kestra's Pebble template engine exposes an http() function with no URI filtering — no allowlist, no private-IP block. Combined with the bypass, that gives an unauthenticated attacker server-side request forgery against internal services, including the cloud metadata endpoint at 169.254.169.254, where instance credentials typically live. On a cloud deployment the blast radius extends well past the single host.

The fix

The patch is exactly what you'd hope for: stop matching suffixes, normalise the path, and compare the whole thing against the one route that is genuinely public.

AuthenticationFilter.java — patched
String normalizedPath = normalizePath(request.getPath());
boolean isConfigEndpoint = "/api/v1/configs".equals(normalizedPath)
    || /* exact basicAuth setup paths, pre-init only */;

// collapse repeated slashes so the check runs on a canonical path
private static String normalizePath(String path) {
    return path.replaceAll("/+", "/");
}

The exact comparison is the actual fix: only /api/v1/configs is public now, and a flow, execution or log route that happens to end in configs goes through Basic Auth like every other request. The normalisation is a consistency step, so the filter reasons about a canonical path rather than whatever string arrived. That is the broader lesson — an authentication decision is only as good as its agreement with the router about which route was actually requested.

Takeaways

  • Allowlist by exact route, never by string shape. endsWith, startsWith and contains are how “one public endpoint” silently becomes “every endpoint that rhymes with it.”
  • Authenticate against the resolved route, not the raw path. If the framework can tell you which controller a request maps to, make the auth decision there.
  • Normalise before you compare. Duplicate slashes, trailing slashes and encoded separators are exactly where a filter's view of a URL drifts from the router's.
  • Mind what a bypass unlocks. In a product whose job is to execute code, an authz gap on the flows API isn't “just” authz — it's RCE.

Disclosure was handled through Kestra's GitHub security advisory GHSA-5vc5-wxxq-3fjx. The team responded quickly and shipped fixes in 1.0.45 and 1.3.21 — upgrade if you run Kestra OSS ≤ 1.3.20.