Security incident · CVE-2026-116575
Mem0: Cross-tenant conversation leak via unescaped delimiter collision in session-scope key (_build_session_scope)
Published Oct 28, 2026 · catalog updated Oct 28, 2026 · Mem0: Cross-tenant conversation leak
Last checked Nov 4, 2026. A connected source was read within the last 7 days.
Check if you run it
No confirmed exploitation is on record for CVE-2026-116575. EPSS is 0.11%. Act only if a listed version of Mem0: Cross-tenant conversation leak is installed.
Gaps on this record
- The stored product name is a package slug. The name on this page is taken from the title (Mem0: Cross-tenant conversation leak).
- No vendor fix or required action is stored. Compare the linked advisory before you change production.
- Severity
- Medium6.3
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- 0.11%
- Remediation
- Version ranges on file
- Affected products
- npm mem0ai · pip mem0ai · pypi mem0ai
Summary _build_session_scope() in mem0/memory/main.py builds the conversation-history scope key used to fetch/store the last N raw messages by naively joining caller-supplied user_id/agent_id/run_id values with unescaped & and = delimiters: def _build_session_scope(filters): parts = [] for key in sorted(["user_id", "agent_id", "run_id"]): val = filters.get(key) if val: parts.append(f"{key}={val}") return "&".join(parts) _validate_and_trim_entity_id() (the only validation applied to these values) rejects only empty/whitespace-only strings — it never forbids & or =. This scope string is then used as an exact-match key against a SQLite column (storage.py: WHERE session_scope = ?) to fetch the last 10 raw messages for a given scope (main.py, Phase 0 of _add_to_vector_store, both sync and async). Impact Any caller who controls only their own run_id (or agent_id) — a very common integration shape, since apps frequently pass a client-/session-supplied identifier straight through as run_id without namespacing — can craft a value containing &user_id= (or &agent_id= ) that produces a scope string byte-for-byte identical to a different tenant's real scope string. Concretely: Tenant A calls add(msgs, user_id="alice", run_id="proj-x") → scope "run_id=proj-x&user_id=alice". An attacker who can only set run_id calls add(msgs, run_id="proj-x&user_id=alice") → identical scope string. The attacker's next add() call: 1. Reads Tenant A's raw prior conversation via get_last_messages(session_scope) and splices it verbatim into the attacker's own LLM fact-extraction prompt — a direct cross-tenant confidentiality leak (conversation content, potentially including PII, credentials, etc.). 2. Writes into the same colliding row-set via save_messages(), whose eviction logic (DELETE FROM messages WHERE session_scope = ? AND id NOT IN (...)) can evict/interleave Tenant A's history — permanent cross-tenant data corruption, not just a read. Reachable via the public Memory.add() / AsyncMemory.add()
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- npm mem0ai< 3.1.6
- pip mem0ai< 2.0.18
- pypi mem0aiversion unspecified
How to fix CVE-2026-116575
Upgrade
CVE-2026-116575 lists a fix boundary at 3.1.6. Compare the installed build with that boundary before you change production.
Version check
Affected < 3.1.6
Advisory
Open the cve_org record and follow its fix.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
No confirmed exploitation is on record for CVE-2026-116575. EPSS is 0.11%. Act only if a listed version of Mem0: Cross-tenant conversation leak is installed.
Which versions are affected?
Compare what you have installed with < 3.1.6, < 2.0.18. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-200: Exposure of Sensitive Information; CWE-863: Incorrect Authorization. EPSS 0.11%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Oct 28, 2026 · GitHub Advisory Database
Detected
Summary _build_session_scope() in mem0/memory/main.py builds the conversation-history scope key used to fetch/store the last N raw messages by naively joining caller-supplied user_id/agent_id/run_id values with unescaped & and = delimiters: def _build_session_scope(filters): parts = [] for key in sorted(["user_id", "agent_id", "run_id"]): val = filters.get(key) if val: parts.append(f"{key}={val}")
Sources
- CVE.orgVulnerability recordCVE-2026-116575
Official CVE identifier
cve.org - GitHub Advisory DatabasePackage advisoryGHSA-5324-3w58-qpp2
Mem0: Cross-tenant conversation leak via unescaped delimiter collision in session-scope key (_build_session_scope)
github.com - GitLab Advisory DatabasePackage advisoryCVE-2026-116575
Summary _build_session_scope() in mem0/memory/main.py builds the conversation-history scope key used to fetch/store the last N raw messages by naively joining caller-supplied user_id/agent_id/run_id values with unescaped & and = delimiters: def _build_session_scope(filters): parts = [] for key in sorted(["user_id", "agent_id", "run_id"]): val = filters.get(key) if val: parts.append(f"{key}={val}")
advisories.gitlab.com
References
Freshness
Last verified in this catalog Nov 4, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.
- GitHub Advisory DatabaseOct 30, 2026
- CVE.orgOct 29, 2026
- GitLab Advisory DatabaseOct 29, 2026