{"id":2668,"cve":"CVE-2026-116575","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-116575\/","cwe":"CWE-200","cwe_number":200,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/200","cvss_score":6.3,"published":"2026-10-26","owasp":"A01 Broken Access Control","odc":"Interface","cdc":"Incorrect Interface","category":"Input Validation and Sanitization","subcategory":"Insecure Direct Object References (IDOR)","scope":"Remote","impact":"Information Disclosure","summary":"Unescaped user_id\/agent_id\/run_id allow session_scope key collision, exposing cross\u2011tenant data.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-116575\/","description":"Mem0 provides persistent memory infrastructure for AI agents and applications. Prior to Python SDK 2.0.18 and TypeScript SDK 3.1.6, _build_session_scope() in mem0\/memory\/main.py and Memory.buildSessionScope() in the TypeScript SDK join caller-controlled user_id, agent_id, and run_id values using unescaped & and = delimiters. A caller can embed another scope component in a controlled identifier so that distinct tenant tuples produce the same session_scope key. Memory.add(), AsyncMemory.add(), and the REST POST \/memories flow use that key to read and save recent raw messages, allowing cross-tenant conversation disclosure and eviction or interleaving of another tenant's history. This issue is fixed in Python SDK 2.0.18 and TypeScript SDK 3.1.6.","solution":"Upgrade to\u202fPython\u202fSDK\u202f\u2265\u202f2.0.18\u202fand\u202fTypeScript\u202fSDK\u202f\u2265\u202f3.1.6.","affected_component":"Python SDK, TypeScript SDK","fixed_by_upgrading":true,"vulnerable_code":"import urllib.parse\n\ndef _build_session_scope(user_id: str, agent_id: str, run_id: str) -> str:\n    # VULNERABLE: unescaped concatenation allows IDOR\n    return f\"user_id={user_id}&agent_id={agent_id}&run_id={run_id}\"\n","patched_code":"import urllib.parse\n\ndef _build_session_scope(user_id: str, agent_id: str, run_id: str) -> str:\n    # FIX: escape components to prevent key collisions\n    safe_user = urllib.parse.quote_plus(user_id, safe='')\n    safe_agent = urllib.parse.quote_plus(agent_id, safe='')\n    safe_run = urllib.parse.quote_plus(run_id, safe='')\n    return f\"user_id={safe_user}&agent_id={safe_agent}&run_id={safe_run}\"\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[{"repository":"mem0ai\/mem0","commit_url":"https:\/\/github.com\/mem0ai\/mem0\/commit\/71f2ebefa3494da21550fb525216818776cde67f","commit_subject":"fix(memory): escape delimiters when building the session scope key (#6892)","units":[{"file":"mem0\/memory\/main.py","function":null},{"file":"mem0\/memory\/main.py","function":"_build_session_scope"}]}],"references":null}