Summary
OpenClaw before 2026.3.11 contains a sandbox escape vulnerability in the session_status tool that allows sandboxed subagents to read or modify session state belonging to their parent or sibling sessions.
By supplying arbitrary sessionKey values, an attacker can operate outside their intended sandbox scope, potentially tampering with persisted model overrides and other sensitive session data.
Affected context
This vulnerability affects OpenClaw deployments using the session_status tool to introspect or manipulate session state for agents and subagents.
It is particularly relevant where:
- Subagents are assumed to be confined to isolated session sandboxes
- The
session_statustool is exposed to untrusted or semi-trusted agent logic - Session state includes sensitive configuration such as persisted model overrides, routing decisions, or user-specific context
The risk increases in multi-tenant environments where different users or workflows share the same OpenClaw infrastructure.
Exploit preconditions
- Attack surface: The
session_statustool interface invoked by sandboxed subagents or other session-scoped components. - Required access: Ability to call
session_statusand control thesessionKeyparameter from within a sandboxed subagent or scoped context. - Trigger point: Sending a crafted request or invocation that specifies a
sessionKeyfor a parent or sibling session instead of the caller's own session. - Why exploitation is possible: The authorization check for
session_statusrelies on the suppliedsessionKeywithout enforcing that it belongs to the caller's sandbox, allowing bypass of intended isolation boundaries.
Why this happens
The core issue is an authorization flaw where access control is performed implicitly or inadequately on a parameter that identifies the target session.
Instead of deriving or strictly validating the effective session scope from trusted context, the implementation trusts the caller-provided sessionKey, enabling access to session data outside the caller's sandbox.
This aligns with CWE-863: Improper Authorization, where the system fails to correctly verify whether the subject (sandboxed subagent) is permitted to act upon the specified object (parent or sibling session state).
Abstractly, this reflects a broken multi-tenant isolation pattern: resource identifiers are externally controllable and not bound to the authenticated or sandboxed identity.
Potential impact
- Sandboxed subagents may read sensitive data from parent or sibling sessions, including user context and configuration.
- Attackers can modify session state outside their scope, influencing behavior of other agents or workflows.
- Persisted model overrides can be tampered with, leading to unexpected or malicious model behavior.
- Cross-session data leakage that undermines tenant isolation and privacy guarantees.
- Indirect escalation of privileges if modified session state grants broader capabilities to other components.
General mitigation guidance
Effective mitigation focuses on enforcing strict authorization around session identifiers and sandbox boundaries:
- Derive the target session identity from trusted execution context (e.g., caller's bound session) rather than caller-controlled parameters whenever possible.
- Where a
sessionKeyparameter is necessary, validate that it belongs to the caller's authorized scope (e.g., same sandbox, tenant, or ownership). - Implement centralized access control checks for session operations, ensuring read and write paths use the same authorization logic.
- Treat session state as multi-tenant data and apply least-privilege principles, exposing only the minimal subset of state required to subagents.
- Design the sandbox API surface so that subagents cannot reference arbitrary session identifiers, preferring capability-style handles tied to their own context.
How teams detect issues like this
High-level approaches for detecting similar authorization flaws include:
- Static analysis rules that flag direct use of caller-controlled identifiers (like
sessionKey) in authorization or lookup logic without accompanying ownership checks. - Code review practices that require explicit mapping between a caller's identity/sandbox and the resources they are allowed to access, especially in session and tenant management code.
- Policy enforcement that discourages "pass-through" resource identifiers in privileged tools (such as
session_status) without server-side derivation or validation. - Runtime monitoring and logging that capture cross-session access patterns, such as a single subagent querying multiple distinct
sessionKeyvalues, enabling anomaly detection.

