Back to skill

Security audit

Phone Chrome CDP

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its browser-control purpose, but it needs review because it shows exposing a powerful Chrome control port to the LAN and reading sensitive cookies without clear safeguards.

Install only if you understand that CDP access can control Chrome and expose authenticated sessions. Keep the DevTools port on localhost, avoid LAN sharing unless it is inside an authenticated and encrypted trusted tunnel, and do not inspect cookies or screenshots unless the user has explicitly approved that sensitive access.

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

Error
Location
SKILL.md:166
Finding

Unauthenticated Chrome DevTools Protocol Exposure to the Local Network

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 166–168
Vulnerability Type: Unauthenticated exposure of a privileged browser-control interface
Risk Level: High

Vulnerable Code

text
## LAN 共享

当前机器当跳板,用端口转发工具把 localhost:9222 暴露给局域网。其他机器连接 your_ip:转发端口。

The instructions recommend forwarding the local Chrome DevTools Protocol (CDP) endpoint to the LAN. They do not require authentication, transport encryption, client allowlisting, firewall restrictions, or another access-control boundary.

Technical Analysis

CDP provides extensive control over connected browser tabs. The same Skill demonstrates arbitrary JavaScript execution, navigation, DOM and page-text access, and retrieval of all browser cookies—including HttpOnly cookies through Network.getAllCookies.

Exposing this interface beyond localhost therefore exposes capabilities comparable to direct control over the user's active browser sessions. CDP does not itself provide suitable authentication for untrusted network exposure. Any network peer that can reach an unrestricted forwarded port may be able to enumerate targets through /json/list, obtain a tab's WebSocket debugger URL, and issue CDP commands.

Although remote browser control is part of the declared functionality, general LAN exposure exceeds the minimum privilege needed for local ADB-based operation.

Attack Path

  1. A user follows the LAN-sharing instructions and forwards local port 9222 to a LAN-accessible address.
  2. An attacker on the same network discovers or guesses the exposed port.
  3. The attacker requests /json/list and obtains active tab identifiers or WebSocket debugger URLs.
  4. The attacker connects to a tab's DevTools WebSocket endpoint.
  5. The attacker invokes commands such as Runtime.evaluate, Page.navigate, or Network.getAllCookies.
  6. The attacker reads sensitive page content or cookies, manipulates authenticated tabs, or redirects browser ...[truncated 749 chars]
Remediation
View remediation

Remediation Suggestions

  • Remove LAN exposure from the default workflow and keep CDP bound to localhost.
  • If remote control is essential, place the connection inside an authenticated and encrypted tunnel, such as SSH or a mutually authenticated VPN.
  • Bind any forwarding listener only to an explicitly trusted interface rather than all network interfaces.
  • Enforce host-firewall allowlisting for specific trusted client addresses.
  • Use short-lived forwarding sessions and close the listener immediately after use.
  • Do not expose CDP directly to shared, public, guest, or otherwise untrusted networks.
  • Add a prominent warning that CDP access is effectively full browser control and can expose HttpOnly cookies and authenticated sessions.
  • Require users to verify the forwarding listener and firewall configuration before continuing.
  • Prefer a gateway that authenticates clients and restricts permitted CDP methods if full browser control is unnecessary.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Exposing Chrome DevTools Protocol over the LAN without warning is highly dangerous because any reachable host may gain near-complete control of the mobile browser. In this skill's context, the same interface is used for JavaScript injection, cookie retrieval, navigation, and DOM interaction, so LAN exposure turns a local debugging interface into a remote attack surface.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill demonstrates reading all cookies, explicitly including httpOnly cookies, without any warning about sensitive session data exposure. In this context, CDP grants privileged browser introspection beyond normal web security boundaries, making theft of authenticated sessions and cross-account compromise realistic.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest description limits the skill to controlling Chrome via ADB and raw CDP for navigation, JS injection, cookies, DOM, scrolling, and clicking. The documentation also includes a separate screenshot workflow using adb shell screencap and adb pull, which captures device screen contents outside the listed browser-control scope and is explicitly noted as a validated capability.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill explicitly advises exposing the local Chrome DevTools endpoint over the LAN, but the manifest/description does not disclose that it enables remote browser control. CDP access permits navigation, DOM/JS execution, cookie access, and potentially session theft, so undisclosed network exposure materially increases risk.

Content

No source excerpt is available for this finding.