🇰🇷 한글 설명
Mem0는 AI 에이전트와 애플리케이션을 위한 영구 메모리 인프라를 제공합니다. 이전 버전의 Python SDK(2.0.18 미만)와 TypeScript SDK(3.1.6 미만)에서는 user_id, agent_id, run_id 값을 이스케이프 없이 & 및 = 구분자로 결합하여 서로 다른 테넌트가 동일한 session_scope 키를 생성할 수 있어, 다른 테넌트의 대화 이력 노출과 덮어쓰기 또는 혼입이 발생할 수 있습니다.
💡 쉬운 설명
AI 메모리 시스템이 서로 다른 고객의 대화 기록을 구분하지 못하는 결함이 있습니다. 공격자가 특정 식별자를 조작하면 다른 고객의 대화 내용을 볼 수 있습니다.
🇺🇸 원문 (English)
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.
📍 영향받는 시스템
Mem0 Python SDK 2.0.18 미만, TypeScript SDK 3.1.6 미만
⚔️ 공격 벡터
사용자 식별자(user_id, agent_id, run_id)에 구분자 문자를 삽입해 다른 테넌트의 session_scope 키와 충돌시켜 타인의 메시지 이력을 조회하거나 간섭
🛡️ 대응 방법
Python SDK를 2.0.18 이상, TypeScript SDK를 3.1.6 이상으로 업데이트
🔧 검증 코드
출력된 버전이 2.0.18 미만이면 취약하며, 2.0.18 이상이면 패치가 적용된 것입니다 (TypeScript는 npm list mem0ai로 3.1.6 이상 확인)
pip show mem0ai 2>/dev/null | grep -i version