/

CVE-2026-60090

Severity:

CRITICAL RISK

(9.8)

SQL Injection (CWE-89) in PraisonAI Vector Stores

CVE-2026-60090

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary SQL/CQL Execution

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

PraisonAI's PGVector and Cassandra knowledge-store backends contain a SQL/CQL injection flaw in the create_collection() path when handling caller-supplied dimensions.

By passing crafted dimension values that are interpolated into CREATE TABLE DDL, an attacker can inject arbitrary SQL or CQL tokens, potentially altering or dropping sensitive tables under vulnerable configurations.

Affected context

This vulnerability appears in PraisonAI deployments using PGVector or Cassandra knowledge-store backends where untrusted callers can influence collection-creation parameters.

Specifically, the dimension argument is accepted as an integer at the API level but not enforced at runtime, and is interpolated directly into the vector column definition of generated CREATE TABLE statements.

Environments that expose collection creation to tenants, plugins, or automation without strict validation are more likely to be affected.

Exploit preconditions

  • Attack surface: Application interfaces (APIs, SDKs, admin panels) that call create_collection() for PGVector or Cassandra knowledge stores.
  • Required access: Ability to invoke collection creation with a user-controlled dimension parameter (e.g., tenant-level access or misconfigured internal tools).
  • Trigger point: Execution of dynamically generated CREATE TABLE DDL where the dimension value is concatenated into the vector column definition.
  • Why exploitation is possible: The dimension argument, although declared as an integer, is not runtime-validated or parameterized, allowing attacker-controlled strings to be injected into SQL/CQL statements executed by the database driver.

Why this happens

The core issue is improper neutralization of special elements used in SQL/CQL commands, falling under CWE-89.

PraisonAI's create_collection() backend for PGVector and Cassandra constructs CREATE TABLE statements via string interpolation and treats the dimension as trusted, inserting it directly into the vector column definition.

Because there is no strict runtime type enforcement or parameterization for this value, attackers can supply malicious tokens (for example, closing parentheses and additional statements) that the database interprets as part of the DDL.

This pattern reflects a classic SQL injection bug: mixing untrusted data with executable query text instead of using safe bind variables and strict validation.

Potential impact

  • Alteration or deletion of database tables (e.g., dropping sensitive tenant tables).
  • Creation of attacker-controlled tables or schemas within the database.
  • Corruption or destruction of vector store metadata and embeddings.
  • Escalation of impact to other tenants sharing the same database instance.
  • Potential loss of integrity and availability of application data relying on the affected knowledge stores.

General mitigation guidance

Effective mitigation focuses on eliminating string-based query construction paths for schema elements influenced by users and enforcing strict validation around numeric parameters.

Common defensive patterns include:

  • Treating all user-supplied values, including dimensions and sizing parameters, as untrusted and validating them against strict numeric ranges before query construction.
  • Using parameterized queries or database driver mechanisms that separate query structure from data, even for DDL where supported.
  • Centralizing query builders or schema factories so that schema names, keyspaces, and sizing parameters are only derived from trusted, pre-validated sources.
  • Restricting who can invoke collection creation and reducing the privileges of the database account used by PraisonAI (for example, no ability to drop unrelated tables).
  • Implementing input schemas or type enforcement at the boundary (API/SDK) so that non-integer dimension values are rejected before reaching the backend.

How teams detect issues like this

Detection typically combines code-level review with runtime monitoring:

  • Static analysis rules can flag string concatenation or f-string usage when constructing SQL/CQL, especially where user-controlled parameters like "dimension" appear inside CREATE TABLE statements.
  • Code reviews should look for any DDL generation that interpolates untrusted values into column definitions, sizes, or constraints without strict validation.
  • Security linters and SAST tools can be configured to treat any unmanaged use of SQL execution APIs with dynamic strings as a high-risk signal.
  • At runtime, database activity monitoring and log analysis can surface unusual DDL patterns, such as unexpected DROP TABLE operations or schemas created from user-facing APIs.
  • Policy enforcement in CI/CD (for example, blocking merges that introduce new raw SQL construction without parameterization) can reduce reintroduction of similar flaws.

Sources

SourceLink
github.comgithub.com/MervinPraison/PraisonAI/commit/3aa9cbc2bd49c23a32be0a89a5e620d13d843eab
github.comgithub.com/MervinPraison/PraisonAI/security/advisories/GHSA-wf65-4jjx-q444
vulncheck.comvulncheck.com/advisories/praisonai-before-sql-cql-injection-via-vector-dimension

Frequently asked

questions

Exploitability depends on who can create collections; if tenants, plugins, or semi-trusted clients can pass arbitrary dimension values, the vulnerability can be exploited with standard API access rather than low-level database access.

An attacker needs the ability to call the create_collection() functionality for PGVector or Cassandra backends and control the dimension parameter, typically via an application API, SDK, or misconfigured administrative interface.

The safest pattern is to enforce strict numeric validation for the dimension parameter, reject non-integer input early, and construct SQL/CQL using parameterized or templated statements that do not allow raw concatenation of untrusted data into query text.

Preventing recurrence involves adopting a consistent query construction strategy that avoids dynamic string concatenation, applying centralized input validation for all schema-related parameters, running regular security-focused code reviews and SAST scans targeting SQL injection patterns, and enforcing least-privilege database roles for application components.

Find out what's already
exploitable in your codebase.