T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- SKILL.md:34
- Finding
- Unrestricted Access to Persistent Root Workspace State<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 34-43 **Vulnerability Type**: Unauthorized access to persistent agent state **Risk Level**: Medium ### Vulnerable Code ```markdown ## Self-improving loop (mandatory) Before generating a new run: 1. Read `/root/.openclaw/workspace/memory/charisma-insight-ledger.md`. 2. Identify what was already sent recently and mark those clusters as `DONE` in today’s section when superseded. 3. Choose at least 3 new angles not used in the most recent 3 runs. 4. Generate the new 5-insight set. 5. Append a compact run log to the ledger: - timestamp - themes used - novelty score (1-10) - repeated ideas avoided - one improvement for next run ``` ### Technical Analysis The Skill requires both reading from and writing to a fixed path inside the root user's persistent OpenClaw workspace. This behavior crosses the boundary of a self-contained content-generation task and assumes access to agent-wide persistent state without verifying authorization, ownership, path scope, or the sensitivity of existing ledger contents. Because the path is under `/root`, execution may require or inherit highly privileged filesystem access. The Skill also makes the operation mandatory and provides no fallback for an unavailable or unauthorized ledger. Although the prescribed writes are compact run logs rather than executable rules, they persist across sessions and can affect the content of subsequent runs. No direct privilege-escalation exploit, arbitrary path construction, or secret extraction mechanism is shown in the audited file. The risk arises from requiring access beyond the minimum scope needed to generate the requested insights. ### Attack Path 1. A user or automated process invokes the Skill. 2. The agent follows the mandatory workflow and opens `/root/.openclaw/workspace/memory/charisma-insight-ledger.md`. 3. Existing persistent content is read and incorporated into decisions about future output. 4. Th ...[truncated 554 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Store the ledger in a dedicated, least-privileged, Skill-specific data directory rather than under `/root`. - Require explicit user or administrator authorization before reading or modifying persistent agent memory. - Resolve and validate the canonical file path before access, and enforce an allowlisted storage root. - Run the Skill under a non-root service account with access restricted to its own state file. - Use file permissions that prevent unrelated Skills or users from reading or modifying the ledger. - Define a safe fallback that generates insights without persistent state when the ledger is unavailable. - Record and expose proposed ledger changes for approval when the Skill is run interactively. - Avoid storing sensitive conversation content, credentials, recipient information, or other personal data in the ledger. ]]>
