/

CVE-2026-115324

Severity:

HIGH RISK

(8.1)

SQL Injection (CWE-89) in mem0 Databricks SQL Store

CVE-2026-115324

Awaiting Analysis

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized SQL execution, data disclosure, and data modification

Severity:

HIGH RISK

(8.1)

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

A SQL injection vulnerability in mem0 allows attacker-controlled memory text, metadata, or message names to reach unescaped SQL statements used by the Databricks vector store. If crafted content is stored or processed by an affected deployment, the resulting queries may execute unintended SQL on the configured Databricks SQL warehouse.

A SQL injection vulnerability in mem0 allows attacker-controlled memory text, metadata, or message names to reach unescaped SQL statements used by the Databricks vector store. If crafted content is stored or processed by an affected deployment, the resulting queries may execute unintended SQL on the configured Databricks SQL warehouse.

Affected context

The vulnerability occurs in mem0's Databricks vector-store integration when memory content, metadata, or message names are incorporated into SQL through string interpolation. Risk depends on whether untrusted users or upstream systems can influence stored memory fields and on the privileges granted to the configured Databricks SQL warehouse.

The vulnerability occurs in mem0's Databricks vector-store integration when memory content, metadata, or message names are incorporated into SQL through string interpolation. Risk depends on whether untrusted users or upstream systems can influence stored memory fields and on the privileges granted to the configured Databricks SQL warehouse.

Exploit preconditions

  • Attack surface: SQL statements generated by the Databricks vector-store

implementation

  • Required access: The ability to submit, influence, or cause processing of

memory text, metadata, or message names

  • Trigger point: An affected insert or update operation involving crafted

stored content

  • Why exploitation is possible: User-influenced values reach SQL string

interpolation without adequate parameterization or escaping

  • Attack surface: SQL statements generated by the Databricks vector-store

implementation

  • Required access: The ability to submit, influence, or cause processing of

memory text, metadata, or message names

  • Trigger point: An affected insert or update operation involving crafted

stored content

  • Why exploitation is possible: User-influenced values reach SQL string

interpolation without adequate parameterization or escaping

Why this happens

The underlying bug is the construction of SQL statements by directly interpolating values derived from memory records. This treats data as part of the query language rather than as a bound value, allowing SQL syntax supplied through otherwise ordinary application fields to alter statement meaning. This behavior maps to CWE-89, Improper Neutralization of Special Elements used in an SQL Command.

The underlying bug is the construction of SQL statements by directly interpolating values derived from memory records. This treats data as part of the query language rather than as a bound value, allowing SQL syntax supplied through otherwise ordinary application fields to alter statement meaning. This behavior maps to CWE-89, Improper Neutralization of Special Elements used in an SQL Command.

Potential impact

  • An attacker may read data accessible to the Databricks SQL warehouse
  • An attacker could alter or delete records within the permitted scope
  • Crafted statements may cause integrity loss in stored memories or metadata
  • The application may experience service disruption or unexpected query costs
  • Broader compromise could occur if the warehouse identity has excessive privileges
  • An attacker may read data accessible to the Databricks SQL warehouse
  • An attacker could alter or delete records within the permitted scope
  • Crafted statements may cause integrity loss in stored memories or metadata
  • The application may experience service disruption or unexpected query costs
  • Broader compromise could occur if the warehouse identity has excessive privileges

General mitigation guidance

Mitigation generally centers on ensuring that every externally influenced value is handled as data rather than executable SQL. Common defensive patterns include parameterized queries or prepared statements for insert and update operations, strict allowlist validation for identifiers and structured fields, and canonical encoding appropriate to the database interface. Reducing trust in memory content and metadata, validating data before persistence, and separating application data from query construction further limits exposure. The Databricks identity should follow least privilege, with narrowly scoped access to required catalogs, schemas, tables, and operations.

Mitigation generally centers on ensuring that every externally influenced value is handled as data rather than executable SQL. Common defensive patterns include parameterized queries or prepared statements for insert and update operations, strict allowlist validation for identifiers and structured fields, and canonical encoding appropriate to the database interface. Reducing trust in memory content and metadata, validating data before persistence, and separating application data from query construction further limits exposure. The Databricks identity should follow least privilege, with narrowly scoped access to required catalogs, schemas, tables, and operations.

How teams detect issues like this

Detection can include static analysis for SQL string concatenation, interpolation, or formatting involving memory fields, metadata, or message names. Code review should examine every database write path for parameter binding and should flag custom escaping used instead of native query parameters. Runtime monitoring can alert on anomalous query syntax, unusual warehouse access, failed statements, and unexpected data-volume changes. CI policy checks and neutral automated code-review tools may help enforce parameterized-query requirements.

Detection can include static analysis for SQL string concatenation, interpolation, or formatting involving memory fields, metadata, or message names. Code review should examine every database write path for parameter binding and should flag custom escaping used instead of native query parameters. Runtime monitoring can alert on anomalous query syntax, unusual warehouse access, failed statements, and unexpected data-volume changes. CI policy checks and neutral automated code-review tools may help enforce parameterized-query requirements.

Sources

SourceLink
github.comgithub.com/mem0ai/mem0
github.comgithub.com/mem0ai/mem0/blob/v1.0.7/mem0/vector_stores/databricks.py
github.comgithub.com/mem0ai/mem0/commit/a2ffca32660537b7b304305f36774ae2a13452cb
github.comgithub.com/mem0ai/mem0/issues/4073
github.comgithub.com/mem0ai/mem0/pull/4558
github.comgithub.com/mem0ai/mem0/releases/tag/v1.0.8
vulncheck.comvulncheck.com/advisories/mem0-0.1.117-before-1.0.8-sql-injection-via-databricks-vector-store

Frequently asked

questions

It can be exploitable through an application or integration that accepts

attacker-influenced memory content, metadata, or message names. Direct

network reachability to the Databricks warehouse is not necessarily required

if the vulnerable mem0 service performs the database operation.

The attacker generally needs a way to submit or influence content that is

later persisted or updated by the affected Databricks vector-store path.

The practical impact also depends on the permissions of the warehouse

identity.

Use native parameterized queries or prepared statements for all dynamic values,

and avoid constructing SQL by interpolating application-controlled strings.

Combine parameter binding with input validation, focused code review, SQL

injection testing, query monitoring, and least-privilege database identities.

It can be exploitable through an application or integration that accepts

attacker-influenced memory content, metadata, or message names. Direct

network reachability to the Databricks warehouse is not necessarily required

if the vulnerable mem0 service performs the database operation.

The attacker generally needs a way to submit or influence content that is

later persisted or updated by the affected Databricks vector-store path.

The practical impact also depends on the permissions of the warehouse

identity.

Use native parameterized queries or prepared statements for all dynamic values,

and avoid constructing SQL by interpolating application-controlled strings.

Combine parameter binding with input validation, focused code review, SQL

injection testing, query monitoring, and least-privilege database identities.

Find out what's already
exploitable in your codebase.