T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:39- Finding
Overbroad Collection of Sensitive Session and Agent Memory Data
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 39–42; related processing instructions at lines 65–73 and 107–109
Vulnerability Type:T05: Unauthorized Access and Privilege Escalation
Risk Level: MediumVulnerable Code Snippet
markdown ## Inputs - Session directory: `~/.openclaw/agents/<agentId>/sessions/` - Optional index: `sessions.json` - Memory files in the workspace (`memory/*.md`; `MEMORY.md` only where allowed) - Current plans, blackboards, receipts, service state, git state, and task artefacts when relevantRelated instructions expand the collection to session messages and operational state:
markdown 1. **Inventory the station** - List relevant sessions and artefacts by date/size. - Read current plans, blackboards, locks, service state, and receipts when the task used them. - Resolve which work is complete, active, abandoned, or blocked. 2. **Extract user intent and constraints first** - Read authenticated user messages before assistant/tool output. - Preserve the newest applicable decision. - Render exact protected targets as `DO_NOT_TOUCH: <target>`.The supplied command examples directly parse user messages from session transcripts:
bash ls -lt ~/.openclaw/agents/main/sessions/*.jsonl jq -r 'select(.message.role=="user") | .message.content[]? | select(.type=="text") | .text' <session>.jsonl jq -r '.message.content[]? | select(.type=="toolCall") | .name' <session>.jsonl | sort | uniq -c | sort -rnTechnical Analysis
The Skill instructs an agent to enumerate and inspect session transcripts, persistent memory, plans, blackboards, service state, locks, receipts, and authenticated user messages. These resources can contain private conversations, credentials, internal paths, protected operational details, or information unrelated to the handover task.
The stated handover purpose provides a le ...[truncated 2369 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit user authorization before reading historical session transcripts, persistent memory, or service-state artifacts.
- Constrain collection to a specified Agent ID, current task, approved session list, and bounded time range.
- Default to metadata, known receipt paths, and user-selected artifacts instead of scanning complete transcripts.
- Add a pre-ingestion filter that excludes credentials, tokens, private keys, unrelated messages, and data outside the active task.
- Apply data minimization before content enters model context; post-collection redaction alone is insufficient.
- Require confirmation before writing or updating durable memory, blackboards, or
SESSION_NOTES.md. - Define access controls, retention periods, expiration behavior, and secure deletion procedures for generated handover notes.
- Record an audit receipt listing which source files were accessed and which destination was written, without recording sensitive contents.
- Add an explicit prohibition against reading sessions belonging to other users, agents, or tasks unless separately authorized.
- Preserve the existing security-redaction requirement, but supplement it with deterministic secret scanning and a final review before persistence.
