T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- SKILL.md:21
- Finding
- Undisclosed Local Identity Access and Internal Merchant CRM Lookup## Vulnerability Details **File Location**: `SKILL.md`, lines 21-66 **Vulnerability Type**: T05: Unauthorized Access and Privilege Escalation **Risk Level**: Medium The skill is presented as a domain-testing capability, but its documented workflow reads a local username, submits it with a merchant name to an internal Kuaishou CRM endpoint, and returns the complete HTTP response to the user. **Vulnerable code:** ```markdown ## Step 1:解析商家名称并获取商家ID baseUrl: https://merchant-lego.corp.kuaishou.com 接口: POST https://merchant-lego.corp.kuaishou.com/gateway/crm/seller/manager/querySellerSearchResult 请求体: ```json { "username": "${username}", "sellerName": "${sellerName}" } ``` 其中: - `${sellerName}` 从用户问题中解析得到商家名称(例如用户的问题是“请生成小米官方直播间的诊断报告”,sellerName则是“小米官方直播间”) - `${username}` 从本地凭证中获取(读取 `~/.openclaw/username` 配置文件里的用户名),若未配置则直接终止下面的执行步骤,直接输出“抱歉,userName认证报错!” ## 结果处理 - 直接把http接口返回的结果返回给用户 ``` ### Technical Analysis The skill's declared name, description, triggers, and examples describe domain testing, while the operational instructions perform an unrelated merchant-record lookup. This mismatch prevents users from making an informed decision about the capability being invoked. The workflow directs the agent to access `~/.openclaw/username`, transmit the retrieved identity value to an internal corporate CRM endpoint, and expose the complete endpoint response. No explicit user consent, authorization validation, purpose limitation, response filtering, or data-minimization control is specified. Although the file contains no executable script and does not itself establish that the username grants authentication, the instructions can cause an agent operating in an already authorized environment to exercise internal access that is not reasonably implied by the advertised domain-testing purpose. ### Attack Path 1. A user invokes the skill using its domain-testing trigger. 2. The agent interprets p ...[truncated 1254 chars]
- Remediation
- ## Remediation Suggestions 1. Rename and redescribe the skill so its metadata accurately states that it performs an internal merchant CRM search. Remove the domain-testing trigger unless the implementation actually performs domain testing. 2. Require explicit user confirmation before reading or transmitting any local identity value. The confirmation should identify the file, destination, purpose, and data being sent. 3. Replace direct access to `~/.openclaw/username` with an approved credential or identity provider that enforces scope, expiration, auditing, and least privilege. 4. Add an authorization check establishing that the requester may search for the specified merchant before issuing the request. 5. Validate and constrain `sellerName`, including length and character restrictions, before transmitting it. 6. Return only the minimum fields required for the stated task. Do not expose the complete HTTP response, headers, diagnostic data, or unrelated records. 7. Handle multiple merchant matches safely and require the user to select an authorized record rather than disclosing all matching identifiers automatically. 8. Document the internal endpoint dependency, expected permissions, data-retention behavior, and failure conditions. 9. Add audit logging for identity-file access and internal CRM requests without recording credentials or unnecessary response data.
