Introduction
A SQL injection flaw in Kestra's flow search API escalates directly to remote code execution on the host operating system. It carries a CVSS score of 9.9. For any organization running Kestra's default docker compose deployment, an authenticated user clicking a single crafted link is all it takes for an attacker to gain OS-level command execution on the database host.
Kestra is an open-source, event-driven orchestration platform for automating scheduled and event-driven workflows across data, AI, and infrastructure. Enterprise adoption has been rapid. The platform executed over 2 billion workflows in 2025 and reported a 25x increase in enterprise revenue over 18 months. With $36M in total funding behind it, Kestra holds a growing niche in workflow orchestration, so its security posture matters to a broad set of organizations.
Technical Information
Root Cause
CVE-2026-34612 is classified under CWE-89 (Improper Neutralization of Special Elements used in an SQL Command). The vulnerability is in the GET /api/v1/main/flows/search endpoint. Kestra incorporates user-supplied input from this endpoint into a SQL query without adequate sanitization or parameterization, so an attacker can inject arbitrary SQL statements.
The PostgreSQL Escalation Path
The execution mechanism is what makes this vulnerability so severe. The injected SQL goes beyond extracting or changing data. It uses PostgreSQL's COPY ... TO PROGRAM ... functionality, a well-known feature that lets the database pipe query output to an operating system command. Legitimate uses include exporting data to external tools. In an attacker's hands, it is a direct bridge from SQL injection to arbitrary OS command execution on the host where PostgreSQL runs.
The default docker compose deployment is explicitly noted as vulnerable, so organizations that followed the standard setup documentation are exposed without any additional misconfiguration.
Attack Flow
Based on the available advisory details, exploitation proceeds in this order:
-
The attacker first needs valid credentials for the Kestra platform. They could get them through credential theft, brute force, or a legitimate but low-privilege account.
-
The attacker crafts a malicious URL targeting the
GET /api/v1/main/flows/searchendpoint, with SQL injection payloads embedded in one or more of the query parameters the search functionality uses. -
An authenticated user visits the crafted link. That could be the attacker, if they have credentials, or a legitimate user tricked into clicking it through phishing or social engineering.
-
The Kestra backend processes the request and passes the unsanitized input into a SQL query executed against the PostgreSQL database.
-
The injected SQL uses
COPY ... TO PROGRAM ...to make PostgreSQL run an arbitrary operating system command on the host. The attacker now has remote code execution with the privileges of the PostgreSQL process.
The commit message for the fix refers to "SQL injection vulnerabilities in label search," which narrows down where in the search functionality the injection point sits.
Impact
Successful exploitation lets the attacker run arbitrary commands on the host system. From there, the standard post-exploitation options open up: establishing persistence, moving laterally within the network, exfiltrating data, or deploying additional payloads. The target is an orchestration platform, which by design connects to numerous downstream systems and services, and that makes the blast radius considerably larger.
Affected Systems and Versions
The vulnerability affects Kestra deployments with the following characteristics:
- Versions: All versions prior to 1.3.7
- Deployment configuration: Default docker compose deployments are explicitly confirmed as vulnerable
- Database backend: PostgreSQL (required for the
COPY ... TO PROGRAM ...escalation path) - Fixed version: 1.3.7
Organizations should check both their Kestra version and their deployment method. The fix is available in version 1.3.7.
Vendor Security History
Kestra's GitHub security advisories show a pattern of input validation issues, concentrated in early 2026:
| Advisory | Vulnerability Type | Severity | Date |
|---|---|---|---|
| GHSA-365w-2m69-mp9x | Remote Code Execution via SQL Injection | Critical | March 30, 2026 |
| GHSA-v2mc-8q95-g7hp | Stored Cross Site Scripting via Flow YAML Fields | High | March 23, 2026 |
| GHSA-r36c-83hm-pc8j | Stored Cross Site Scripting in Markdown File Preview | High | March 3, 2026 |
| GHSA-qpj4-4r6r-wvf4 | Stored XSS in Kestra below 0.22 | Moderate | July 7, 2025 |
Three advisories in a single month, all tied to insufficient input handling, suggest a systemic gap in input validation across the codebase. Organizations using Kestra should factor this track record into their risk assessments and patch this platform aggressively.



