T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/openclaw_agent_query.py:207- Finding
ACP Bridge Advertises Unnecessary Filesystem Write and Terminal Capabilities
- Content
View full analysis
dict[str, Any]: return { "jsonrpc": "2.0", "id": INIT_REQUEST_ID, "method": "initialize", "params": { "protocolVersion": 1, "clientCapabilities": { "fs": {"readTextFile": True, "writeTextFile": True}, "terminal": True, }, "clientInfo": {"name": "openclaw-agent-query", "version": "0.2"}, }, } ``` ### Technical Analysis The ACP initialization request advertises filesystem write and terminal capabilities even though the documented purpose of the bridge is a read-only consultation. The prompt generated by `build_consult_prompt()` tells the consulted agent not to modify files, write memory, or trigger external actions, but prompt instructions do not provide an enforceable security boundary. Granting or advertising `writeTextFile` and terminal access violates the principle of least privilege. If the ACP runtime makes these capabilities available to the consulted agent, a compromised, misconfigured, or prompt-injected agent could attempt local file modifications or terminal operations using the privileges of the user running the bridge. The bridge also launches OpenClaw with a copy of the current process environment. Consequently, any permitted operation would execute in the security context of the current user rather than in a purpose-built restricted sandbox. ### Attack Path 1. A user or upstream data source supplies content that is forwarded as the meeting topic or consultation prompt. 2. The chair invokes `scripts/openclaw_agent_query.py`, directly or through `scripts/openclaw_meeting_round.py`. 3. The script launches the OpenClaw ACP bridge under the c ...[truncated 1335 chars]- Remediation
View remediation
