T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:76- Finding
Overbroad Access to Private Conversation History
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 76-78
Vulnerability Type: Excessive access to sensitive session transcripts
Risk Level: MediumVulnerable Code
bash tail -20 ~/.clawdbot/agents/main/sessions/*.jsonl | jq -r 'select(.message.role=="user") | .message.content[0].text' 2>/dev/null | tail -10Technical Analysis
The documented diagnostic command uses the wildcard
*.jsonlto read every session transcript in the main agent's session directory. It then extracts and displays raw user-message text.This access is broader than necessary for the Skill's declared performance, response-time, error, token-usage, and API-cost diagnostics. Session transcripts may contain credentials, personal data, proprietary information, or conversations unrelated to the current diagnostic request. Displaying those messages also places them into terminal output and potentially the Agent's active context.
No network transmission or privilege-escalation mechanism was identified. The risk arises from crossing least-privilege and data-minimization boundaries through unnecessary access to sensitive local records.
Attack Path
- A user or Agent loads the Skill to diagnose Clawdbot behavior.
- The Agent follows the “Parse session file for recent messages” guidance in
SKILL.md. - The shell expands
~/.clawdbot/agents/main/sessions/*.jsonlto all matching session transcripts. tailreads records from those files.jqselects user messages and extracts their raw text.- Sensitive content from unrelated sessions is exposed in command output and may enter the Agent's context.
Impact Assessment
An invocation can disclose private user-message contents from any readable transcript under the main agent's session directory. The scope is limited to files accessible under the invoking user's existing permissions; the code does not acquire elevated operating-system privileges.
Potentially exposed data includes personal informat ...[truncated 180 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the raw conversation-content command from the default diagnostic workflow.
- Use metadata-only diagnostics wherever possible, such as timestamps, roles, message counts, token totals, durations, and error codes.
- If message-body inspection is genuinely required, obtain explicit user consent and require selection of one specific session rather than using a wildcard.
- Validate the selected session identifier and construct a single canonical file path confined to the expected session directory.
- Redact credentials, tokens, personal data, and other secrets before printing content.
- Limit output by record count and fields, and clearly warn that transcript inspection may reveal sensitive data.
- Avoid placing raw transcript content into Agent context or persistent logs.
