Skip to content

Critical Cross-Agent Memory Injection & Privilege Escalation in MemoryManager #549

Description

@QiuYucheng2003

Checked other resources

  • I added a very descriptive title to this issue.
  • I am sure the issue hasn't been already addressed by searching through https://github.com/agiresearch/AIOS/issues.
  • The usage issue is not resolved by updating to the latest stable version in the main branch.

Describe your current environment

AIOS Version: Latest main branch

OS/Environment: Any (Architectural flaw, independent of OS)

Configuration: Multi-Agent deployment with shared MemoryManager / Zep or Mem0 provider

Describe the bug

There is a critical security vulnerability in the current MemoryManager implementation that allows for Cross-Agent Indirect Prompt Injection and potential Privilege Escalation.

The vulnerability stems from the lack of strict isolation between Agent virtual process spaces within the shared memory layer. Specifically, the current design permits an unprivileged Agent (e.g., a public-facing crawler) to inject malicious system instructions into the shared memory backend (Zep/Mem0). Due to the lack of context isolation in LLMAdapter and MemoryManager, when a high-privileged System Agent retrieves memory using a common user_id, these malicious instructions are inadvertently injected into the System Agent's System Prompt or task execution context.

Impact:

Cross-Agent Interference: A low-privileged Agent can pollute the memory of an unrelated high-privileged Agent.

Privilege Escalation: By poisoning the System Agent's retrieval context, an attacker can hijack the Agent to execute high-privilege tools (e.g., system_manager_tool) that the attacker would not normally have permission to access.

System Hijacking: The vulnerability behaves similarly to a buffer overflow in classic OS architecture, where data in the memory pool is misinterpreted as control instructions by the LLM, leading to potential full system takeover.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugreport bugs that need to be fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions