Severity by source
AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L
PR:H for required TenantControlPlane write access; C/I/A:H because pre-fix multiStatements=true enables arbitrary stacked SQL over the root datastore connection.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
3DescriptionCVE.org
Kamaji is the Hosted Control Plane Manager for Kubernetes. Prior to 26.7.4-edge, the PostgreSQL and MySQL datastore drivers build DDL statements by interpolating the user-supplied DataStoreUsername/DataStoreSchema directly into SQL via fmt.Sprintf, without escaping identifiers. These fields have no format validation, so a value containing a quote character breaks out of the quoted identifier - SQL injection executed over Kamaji's root connection to the shared datastore. etcd driver is not affected.This issue is fixed in version 26.7.4-edge.
AnalysisAI
SQL injection via unescaped identifier interpolation in Kamaji's PostgreSQL and MySQL datastore drivers exposes the shared datastore root connection to arbitrary DDL/DML manipulation. Versions prior to 26.7.4-edge interpolate operator-supplied DataStoreUsername and DataStoreSchema fields directly into SQL via fmt.Sprintf without any identifier sanitization, allowing a quote or backtick character to break out of the identifier context. Compounding the risk, the pre-fix MySQL primary connection had multiStatements=true enabled, enabling stacked query execution over a root-privileged database connection that spans all hosted tenant control planes. No active exploitation has been confirmed and no public exploit code has been identified at time of analysis.
Technical ContextAI
Kamaji (cpe:2.3:a:clastix:kamaji:*:*:*:*:*:*:*:*) is a Clastix open-source project that manages Kubernetes hosted control planes using a shared relational datastore (PostgreSQL or MySQL). The vulnerability is CWE-89 (Improper Neutralization of Special Elements used in an SQL Command). Affected code in mysql.go and its PostgreSQL equivalent constructs DDL statements such as CREATE DATABASE IF NOT EXISTS %s and CREATE USER %s@%% IDENTIFIED BY '%s' using Go's fmt.Sprintf, feeding DataStoreUsername and DataStoreSchema from a TenantControlPlane Kubernetes custom resource directly as string arguments. A value containing a backtick or single quote terminates the identifier context, injecting arbitrary SQL into the statement. The commit diff at https://github.com/clastix/kamaji/commit/6a9f3e10ae408e7948e2aca2db694791a299e79c further reveals that before the fix the MySQL primary connection carried the multiStatements=true DSN parameter, which permits semicolon-separated stacked queries in a single ExecContext call - converting simple identifier injection into a full arbitrary SQL execution primitive against the root datastore connection. The fix introduces quoteMySQLIdentifier() and escapeMySQLString() helpers, removes multiStatements from the primary connection, and isolates multi-statement execution to a scoped temporary connection used only during schema migration. The etcd driver constructs no SQL and is explicitly confirmed unaffected.
RemediationAI
Upgrade to Kamaji 26.7.4-edge or later, available at https://github.com/clastix/kamaji/releases/tag/26.7.4-edge. This release introduces quoteMySQLIdentifier() and escapeMySQLString() to sanitize all operator-supplied identifiers before SQL interpolation, and removes the multiStatements parameter from the primary datastore connection, preventing stacked-query escalation as a defense-in-depth measure. For operators unable to upgrade immediately, restrict creation and modification of TenantControlPlane resources via Kubernetes RBAC to only explicitly trusted administrators - this limits the attack surface to users who already hold the high-privilege access the vulnerability requires, though it does not eliminate the underlying flaw. Auditing existing TenantControlPlane resources for unexpected characters (backticks, single quotes, semicolons) in DataStoreUsername and DataStoreSchema fields can help detect any prior exploitation attempts. No workaround fully mitigates the vulnerability without RBAC restrictions on TenantControlPlane write access.
More in PostgreSQL
View allPostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re
Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.
PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow
The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t
A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve
Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the
Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
A vulnerability in the FinanceChatLlamaPack of the run-llama/llama_index repository, versions up to v0.12.3, allows for
Same weakness CWE-89 – SQL Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-51312