T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/douyin_search.py:178- Finding
Silent Reuse of an External Privileged Browser Profile
- Content
View full analysis
Vulnerability Details
File Location:
scripts/douyin_search.py, lines 24 and 178–182
Vulnerability Type: Unauthorized access to an unrelated authenticated browser profile
Risk Level: HighVulnerable Code:
python OPENCLAW_PROFILE = "/root/.openclaw/browser/openclaw/user-data"python # Step 2: Try with OpenClaw browser profile if os.path.exists(OPENCLAW_PROFILE): result2 = search_with_playwright(keyword, count, profile_dir=OPENCLAW_PROFILE) if result2["count"] > 0: return result2Technical Analysis
When a search using the skill-specific profile does not return results, the script automatically checks for and opens the external profile at
/root/.openclaw/browser/openclaw/user-data. A browser profile can contain authenticated cookies, session tokens, browsing state, local storage, and other sensitive data belonging to services outside this skill.The fallback occurs automatically and does not require an explicit command-line option or informed user approval. It therefore crosses the least-privilege boundary represented by the skill’s documented
.browser-profile/directory. The use of a path under/rootfurther indicates that the accessed state may belong to a privileged execution context.The code does not directly export profile contents, and no credential-exfiltration mechanism was found. Nevertheless, opening the external profile makes its authenticated state available to the browser context and to pages loaded in that context. Directly opening a shared profile may also conflict with another running browser process or corrupt profile data.
Attack Path
- The user invokes a normal Douyin search.
- The script searches using its own
.browser-profile/. - The first search returns no results.
- The script detects
/root/.openclaw/browser/openclaw/user-data. - Without requesting consent, it launches a persistent Chromium context using that exte ...[truncated 932 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the automatic
OPENCLAW_PROFILEfallback and restrict the skill to its dedicated.browser-profile/directory. - If external profile reuse is required, place it behind an explicit command-line option that is disabled by default.
- Obtain informed user consent before accessing any profile not created by this skill.
- Validate configured profile paths and reject system, root-owned, shared, or unrelated browser profiles by default.
- Do not directly open a profile that may be used by another browser process.
- Prefer a dedicated least-privilege profile containing only the minimum Douyin authentication state.
- Run the skill under an unprivileged service account and enforce filesystem permissions preventing access to unrelated profiles.
- Clearly document what browser state is accessed, how long it is retained, and how users can delete or revoke it.
- Remove the automatic
