CVE-2026-28438 Overview
CocoIndex is a data transformation framework for AI that provides connectors for various data targets. Prior to version 0.3.34, the Doris target connector contains a SQL injection vulnerability due to insufficient validation of table names before constructing SQL statements. When an application uses untrusted input to configure the table name, attackers can inject malicious SQL code through ALTER TABLE statements during target schema changes.
Critical Impact
This SQL injection vulnerability allows attackers to manipulate database operations through the Doris target connector when untrusted data is used for table name configuration, potentially leading to unauthorized data modification.
Affected Products
- CocoIndex versions prior to 0.3.34
- Applications using the Doris target connector with untrusted table name inputs
- AI data transformation pipelines utilizing CocoIndex with external configuration sources
Discovery Timeline
- 2026-03-06 - CVE-2026-28438 published to NVD
- 2026-03-10 - Last updated in NVD database
Technical Details for CVE-2026-28438
Vulnerability Analysis
This vulnerability is classified as CWE-89 (SQL Injection) and affects the Doris target connector component within CocoIndex. The flaw stems from the connector's failure to properly sanitize or validate table name parameters before incorporating them into dynamically constructed SQL statements. When schema changes are processed through ALTER TABLE operations, user-controlled table names are concatenated directly into SQL queries without proper escaping or parameterization.
The network-accessible attack vector enables remote exploitation without authentication requirements. Successful exploitation allows attackers to manipulate the integrity of database operations, though the vulnerability appears limited to data modification rather than full data exfiltration or availability impact based on the vulnerability characteristics.
Root Cause
The root cause is improper input validation in the Doris target connector. When constructing ALTER TABLE statements for schema changes, the connector directly uses the configured table name without verifying it against SQL injection patterns or using parameterized queries. This allows specially crafted table name values to break out of the intended SQL context and execute arbitrary SQL commands.
Attack Vector
The attack vector requires an application to accept table name configuration from an untrusted source and pass it to the CocoIndex Doris target connector. When the connector performs schema change operations, the malicious table name is incorporated into ALTER TABLE statements, allowing the injected SQL to execute against the target Doris database.
An attacker could exploit this by:
- Providing a malicious table name containing SQL injection payloads
- Triggering a schema change operation in the target connector
- The unsanitized input is concatenated into ALTER TABLE statements
- Injected SQL commands execute with the connector's database privileges
The security patch addresses this by ensuring proper execution context initialization and export operation handling:
pub source_id: i32,
}
+#[derive(Debug, Clone)]
pub struct ExportOpExecutionContext {
pub target_id: i32,
pub schema_version_id: usize,
Source: GitHub Commit ba2fc4a
The fix also ensures execution plans are properly initialized after target setup:
Some(&setup_execution_context.setup_state),
existing_flow_ss,
&analyzed_flow.flow_instance_ctx,
+ analyzed_flow.execution_plan.clone(),
+ setup_execution_context.export_ops.clone(),
)
.await?;
Source: GitHub Commit ba2fc4a
Detection Methods for CVE-2026-28438
Indicators of Compromise
- Unusual ALTER TABLE statements in Doris database logs containing SQL injection patterns such as semicolons, comment markers (--, /*), or UNION clauses
- Database errors indicating malformed SQL syntax in table name fields
- Unexpected schema modifications or data changes in Doris target databases
- Application logs showing table names with special characters or SQL keywords
Detection Strategies
- Implement database activity monitoring to flag ALTER TABLE operations with suspicious table name patterns
- Deploy web application firewalls (WAF) or input validation layers to detect SQL injection attempts in configuration parameters
- Enable verbose logging for CocoIndex operations and monitor for anomalous table name values
- Use static code analysis tools to identify instances where untrusted input flows to the Doris connector configuration
Monitoring Recommendations
- Monitor Doris database query logs for injection patterns in DDL statements
- Set up alerts for failed SQL parsing or unexpected SQL syntax errors
- Review application configurations to ensure table names are hardcoded or sourced from trusted configuration stores
- Implement runtime application self-protection (RASP) to detect SQL injection attempts
How to Mitigate CVE-2026-28438
Immediate Actions Required
- Upgrade CocoIndex to version 0.3.34 or later immediately
- Audit application code to identify any instances where table names are sourced from untrusted inputs
- Implement input validation for all configuration parameters passed to CocoIndex connectors
- Review database logs for any evidence of prior exploitation attempts
Patch Information
The vulnerability has been patched in CocoIndex version 0.3.34. The fix is available in commit ba2fc4a89e22d35572c64bd2990737c7913b0729. Organizations should update their CocoIndex installation by pulling the latest version from the official repository.
For detailed information, refer to the GitHub Security Advisory GHSA-59g6-v3vg-f7wc and the GitHub commit with the security fix.
Workarounds
- Ensure table names are always sourced from trusted, hardcoded configuration rather than user input
- Implement strict allowlist validation for table names before passing them to CocoIndex
- Deploy network segmentation to limit database access from potentially compromised application components
- Use database user accounts with minimal required privileges for CocoIndex operations
# Update CocoIndex to patched version
pip install cocoindex>=0.3.34
# Or update via cargo if using Rust directly
cargo update -p cocoindex
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

