T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- SKILL.md:27
- Finding
- OpenClaw Configuration Is Unnecessarily Exposed to Terminal Output<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:27-30` **Vulnerability Type**: Excessive access to potentially sensitive configuration **Risk Level**: Medium ### Vulnerable Code ```markdown #### 자신의 `agent_id` 확인 ``` cat ~/.openclaw/openclaw.json ``` ``` ### Technical Analysis The documentation directs the user or executing agent to print the entire `~/.openclaw/openclaw.json` file merely to identify an `agent_id`. This violates the principle of least privilege because all fields in the configuration are disclosed even though only one field is required. The audit did not establish the exact contents of this configuration file. Nevertheless, configuration files can contain unrelated operational or sensitive values. Printing the complete file makes every contained field visible to the terminal, command logs, session recordings, agent context, and any process collecting standard output. ### Attack Path 1. A user or agent follows the documented setup procedure. 2. The command `cat ~/.openclaw/openclaw.json` reads the entire OpenClaw configuration. 3. The complete contents are emitted to standard output. 4. Terminal logging, session capture, shared agent context, or another observer obtains fields unrelated to discovering `agent_id`. 5. Any exposed sensitive values can be used according to the permissions those values provide. ### Impact Assessment This issue provides no direct privilege escalation by itself. Its impact depends on the actual contents of the local configuration file. At minimum, it exposes configuration metadata beyond the task's needs. If credentials or other sensitive settings are present, their associated access scope could also be exposed. ]]>
- Remediation
- <![CDATA[ ## Remediation Suggestions - Replace the full-file `cat` command with strict extraction of only the required field. - Use an appropriate JSON parser, for example: ```bash jq -r '.agent_id' ~/.openclaw/openclaw.json ``` - Adapt the JSON path to the actual documented schema and fail if the selected field is absent or is not a string. - Do not place the complete configuration file into prompts, logs, examples, or diagnostic output. - Ensure the configuration file has restrictive filesystem permissions, such as owner-only read and write access where operationally appropriate. ]]>
