Redbot Labs / Attack Intelligence

AI Agent Session Isolation Failure

Record ID
RB-080
Severity
Critical
Category
Authorization / Access Control
Confidence Score
98
Published
Updated

Summary

AI Agent Session Isolation Failure occurs when conversation state, persistent memory, retrieved data, tool authorization, credentials, cached results, or execution context from one user or session becomes available to another. The failure can expose sensitive data or allow one user to inherit capabilities and authority established during a different AI-agent interaction.

Executive Summary

Enterprise AI agents rarely operate as isolated language models.

They maintain and consume state across:

Conversation history
Persistent memory
Tool sessions
OAuth connections
API credentials
Retrieval context
Cached responses
Browser sessions
Workflow state
Agent-to-agent messages

Every one of these mechanisms creates a session boundary.

If those boundaries are implemented incorrectly, information or authorization associated with one user can cross into another user’s interaction.

A second user may receive:

Another user’s conversation content
Retrieved enterprise documents
Customer information
Tool results
Stored instructions
Authentication state
Previously authorized actions
Persistent agent memory

The most serious scenario occurs when the leaked state contains authority rather than merely information.

An AI agent may retain a privileged tool session established by an administrator and later execute actions requested by a lower-privileged user.

This converts a state-management problem into an authorization vulnerability.

Redbot’s existing RB-051 Cross-Tenant AI Data Leakage addresses tenant-level disclosure. RB-080 is intentionally narrower at the user, session, memory, and execution-context boundary, allowing testing teams to evaluate isolation even within the same enterprise tenant. Redbot Security

Attack Overview

A legitimate user interacts with an AI agent.

During the interaction, the agent accumulates state such as:

  • Retrieved documents
  • Tool authentication
  • Browser cookies
  • Temporary files
  • Conversation instructions
  • Persistent memory
  • Workflow variables
  • API results

The session ends or another user begins interacting with the system.

Because isolation is incomplete, part of the previous session remains available.

The next user may deliberately probe for that state or encounter it unintentionally.

The vulnerability can exist at several layers.

Conversation Layer

Previous user prompts or responses remain accessible.

Retrieval Layer

Documents retrieved for one user remain cached and accessible to another.

Memory Layer

User-specific facts are stored in shared agent memory.

Tool Layer

OAuth tokens, browser sessions, or API authorization survive across users.

Execution Layer

A workflow continues operating with privileges inherited from a previous session.

Multi-Agent Layer

A downstream agent receives identity or authorization state that does not belong to the initiating user.

The result may be cross-user disclosure, unauthorized action, or privilege inheritance.

Attack Flow

1. Privileged Session Begins
A user interacts with an AI agent and accesses sensitive information or privileged tools.

2. Agent Accumulates State
The environment stores conversation history, memory, tokens, retrieval results, browser state, or workflow variables.

3. Session Terminates or Changes User
The original user leaves or another user begins a new interaction.

4. State Is Not Fully Cleared
One or more pieces of information or authorization remain available.

5. Secondary User Interacts With Agent
A different identity submits queries or invokes tools.

6. Residual State Influences Execution
The agent retrieves previous information or continues using inherited authorization.

7. Isolation Boundary Is Crossed
The second user gains information or capabilities unavailable through their own identity.

8. Unauthorized Disclosure or Action Occurs
Sensitive information may be revealed, or privileged tools may perform actions on behalf of the unauthorized user.

Affected Systems

Enterprise AI assistants
Multi-user AI agents
Multi-tenant AI platforms
Persistent-memory agents
RAG applications
AI customer-service systems
AI coding assistants
Browser-enabled agents
Tool-enabled AI systems
MCP-enabled agents
AI workflow platforms
Multi-agent architectures
Shared agent runtimes
AI SaaS platforms
Enterprise copilots

Business Impact

AI session-isolation failure can create serious enterprise exposure because the affected system may appear properly authenticated while operating with the wrong underlying security context.

Potential consequences include:

Cross-user data disclosure
Cross-customer information exposure
Unauthorized tool execution
Privilege inheritance
Customer record exposure
Cloud-resource access
Confidential document disclosure
Regulatory violations
Unauthorized administrative actions
Loss of tenant isolation

The most serious failures occur when credentials or authorization survive longer than the human session that originally established them.

In that scenario, a low-privileged user may effectively inherit the capabilities of a previously authenticated administrator without ever compromising the administrator’s credential directly.

Testing Methodology

1. Establish Two Test Identities

Create:

User A — privileged identity
User B — restricted identity

Give each account clearly different permissions.

2. Populate User A’s Session

Have User A interact with:

  • Sensitive test documents
  • Restricted RAG content
  • Privileged APIs
  • Administrative tools
  • Synthetic customer information

3. End the Session

Log User A out or terminate the conversation using normal application controls.

4. Start User B Session

Authenticate independently as User B.

Test whether the new session can identify:

  • User A’s conversation
  • Retrieved documents
  • Previous tool results
  • Memory entries
  • Files
  • Workflow variables

5. Test Semantic Retrieval

Do not only request exact previous content.

Probe indirectly using:

  • Summaries
  • Topic descriptions
  • Entity names
  • Related questions
  • Partial phrases

This can identify state leakage hidden by superficial conversation clearing.

6. Test Tool Authorization

Have User A establish an authenticated connection to a privileged enterprise service.

Switch to User B.

Determine whether User B can cause the agent to invoke the previously authenticated tool.

7. Test Browser State

Evaluate whether cookies or authenticated browser sessions survive changes in AI users.

8. Test Concurrent Sessions

Run User A and User B simultaneously.

Look for:

  • Context collisions
  • Shared temporary files
  • Shared caches
  • Tool-state contamination
  • Retrieval crossover

9. Test Memory Isolation

Store unique synthetic information in User A’s persistent memory.

Determine whether User B can retrieve or influence it.

10. Test Multi-Agent Delegation

Verify that user identity and authorization context remain attached to tasks as they move between agents and tools.

Detection Guidance

Monitor for access where the requesting AI user differs from the identity associated with the underlying resource or tool session.

High-value indicators include:

Cross-user conversation retrieval
Cross-tenant document access
Tool calls using credentials associated with another user
Browser sessions surviving user logout
Memory reads referencing unrelated identities
AI responses containing another customer’s identifiers
Retrieval results inconsistent with user ACLs
Shared temporary files between sessions
Privileged actions initiated by restricted users

Correlate:

AI User Identity → Agent Session → Tool Identity → Target Resource

All four should remain attributable to the same authorized security context.

Flag situations where:

User B → Agent Session B → Credential A → Privileged Resource

That chain strongly indicates session or authorization contamination.

Mitigation Guidance

Bind State to Identity

Every conversation, memory object, retrieval result, cached artifact, and workflow variable should carry an explicit owner or authorization context.

Reauthorize Tool Calls

Do not assume that because an agent previously authenticated to a service, every future user may use that connection.

Clear Session State

Destroy ephemeral:

  • Credentials
  • Browser cookies
  • Temporary files
  • Tool results
  • Retrieval context
  • Workflow state

when sessions terminate.

Isolate Persistent Memory

Separate memory by:

User
Tenant
Role
Application

as appropriate.

Enforce Authorization at the Data Layer

Do not depend on the LLM to decide whether retrieved information belongs to the current user.

Apply ACL enforcement before content enters model context.

Use Per-User Delegated Credentials

Prefer credentials representing the initiating user’s privileges instead of broad shared service accounts.

Propagate Identity Through Agent Chains

When one agent delegates work to another, preserve the original caller’s identity and authorization scope.

Prevent Credential Inheritance

New sessions should never automatically inherit authenticated external-service sessions established by another user.

Test Session Teardown

Security testing should verify that logout actually removes both application state and agent state.

Log Authorization Context

Every tool invocation should record:

  • Human identity
  • AI-agent identity
  • Credential identity
  • Requested action
  • Target resource

MITRE Mapping

T1078 Valid Accounts, T1078.004 Cloud Accounts, T1550 Use Alternate Authentication Material, T1530 Data from Cloud Storage

OWASP Mapping

LLM02:2025 Sensitive Information Disclosure, LLM06:2025 Excessive Agency

Technical References

Redbot Security / Redbot Labs

Redbot Labs — RB-051 Cross-Tenant AI Data Leakage
Directly related at the tenant boundary. RB-080 extends isolation testing to users and individual execution sessions. Redbot Security

Redbot Labs — RB-045 AI Agent Memory Poisoning
Relevant where shared or improperly scoped persistent memory causes state to cross user boundaries. Redbot Security

Redbot Labs — RB-049 AI Tool Authorization Bypass
Important where a new user can invoke tools through authorization established by another identity. Redbot Security

Redbot Security — AI Data Leakage Risks: Protecting Sensitive Information in LLMs
Relevant Redbot guidance covering memory, retrieval, prompts, and workflow trust boundaries in enterprise AI. Redbot Security

Redbot Security — LLM Security Testing for Enterprise Applications
Relevant methodology for validating hidden trust and authorization assumptions throughout integrated AI applications. Redbot Security

Redbot Security — Defending in the Mythos Era
Relevant to Redbot’s broader approach of testing agent, identity, API, tool, and workflow boundaries beyond the model itself.

MITRE ATT&CK — T1078 Valid Accounts MITRE ATT&CK

MITRE ATT&CK — DET0560 Detection of Valid Account Abuse Across Platforms MITRE ATT&CK

MITRE ATT&CK — T1098 Account Manipulation MITRE ATT&CK

OWASP GenAI Security Project — Sensitive Information Disclosure

OWASP GenAI Security Project — Excessive Agency

Related Attack Intelligence