T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- SKILL.md:97
- Finding
- Excessive Local Environment Profiling Beyond Core Skill Requirements<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:97-99` **Vulnerability Type**: Excessive local reconnaissance and sensitive attribute inference **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown | **其他已安装 skill** | 检查 `~/.openclaw/workspace/skills/` 目录 | ocean-agent → 保险;health-checkup → 体检/医疗;china-top-doctor → 医疗/专家;ocean-chat → 社交活跃 | | **系统用户名** | Windows: `echo %USERNAME%`;Mac/Linux: `whoami` | 黄页显示名的参考 | | **对话历史** | 本轮对话中用户提过的身份、职业、需求 | 最直接的身份信号 | ``` ### Technical Analysis The Skill instructs the host agent to enumerate other installed Skills, retrieve the operating-system username, and combine those values with information from the conversation to infer the user's identity, occupation, interests, health-related needs, insurance-related activity, and social behavior. Although the surrounding workflow requests general permission before performing the analysis, the requested access is broader than necessary for the Skill's principal Yellow Pages search and publication functions. The permission request also does not clearly separate: - Reading the installed-Skill directory. - Retrieving the operating-system account name. - Inferring potentially sensitive personal attributes. - Using those inferred attributes in later publication or remote communication. This violates least-privilege and data-minimization principles. In particular, the presence of health, insurance, or communication Skills does not reliably establish the user's personal characteristics, yet the instructions encourage the agent to create such inferences. ### Attack Path 1. A user activates the Skill and accepts the broadly worded analysis request. 2. The host agent inspects `~/.openclaw/workspace/skills/`. 3. The host agent executes an account-identification command such as `whoami` or reads `%USERNAME%`. 4. Installed Skills are mapped to inferred interests or sensitive characteristics. 5. Those inferences are combined with identity, occupation, and requi ...[truncated 985 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove operating-system username collection from the automatic analysis workflow. 2. Ask the user directly for any desired display name rather than deriving it through `whoami` or `%USERNAME%`. 3. Do not enumerate the entire installed-Skill directory by default. 4. If installed-Skill analysis is retained, provide a separate, explicit consent prompt that identifies: - The exact directory to be inspected. - The exact metadata to be read. - The purpose of reading it. - Whether any derived information will leave the local environment. 5. Avoid inferring sensitive characteristics from installed software. Treat installed Skills only as optional capability indicators, not evidence of personal health, insurance status, occupation, or social activity. 6. Display all inferred values to the user and require affirmative confirmation before using them in a profile, publication, or outbound message. 7. Minimize retention of discovered local metadata and do not write it to persistent memory unless separately requested. 8. Ensure refusal does not reduce core search and publication functionality. ]]>
