T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:13- Finding
Unrestricted Search of Sensitive Session and Transcript History
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 13-18
Vulnerability Type: Sensitive local history access
Risk Level: MediumCode Snippet:
markdown Default command: ```bash /root/.openclaw/workspace/tools/ocgrep "keyword" --last 7d --opentext ### Technical Analysis The skill directs the agent to search and open local OpenClaw session and transcript history. Such records may contain private conversations, credentials, tool arguments, operational details, or other information originally supplied in a different context. The `--open` option requests exact file and line references, facilitating direct access to matching records. The skill does not document authorization checks, session ownership validation, output redaction, or restrictions limiting searches to records the current user is permitted to inspect. The behavior is explicitly documented and does not itself prove malicious intent or external exfiltration. Nevertheless, it creates a least-privilege and privacy risk when the skill is available to an agent or user who should not have unrestricted access to historical sessions. ### Attack Path 1. An actor invokes the skill with a keyword associated with sensitive historical information. 2. The wrapper searches locally stored OpenClaw transcripts for matching records. 3. The actor uses `--open` to obtain exact file and line references. 4. Sensitive content from another session or context is read into the current interaction. 5. The information may subsequently be disclosed, copied, or used for further reconnaissance. ### Impact Assessment Exploitation may expose any session-history content readable by the account executing the wrapper, including historical messages, tool calls, channel metadata, operational errors, and secrets accidentally recorded in transcripts. The scope is limited by the filesystem permissions and filtering behavior of the external `ocgrep` executable, who ...[truncated 58 chars]- Remediation
View remediation
Remediation Suggestions
- Require explicit user authorization before searching historical conversations.
- Restrict searches to sessions owned by or expressly shared with the requesting principal.
- Enforce an allowlisted transcript root inside the wrapper rather than relying only on skill instructions.
- Disable unrestricted file opening or require confirmation before returning exact file and line contents.
- Redact credentials, tokens, private keys, and other sensitive values from search output.
- Record an audit log containing the requesting identity, search scope, query, and accessed sessions.
- Run the search utility under a dedicated least-privileged account with access only to approved transcript data.
