Skip to content
CVE-2026-115324 Sumo Logic CSE · Sumo

Detect mem0ai Databricks Vector Store SQL Injection (CVE-2026-115324) in Sumo Logic CSE

Detects exploitation of CVE-2026-115324, a SQL injection vulnerability (CWE-89) in the mem0ai Python package's Databricks vector store integration. Affected versions >= 0.1.117 and < 1.0.8 build Databricks SQL statements by directly interpolating untrusted memory metadata, filter values and identifiers into queries in mem0/vector_stores/databricks.py instead of using parameterized statements. An attacker able to influence memory content or filter parameters passed to mem0 operations (insert, search, update, delete) can inject arbitrary SQL that is executed against the Databricks SQL warehouse, enabling data exfiltration, tampering, or deletion across the vector store schema. This detection surfaces anomalous Databricks SQL executed by the mem0 service identity (stacked queries, UNION-based injection, comment terminators, schema/metadata access) and installation/import of vulnerable mem0ai versions.

Based on VulnCheck Advisory, mem0 0.1.117 before 1.0.8 SQL injection via Databricks vector store

MITRE ATT&CK

Tactic
Initial Access Collection Impact

Sumo Detection Query

Sumo Logic CSE (Sumo)
sql
// df00tech DF00-fce4722721 · https://df00tech.com/detections/CVE-2026-115324 · licence: https://df00tech.com/detections/licence
_sourceCategory=databricks/sql
| lower(coalesce(statementText, queryText)) as stmt
| where stmt matches "*union select*" or stmt matches "*' or '1'='1*" or stmt matches "*information_schema*" or stmt matches "*;drop*" or stmt matches "*;delete*" or stmt matches "*--*"
| lower(coalesce(userIdentity, executedAs)) as identity
| where identity matches "*mem0*" or stmt matches "*mem0*"
| count by identity, stmt
| sort by _count
high severity medium confidence

Sumo Logic query for SQL injection markers in Databricks SQL tied to the mem0 identity.

Data Sources

Databricks SQL audit logs

Required Tables

databricks/sql

False Positives & Tuning

  • Benign reporting queries using UNION/information_schema.
  • Ad-hoc SQL under the shared mem0 principal.
  • Memory payloads containing SQL punctuation.

Other platforms for CVE-2026-115324


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.

  1. Test 1 Boolean tautology injection via mem0 filter (lab)

    Expected signal: Databricks SQL audit log shows a SELECT with an injected OR '1'='1' predicate attributed to the mem0 principal.

  2. Test 2 UNION-based exfiltration attempt (lab)

    Expected signal: Databricks audit log records a statement containing UNION SELECT and information_schema from the mem0 principal.

  3. Test 3 Install vulnerable mem0ai version (lab)

    Expected signal: Package manager / EDR records installation of mem0ai 1.0.7 (vulnerable range).


Response Playbook

Triage

  1. Confirm the mem0ai version in use (pip show mem0ai); versions >= 0.1.117 and < 1.0.8 are vulnerable. Any production use of the Databricks vector store on these versions is exploitable.
  2. Pull the flagged Databricks SQL statement(s) in full and determine whether the injected content originated from user-controllable memory text, metadata, or filter parameters passed to mem0 insert/search/update/delete operations.
  3. Correlate the statement timestamp with mem0 application logs to identify the originating request, user/tenant, and the API endpoint that fed the memory or filter payload.
  4. Assess whether the injected SQL succeeded (returned rows, error, or altered state) by reviewing the Databricks query result status and row counts.

Containment

  1. Upgrade mem0ai to >= 1.0.8 which replaces string interpolation with parameterized Databricks statements; pin the fixed version in requirements.
  2. Rotate the Databricks service principal / PAT used by mem0 and restrict its grants to the minimal schema and tables required (revoke cross-schema and information_schema access).
  3. If immediate upgrade is not possible, disable the Databricks vector store backend or place a validation/allow-list layer in front of mem0 filter and metadata inputs.

Evidence Collection

  1. Export the full Databricks SQL audit log entries for the mem0 principal around the detection window, including statement text, executor, warehouse, and result status.
  2. Capture mem0 application request logs tying the injected payload to a source IP, user, and API call.
  3. Preserve the installed mem0ai package version and the databricks.py source from the deployed environment to confirm the vulnerable code path.

Escalation Criteria

  • !Escalate to incident response if injected SQL accessed or modified tables outside the mem0 vector store schema, or touched information_schema / credential-bearing tables.
  • !Escalate if evidence shows data exfiltration (large UNION result sets), destructive statements (DROP/DELETE), or that the Databricks principal has broad warehouse privileges.

Investigation Guide

Forensic Artifacts

  • >Databricks SQL query history / audit log entries for the mem0 service principal.
  • >Installed mem0ai package metadata (pip, requirements.txt, lockfiles) showing a version in the vulnerable range.
  • >mem0 application request logs containing the malicious memory/filter payload.

Tuning Guidance

Baseline the normal Databricks SQL generated by mem0 for the affected versions, its queries are predictable (INSERT/SELECT against the vector table). Alert on any statement from the mem0 principal that deviates from that template: multiple semicolons, UNION, comments (-- or /*), or references to schemas/tables outside the vector store. Suppress known reporting jobs by scoping the identity filter to the dedicated mem0 service principal rather than shared accounts, and allow-list any legitimate analytics that query information_schema.


Hunting Queries

Retro-hunt over 30 days for mem0-attributed Databricks statements containing UNION, information_schema access, or stacked queries indicative of injection.

Hunting — KQL
kql
// df00tech DF00-fce4722721 · https://df00tech.com/detections/CVE-2026-115324 · licence: https://df00tech.com/detections/licence
DatabricksSQL_CL | where TimeGenerated > ago(30d) | extend stmt=tolower(coalesce(column_ifexists("statementText_s",""),"")) | where stmt has "mem0" and (stmt has "union select" or stmt has "information_schema" or countof(stmt,";")>1) | project TimeGenerated, stmt
Hunting — SPL
spl
``` df00tech DF00-fce4722721 · https://df00tech.com/detections/CVE-2026-115324 · licence: https://df00tech.com/detections/licence ```
index=databricks sourcetype="databricks:sql" | eval stmt=lower(statementText) | search stmt="*mem0*" (stmt="*union select*" OR stmt="*information_schema*" OR stmt="*;*;*") | table _time stmt

Atomic Red Team Tests

Test 1 Boolean tautology injection via mem0 filter (lab)
linux

Exercise the vulnerable Databricks filter path by passing a tautology in a metadata filter value to a lab mem0 instance.

Command

bash
python3 -c "from mem0 import Memory; m=Memory.from_config({'vector_store':{'provider':'databricks','config':{'workspace_url':'https://lab','access_token':'LAB','catalog':'lab','schema':'mem0','table':'memories'}}}); m.search('x', user_id=\"a' OR '1'='1\")"

Cleanup

bash
python3 -c "print('no persistent state; drop lab table if created: DROP TABLE IF EXISTS lab.mem0.memories')"

Expected Telemetry

Databricks SQL audit log shows a SELECT with an injected OR '1'='1' predicate attributed to the mem0 principal.

Expected Detection

KQL/SPL injection-marker rules match on the ' or '1'='1 tautology.

Test 2 UNION-based exfiltration attempt (lab)
linux

Inject a UNION SELECT via memory metadata to attempt reading an adjacent table.

Command

bash
python3 -c "from mem0 import Memory; m=Memory.from_config({'vector_store':{'provider':'databricks','config':{'workspace_url':'https://lab','access_token':'LAB','catalog':'lab','schema':'mem0','table':'memories'}}}); m.add('note', user_id='u', metadata={'tag':\"x' UNION SELECT * FROM information_schema.tables--\"})"

Cleanup

bash
echo 'Remove injected test rows: DELETE FROM lab.mem0.memories WHERE user_id=\'u\''

Expected Telemetry

Databricks audit log records a statement containing UNION SELECT and information_schema from the mem0 principal.

Expected Detection

Detection fires on union select and information_schema markers.

Test 3 Install vulnerable mem0ai version (lab)
linux

Install a mem0ai release in the vulnerable range to validate software-inventory detection.

Command

bash
pip install 'mem0ai==1.0.7'

Cleanup

bash
pip install 'mem0ai>=1.0.8' || pip uninstall -y mem0ai

Expected Telemetry

Package manager / EDR records installation of mem0ai 1.0.7 (vulnerable range).

Expected Detection

Software inventory flags mem0ai >=0.1.117,<1.0.8 as vulnerable to CVE-2026-115324.

Related Detections