Summary
Kestra's authentication filter incorrectly whitelists any API path ending in /configs, allowing unauthenticated access to sensitive endpoints. Because workflow creation and script execution plugins are exposed through such paths, an attacker can remotely create and run arbitrary workflows without credentials, leading to code execution as root in the worker container.
The issue becomes critical whenever Kestra is deployed with default script execution plugins enabled and exposed to untrusted networks, since simple HTTP requests can bypass authentication entirely.
Affected context
This vulnerability appears in Kestra OSS deployments where Basic Authentication is enforced through the AuthenticationFilter and the public configuration endpoint is whitelisted using a suffix-based path check.
Any API route whose last segment is configs unintentionally becomes publicly accessible, regardless of its intended sensitivity.
The risk is highest in environments where Kestra's HTTP API is reachable from untrusted networks and script execution plugins (shell, Python, etc.) remain enabled by default, allowing workflows to perform arbitrary system-level actions inside worker containers.
Exploit preconditions
- Attack surface: Kestra HTTP API exposed over the network (LAN, WAN, or internet).
- Required access: No prior authentication or credentials; only the ability to send HTTP requests to the service.
- Trigger point: Invoking any API endpoint whose path suffix is
/configs, including workflow and execution-related routes that inherit the relaxed authentication. - Why exploitation is possible: The authentication filter uses
request.getPath().endsWith("/configs")instead of matching the exact public configuration route, causing a logic flaw (CWE-184) that misclassifies arbitrary*configsendpoints as public and bypasses Basic Auth, which then interacts with script execution capabilities (CWE-78, CWE-918).
Why this happens
The bug stems from an overly broad path-based authentication exception in Kestra's AuthenticationFilter. Instead of checking for a precise configuration endpoint, the code uses a suffix match (endsWith("/configs")) to decide whether Basic Auth should be skipped.
This logic error maps to CWE-287 (Improper Authentication) and CWE-184 (Incomplete List of Disallowed Inputs): access control relies on fragile string matching rather than explicit route-level policy. Once authentication is bypassed, exposed workflow APIs combined with default script execution plugins enable command injection-style behavior (CWE-78) and server-side abuse of external resources (CWE-918), resulting in remote code execution inside worker containers.
Potential impact
- An attacker may create arbitrary workflows and tasks without any credentials.
- They could execute shell commands or scripts (Python, etc.) as root inside Kestra worker containers.
- Malicious workflows can exfiltrate data from connected services and storage systems.
- Attackers may pivot from the worker container to other infrastructure components, depending on network topology and credentials.
- They can disrupt orchestration processes, schedule destructive jobs, or tamper with production workloads and pipelines.
General mitigation guidance
Mitigation should focus on hardening authentication checks and restricting powerful workflow capabilities.
Common defensive patterns include:
- Implementing strict, explicit route-based authentication rules instead of suffix or pattern-based whitelisting.
- Centralizing access control policies so that public endpoints are defined declaratively and reviewed, not implied by string operations.
- Applying principle of least privilege to workflow execution, especially for plugins that run arbitrary scripts or commands.
- Segregating administrative APIs (workflow creation, execution management) from public configuration or read-only endpoints.
- Limiting or disabling generic script execution plugins in environments exposed to untrusted networks, and requiring additional authorization for high-risk actions.
How teams detect issues like this
Detection typically involves both code-level and runtime analysis:
- Use static analysis or linters to flag authentication and authorization checks that rely on
endsWith,contains, or other broad string patterns in security filters. - During code review, look for endpoints that are conditionally marked as "public" based on URL fragments rather than explicit route configuration or annotations.
- Enforce security policies that require authentication for workflow creation, modification, and execution APIs, verified through automated integration tests.
- Monitor HTTP logs for unauthenticated requests to
/configs-suffixed endpoints performing workflow creation or execution, and alert on unusual patterns. - Apply automated security testing tools (DAST) to crawl APIs for authentication bypasses across similarly named routes and configuration endpoints.

