T09 · Insecure Skill Coding Practices
- 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: HighVulnerable 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
- A user follows the LAN-sharing instructions and forwards local port
9222to a LAN-accessible address. - An attacker on the same network discovers or guesses the exposed port.
- The attacker requests
/json/listand obtains active tab identifiers or WebSocket debugger URLs. - The attacker connects to a tab's DevTools WebSocket endpoint.
- The attacker invokes commands such as
Runtime.evaluate,Page.navigate, orNetwork.getAllCookies. - The attacker reads sensitive page content or cookies, manipulates authenticated tabs, or redirects browser ...[truncated 749 chars]
- A user follows the LAN-sharing instructions and forwards local port
- 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.
