Summary
OpenClaw contains an authorization logic flaw that lets sandboxed agents override execution routing by specifying host=node, effectively escaping the sandbox.
Under certain configurations, an attacker controlling a sandboxed agent can redirect workloads to remote nodes instead of the intended sandbox paths, bypassing isolation controls.
Affected context
This vulnerability appears in OpenClaw environments where:
- Sandboxed agents are permitted to submit or schedule tasks
- Execution routing relies on host parameters such as
host=nodeto select where code runs - The sandbox boundary assumes routing constraints will keep workloads confined to specific host or path scopes
The issue is most relevant in multi-node, distributed deployments where remote nodes handle both trusted and untrusted workloads and where routing parameters are not fully constrained for sandboxed entities.
Exploit preconditions
- Attack surface: Interfaces used by sandboxed agents to request task execution (e.g., job submission APIs, agent control channels).
- Required access: Ability to act as or compromise a sandboxed agent, including control over task routing parameters such as
host. - Trigger point: Submitting or modifying execution requests that set
host=node(or equivalent routing hints) to force execution on non-sandbox, remote nodes. - Why exploitation is possible: Authorization checks do not correctly enforce separation between sandbox routing and general node routing, allowing untrusted agents to select privileged or non-sandbox execution targets.
Why this happens
The root cause is an authorization bypass in the execution routing logic, mapped to CWE-863: Incorrect Authorization.
Instead of centrally enforcing routing constraints based on the caller's trust level, OpenClaw permits sandboxed agents to influence the host selection, including specifying host=node. The system then honors this request without sufficiently validating whether the agent is allowed to schedule workloads outside of its sandbox context.
Conceptually, this reflects a broken separation-of-duties pattern: routing policies, which should be enforced by trusted control-plane logic, are effectively delegated to untrusted inputs, allowing sandbox escape by configuration rather than by pure code injection.
Potential impact
- Sandbox escape, allowing code controlled by an attacker to run on remote nodes outside the intended sandbox.
- Execution of attacker-controlled workloads on nodes that host more privileged or sensitive services.
- Potential compromise of other tenants or services sharing the affected remote nodes.
- Lateral movement within the cluster or infrastructure by chaining this routing bypass with other weaknesses.
- Violation of isolation guarantees and regulatory requirements for workload separation.
General mitigation guidance
Mitigation typically focuses on tightening authorization and routing policies for sandboxed workloads:
- Enforce strict, server-side routing policies that ignore or constrain
hostand similar parameters for sandboxed agents, binding them to predefined sandbox nodes or paths. - Distinguish clearly between trusted and untrusted callers, and apply least-privilege routing capabilities based on identity and role rather than client-provided hints.
- Introduce policy checks that validate all execution routing decisions against centrally managed access control lists or policies.
- Isolate control-plane configuration from agent-supplied data and treat any routing-related field as untrusted input that must be normalized and validated.
- Consider implementing separate execution pools for sandboxed and non-sandboxed workloads, with no cross-routing based solely on agent-controlled parameters.
How teams detect issues like this
Detection efforts can focus on both code and runtime behavior:
- Static analysis and code review:
- Look for authorization logic where routing decisions (e.g.,
host,node,path) are derived directly from client or agent input. - Flag code paths where sandbox identity or trust level is not checked before honoring routing overrides.
- Review policy enforcement layers to ensure they are invoked for all execution requests, regardless of caller.
- Configuration and policy audits:
- Examine routing and scheduling policies to confirm sandboxed agents cannot select arbitrary nodes.
- Audit role and permission mappings to ensure sandbox roles do not carry broad routing privileges.
- Runtime monitoring:
- Log and alert on sandboxed identities submitting execution requests to unexpected hosts or nodes.
- Monitor for anomalous patterns where sandboxed workloads appear on nodes designated for privileged or production-only tasks.
- Automated security tools and CI/CD checks can be configured to detect patterns of untrusted routing parameters and missing authorization checks in the control plane.

