Summary
Kestra's REST API authentication filter incorrectly treats any path ending in /configs as a public endpoint, allowing those requests to bypass Basic Auth entirely.
An unauthenticated attacker can use this bypass to create and trigger flows that run Shell or Process tasks as root inside the Kestra container, potentially reaching the host Docker daemon in typical deployments.
Affected context
This vulnerability arises in Kestra deployments where:
- The REST API is exposed and protected by a path-based authentication filter.
- The filter uses a suffix match on
/configsto classify requests as public. - Flows can define Shell or Process tasks that execute with elevated privileges inside the Kestra container.
- The container has access to sensitive host resources, such as
/var/run/docker.sockin common docker-compose setups.
In these conditions, a crafted URL path ending with the literal segment configs can be misrouted as a public instance-config endpoint and processed without authentication.
Exploit preconditions
- Attack surface: Kestra REST API endpoints (e.g.,
/api/v1/{tenant}/flows/{namespace},/api/v1/{tenant}/executions/{namespace}/{id},/api/v1/{tenant}/namespaces/{namespace}/kv/{key}). - Required access: Network-level ability to send HTTP requests to the Kestra API; no valid credentials are required.
- Trigger point: Any request whose path's final segment is
configsand that reaches flow-creation or execution-trigger routes. - Why exploitation is possible: The authentication filter uses a simplistic path-suffix check and treats all
*/configsrequests as public, forwarding them without enforcing Basic Auth, allowing anonymous callers to invoke privileged flow operations.
Why this happens
The core issue is a flawed authentication design where access control is inferred from URL path patterns rather than explicit route protection and authorization checks.
The filter is configured to trust any request ending in /configs, conflating a specific public instance-config endpoint with arbitrary user-controlled paths that share the same suffix.
This maps to CWE-288: Authentication Bypass Using an Alternate Path because attackers can select a particular trailing path segment to avoid credential checks.
Once authenticated behavior is reachable anonymously, flows can embed Shell or Process tasks that execute arbitrary commands, aligning with CWE-94: Code Injection, where user-controlled definitions lead to execution of unintended commands on the orchestration runtime.
Potential impact
- An unauthenticated attacker can create arbitrary Kestra flows.
- Flows may execute Shell or Process tasks as root inside the Kestra container.
- The attacker could interact with the host Docker daemon via
/var/run/docker.sockand start or modify containers. - Orchestration workflows and execution history can be manipulated or destroyed.
- Sensitive workflow data and secrets managed by Kestra may be exposed or abused.
- The broader container host environment could be compromised depending on configuration and accessible resources.
General mitigation guidance
Effective mitigation focuses on strengthening authentication and decoupling public endpoints from user-controlled paths:
- Apply explicit authentication and authorization checks on all state-changing API routes (flow creation, execution triggering, namespace KV operations) instead of relying solely on path suffixes.
- Use precise route matching and clear separation between public and private endpoints, avoiding pattern-based shortcuts where user-controlled segments can collide with special cases.
- Restrict the ability of flows to define arbitrary Shell or Process tasks, or run them with reduced privileges and constrained environments.
- Limit container access to host-level interfaces such as
/var/run/docker.sock, and adopt least-privilege principles for the orchestrator's runtime user. - Treat all inputs that ultimately control task commands or workflows as untrusted, applying validation and policy to minimize their ability to express arbitrary system-level actions.
How teams detect issues like this
Organizations can detect similar weaknesses and potential exploitation through:
- Static analysis or configuration review of authentication filters and API routing, looking for path-based exceptions, wildcard rules, and special-case public endpoints that depend on user-controlled segments.
- Code review practices that flag any route where authentication or authorization decisions are made purely from URL patterns without additional checks.
- Logging and monitoring of API calls that reach flow creation and execution endpoints, especially anonymous requests or those with suspicious path segments such as
/configs. - Security policies and automated tools that enforce "no unauthenticated state changes" on orchestration and control-plane APIs, combined with regression tests ensuring that paths cannot be trivially manipulated to bypass auth.

