T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/connect-chrome.sh:69- Finding
Persistent Profile-Wide Control of the User's Authenticated Chrome Browser
- Content
View full analysis
Vulnerability Details
File Location:
scripts/connect-chrome.sh:69-73; supporting behavior is documented inSKILL.md:21-25, 41-53, 148-153
Vulnerability Type: Excessive privilege and authenticated browser access
Risk Level: HighVulnerable Code
bash # --- 写入 Hermes config --- WS_URL_FOR_CONFIG="$WS_URL" if command -v hermes >/dev/null 2>&1; then hermes config set browser.cdp_url "$WS_URL_FOR_CONFIG" 2>&1 | grep -v "^$" || true echo "config: browser.cdp_url set"Technical Analysis
The script persistently configures Hermes to connect through Chrome DevTools Protocol to the user's ordinary Chrome profile. The project documentation explicitly states that this profile contains the user's existing cookies and authenticated sessions and that all browser tabs are shared.
CDP access is not limited to a single target website, isolated tab, or narrowly scoped account. It can permit browser automation to inspect page content, navigate authenticated applications, execute JavaScript in page contexts, and perform actions through any sessions available in the connected profile.
The endpoint is written to persistent Hermes configuration rather than being restricted to the lifetime of the script. The documentation notes that new sessions continue to read this configuration until
browser.cdp_urlis manually cleared. Consequently, the privilege remains available after the immediate task has ended.Attack Path
- The user enables remote debugging for their everyday Chrome instance.
- The user runs
connect-chrome.sh. - The script reads the browser-level CDP endpoint from
DevToolsActivePort. - The script persistently writes that endpoint to
browser.cdp_url. - Hermes browser operations attach to the user's daily Chrome profile.
- A compromised, malicious, or incorrectly directed agent navigates to an unrelated authenticated service or accesses an existing sensi ...[truncated 851 chars]
- Remediation
View remediation
Remediation Suggestions
- Require a dedicated Chrome profile containing only the accounts and data necessary for the task.
- Display an explicit confirmation that CDP grants control over all tabs and authenticated sessions in the selected profile.
- Prefer an ephemeral connection mechanism instead of writing the endpoint into persistent configuration.
- Automatically clear
browser.cdp_urlon normal exit and through anEXIT,INT, andTERMtrap. - Save and restore any preexisting configuration value rather than unconditionally replacing it.
- Restrict allowed origins or destinations in the browser integration where technically possible.
- Close tabs created by the agent and disconnect immediately after the approved operation.
- Do not recommend connecting a browser profile containing high-value administrative, financial, email, or identity-provider sessions.
