T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- SKILL.md:11
- Finding
- Automatic Use of a Persistent Authenticated Browser Profile<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 11–15, 24, and 64–68 **Vulnerability Type**: `T05: Unauthorized Access and Privilege Escalation` **Risk Level**: High ### Vulnerable Code ```text user_data_dir = /home/kncao/.openclaw/browser-profiles/main-identity headless = False(必须,否则 X/Twitter 会返回空白) ``` ```python USER_DATA_DIR = '/home/kncao/.openclaw/browser-profiles/main-identity' ``` ```text ## 触发条件 - 用户要求「搜索外网」「搜一下」 - 用户指定以下网站:YouTube、GitHub、HuggingFace、Reddit、Kaggle、X/Twitter - 任何需要登录态才能访问的内容抓取 ``` ### Technical Analysis The skill instructs the agent to open a fixed persistent Chromium profile named `main-identity`. Such profiles can contain authenticated cookies, session tokens, local storage, browsing history, and other account-associated data. The activation criteria are broad: a generic request to search the external web or access one of several named sites can cause the skill to use this authenticated identity. The instructions do not require explicit, per-invocation consent before accessing the profile and do not restrict navigation to an allowlist of approved origins. This crosses a least-privilege boundary because an ordinary search request does not inherently require access to the user's authenticated accounts. Although the supplied template only extracts text, pages loaded through the persistent profile may expose private account content to the agent. The browser context also remains capable of performing authenticated actions if the template is extended or used interactively. ### Attack Path 1. A user, delegated task, or untrusted request asks the agent to search the web or access one of the listed sites. 2. The skill activates under its broad trigger conditions. 3. Chromium opens `/home/kncao/.openclaw/browser-profiles/main-identity`. 4. Existing cookies and session state authenticate the browser to supported websites. 5. The requested page can expose account-specific or private content to the agent. 6. If na ...[truncated 800 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Require explicit user confirmation before opening any authenticated browser profile. - Do not activate authenticated browsing for generic requests such as “search the web.” - Use an isolated, dedicated automation profile with only the minimum required website sessions. - Implement a strict allowlist for destination origins and reject redirects to unapproved origins. - Separate anonymous browsing from authenticated browsing, defaulting to the anonymous context. - Prohibit account-modifying actions unless the user separately and explicitly approves the exact action. - Restrict extracted data to the minimum required for the task and prevent unnecessary retention. - Consider copying only narrowly scoped session material into an ephemeral profile rather than opening the user's primary persistent profile. ]]>
