/

CVE-2026-38428

Severity:

CRITICAL RISK

(9.8)

SQL Injection in Kestra HTTP GET Parameter Handling

CVE-2026-38428

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary SQL Execution and Database Compromise

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Kestra versions v1.3.3 and earlier contain a SQL injection vulnerability where user-supplied GET parameters are directly concatenated into SQL queries without proper safeguards.

Under these conditions, an attacker can inject arbitrary SQL expressions into the underlying database query, potentially leading to data exfiltration, modification, or complete compromise of the application's data layer.

Affected context

This vulnerability affects deployments of Kestra up to and including v1.3.3 that expose HTTP endpoints taking query parameters and use them in database operations.

The issue arises in code paths where GET parameter values are incorporated into SQL strings directly, without using prepared statements or adequate validation.

It is most relevant in environments where the application's database account has broad privileges, and where the affected endpoints are reachable to untrusted or semi-trusted users.

Exploit preconditions

  • Attack surface: HTTP endpoints that accept GET parameters used within SQL queries.
  • Required access: Network-level access to the vulnerable Kestra instance; no special privileges are assumed if the endpoint is publicly reachable.
  • Trigger point: Submission of crafted GET query parameters that are concatenated into dynamic SQL strings.
  • Why exploitation is possible: The application constructs SQL statements by directly embedding user input without parameterization or robust input validation, allowing attacker-controlled SQL syntax to alter the intended query logic.

Why this happens

The root cause is the use of dynamically constructed SQL queries that directly embed user-controlled data from GET parameters.

Instead of using parameterized queries or prepared statements, the application concatenates raw input into the SQL string, which maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

This pattern treats external input as trusted and part of the executable SQL syntax, enabling attackers to inject additional clauses, modify query structure, or combine multiple statements depending on database configuration.

Potential impact

  • Unauthorized reading of sensitive data from database tables.
  • Modification or deletion of records, including critical configuration or workflow data.
  • Escalation of privileges within the application by tampering with user or role tables.
  • Denial of service by corrupting schema or issuing resource-intensive queries.
  • Potential execution of database-specific functions that can interact with the file system or network, depending on DBMS capabilities and permissions.

General mitigation guidance

Mitigations generally focus on eliminating the direct concatenation of user input into SQL and tightening trust boundaries around query construction.

Common defensive patterns include:

  • Using parameterized queries or prepared statements for all database interactions involving external input.
  • Applying strict input validation and whitelisting for expected parameter formats (e.g., integers, fixed enums, or known identifiers).
  • Encapsulating database access in a data access layer that forbids raw SQL string assembly from request parameters.
  • Minimizing database account privileges so that even if a query is manipulated, the scope of possible damage is reduced.
  • Adopting secure-by-default frameworks or ORM layers that discourage or block ad-hoc string-based query construction.

How teams detect issues like this

Detection efforts typically combine code-centric and runtime perspectives:

  • Static analysis: Configure rules to flag string concatenation used to build SQL statements, especially where request parameters or query strings are involved.
  • Code review: Look for patterns where HTTP GET parameters are passed directly into query builder methods or concatenated into raw SQL, and verify use of placeholders and bind variables.
  • Logging and monitoring: Enable detailed query logging (with care for sensitive data) to detect anomalous patterns like injected operators, tautologies, or unexpected UNION/ORDER BY segments.
  • Security testing: Incorporate automated and manual SQL injection tests into CI pipelines and pre-release security assessments, including fuzzing endpoints that accept query parameters.

Sources

SourceLink
github.comgithub.com/kestra-io/kestra/security/advisories/GHSA-365w-2m69-mp9x
link.comlink.com

Frequently asked

questions

Exploitability depends on the exposure of the affected endpoints. If the vulnerable GET-based endpoints are accessible over the internet or to untrusted users, the vulnerability can be exploited remotely without prior authentication, subject to any access controls applied in front of the service.

An attacker typically needs only network access to the Kestra instance and the ability to send crafted HTTP GET requests to the vulnerable endpoint. No database credentials are required, because the application's own database connection is abused.

The most robust fix pattern is to replace dynamic SQL string concatenation with parameterized queries or prepared statements and ensure all user input is bound as data, not as part of the query text. Where raw SQL is unavoidable, a strict abstraction layer should enforce placeholders and prohibit direct embedding of request parameters.

Prevention strategies include standardizing on ORMs or database libraries that default to parameterization, instituting coding guidelines that ban ad-hoc SQL concatenation, adding static analysis checks into CI pipelines, and performing regular security-focused code reviews that pay special attention to user input flows into persistence layers.

Find out what's already
exploitable in your codebase.