Back to skill

Security audit

Control Host Browser

Security checks for vulnerabilities and agentic risk

Overview

The skill is meant to open pages in the user's Chrome browser, but it gives the agent host-browser navigation power without enforcing the promised URL limits.

Review before installing. This skill can open pages in your real Chrome browser through a DevTools port, potentially using your signed-in browser profile. Only use it if you trust agents to choose destinations carefully, and prefer adding URL scheme/destination validation plus clearer warnings before enabling it broadly.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/control_host_browser.sh:20
Finding

Unrestricted URL Schemes Reach the Host Browser Through CDP

Content
View full analysis

Vulnerability Details

File Location: scripts/control_host_browser.sh:20-21, 52; data reaches the navigation sink at scripts/cdp_navigate.py:61-65
Vulnerability Type: Missing URL scheme and destination validation
Risk Level: Medium

Vulnerable Code

scripts/control_host_browser.sh:20-21, 52:

bash
PROFILE=$1
URL=$2

# Navigate using Python CDP script
python3 "$SCRIPT_DIR/cdp_navigate.py" "$PORT" "$PAGE_ID" "$URL"

scripts/cdp_navigate.py:61-65:

python
command = json.dumps({
    'id': 1,
    'method': 'Page.navigate',
    'params': {'url': url}
})

Technical Analysis

The Skill documentation states that only HTTP and HTTPS URLs are supported, but this restriction is not enforced in either script. The shell script accepts its second argument as URL and passes it unchanged to the Python program. The Python program then places that value directly into a Chrome DevTools Protocol Page.navigate command.

Shell quoting prevents this input from becoming shell command injection. Nevertheless, it does not constrain the URL scheme or destination. Depending on Chrome's CDP and browser security policies, inputs using non-web schemes or host-accessible destinations may therefore be attempted, including file:, browser-internal schemes, loopback addresses, link-local addresses, and private-network services.

This exceeds the minimum privilege implied by the documented feature because a Skill intended to open ordinary HTTP/HTTPS pages can ask the authenticated host-browser profile to access other resource classes.

Attack Path

  1. An attacker causes or persuades a user to request that the Skill open a crafted destination.
  2. The crafted value is supplied as the second argument to control_host_browser.sh.
  3. The shell script assigns the value to URL without validation.
  4. The value is passed unchanged to cdp_navigate.py.
  5. The Python script embeds it in the Page.navigate CDP command.
  6. Host Chrome attempts to naviga ...[truncated 931 chars]
Remediation
View remediation

Remediation Suggestions

  1. Parse and validate the destination before creating a new browser tab.
  2. Permit only the exact, case-normalized schemes http and https.
  3. Require a syntactically valid hostname and reject URLs containing control characters or embedded credentials.
  4. If local-resource access is not required, resolve and reject loopback, link-local, private, multicast, unspecified, and other reserved IP ranges. Apply equivalent checks after DNS resolution and redirects to mitigate hostname-based bypasses and DNS rebinding.
  5. Consider maintaining an explicit hostname allowlist when the expected destination set is limited.
  6. Repeat validation in cdp_navigate.py so direct invocation cannot bypass checks in the shell wrapper.
  7. Avoid printing complete URLs when query strings or fragments may contain credentials, tokens, or other sensitive data.
  8. Add tests covering file:, chrome:, javascript:, malformed URLs, encoded control characters, localhost, IPv4 and IPv6 loopback, private IP ranges, and redirect-based bypass attempts.

The flagged Base64 operation in scripts/cdp_navigate.py is only used to construct a fixed WebSocket handshake key and does not encode or exfiltrate sensitive data. The curl invocation in scripts/control_host_browser.sh contacts a fixed CDP endpoint and is not piped to a shell; no remote payload retrieval and execution was found.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The skill claims broader profile support and simple browser-opening behavior, but the analyzed behavior suggests undisclosed network endpoint access and inconsistent profile handling. These discrepancies weaken operator understanding and can cause commands to execute against the wrong browser context or host target, increasing the risk of unauthorized interaction with local user data.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill claims broader profile support and simple browser-opening behavior, but the analyzed behavior suggests undisclosed network endpoint access and inconsistent profile handling. These discrepancies weaken operator understanding and can cause commands to execute against the wrong browser context or host target, increasing the risk of unauthorized interaction with local user data.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/control_host_browser.sh (reported line 40)May include surrounding context.

sh
echo ">>> Step 1: Creating new tab on $PROFILE (port $PORT)"

# Create new tab via CDP JSON API
RESPONSE=$(curl -s -X PUT "http://172.17.0.1:$PORT/json/new")

# Extract page ID from response
PAGE_ID=$(echo "$RESPONSE" | python3 -c "import sys,json; data=json.load(sys.stdin); print(data.get('id', ''))" 2>/dev/null)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README explicitly describes controlling the host machine's Chrome browser and navigating to arbitrary URLs, but it does not warn that this causes visible actions on the user's host system and initiates outbound network requests. In an agent skill context, missing consent and safety guidance increases the risk of phishing, data exposure, or surprising host-side actions when the skill is invoked.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill declares shell-capable behavior but omits any explicit tool scope or permission boundary. That makes the agent's effective authority ambiguous and increases the chance of unintended command execution or misuse of host capabilities beyond what the user expects.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The operational sections of the skill are written in Chinese, effectively imposing a specific language/locale for use and maintenance. The file does not offer a language choice or explain that the skill is intentionally region-specific, which conflicts with the stated policy for language/locale neutrality.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script opens a raw socket to a host-exposed Chrome DevTools endpoint at a hard-coded address, which grants access to a highly privileged browser control interface rather than a narrowly scoped 'open URL in new tab' action. Even though this code only sends Page.navigate, using direct CDP over a raw socket expands capability and weakens containment because the same endpoint can expose much broader browser automation power if reused or modified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The implementation targets an existing DevTools page session and issues Page.navigate, which can replace the contents of an already open browser tab rather than creating a new tab as promised in the skill metadata. In a host-browser control context, this mismatch is security-relevant because it enables interference with the user's current browsing session, including redirecting active pages to attacker-controlled or misleading content.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file header and usage text state that valid profiles are "main | financier | programmer", but the actual case statement only accepts "main" and exits for any other value. This is an active contradiction between the script's documentation and its implemented behavior.

Content

No source excerpt is available for this finding.