Eval on query parameters allows arbitrary code execution in Weaviate integration
September 12, 2024

Products Impacted
This vulnerability is present in MindsDB versions v23.10.3.0 up to v24.7.4.1.
CVSS Score: 8.8
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CWE Categorization
CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code (‘Eval Injection’)
Details
To exploit this, an attacker must be authenticated to a MindsDB instance that has the Weaviate integration installed. The vulnerability can be exploited if an embedding vector filter is present because the argument for the embeddings column in a ‘SELECT WHERE’ clause is passed to an eval statement in the select function of the mindsdb/integrations/handlers/weaviate_handler/weaviate_handler.py file (shown below – edited to only include the relevant sections).
def select(
self,
table_name: str,
columns: List[str] = None,
conditions: List[FilterCondition] = None,
offset: int = None,
limit: int = None,
) -> HandlerResponse:
...
# check if embedding vector filter is present
vector_filter = (
None
if not conditions
else [
condition
for condition in conditions
if condition.column == TableField.SEARCH_VECTOR.value
or condition.column == TableField.EMBEDDINGS.value
]
)
...
if vector_filter:
# similarity search
# assuming the similarity search is on content
# assuming there would be only one vector based search per query
vector_filter = vector_filter[0]
near_vector = {
"vector": eval(vector_filter.value)
if isinstance(vector_filter.value, str)
else vector_filter.value
}
query = query.with_near_vector(near_vector)The eval function appears to be used for parsing valid Python data types from arbitrary user input but has the side effect of enabling arbitrary code execution because Python code can be passed to it via the method explained above.
Related SAI Security Advisory
August 27, 2026
Netron Vulnerability Report
Reflected XSS in Netron versions <=9.1.2 on desktop application through unsanitized node names allows an attacker to hide certain nodes, perform port scanning or abuse a Chrome n-day to achieve Remote Code Execution.
June 12, 2026
Post-Authentication RCE via update_collection
Any authenticated user with UPDATE_COLLECTION permission can achieve remote code execution by updating a collection's embedding function to reference a malicious HuggingFace model with trust_remote_code: true. The update_collection endpoint uses the same build_from_config() code path as CVE-2026-45829. Authentication runs before model loading, so this is not a pre-authentication issue, but the model instantiation itself is unguarded.