T09 · Insecure Skill Coding Practices
- Location
SKILL.md:34- Finding
Wildcard CDP WebSocket Origin Allowlist Exposes Authenticated Browser Sessions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:34-43
Additional Location:测试报告.md:163-183
Vulnerability Type: Unsafe Chrome DevTools Protocol configuration
Risk Level: HighVulnerable Code
bash chrome.exe --remote-debugging-port=9222 --remote-allow-origins=* --user-data-dir="C:\chrome-profile"bash /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \ --remote-debugging-port=9222 --remote-allow-origins=* \ --user-data-dir="/tmp/chrome-profile"Technical Analysis
The documented
--remote-allow-origins=*option instructs Chrome to accept CDP WebSocket connections from every origin. This disables an origin-based security control that would otherwise reject unauthorized WebSocket clients.CDP provides extensive control over the attached browser, including:
- Executing arbitrary JavaScript in pages through
Runtime.evaluate - Reading page content and DOM state
- Navigating tabs and submitting forms
- Simulating mouse and keyboard input
- Capturing screenshots
- Performing actions through existing authenticated sessions
The Skill explicitly promotes reuse of logged-in browser profiles, cookies, login state, and background permissions. Consequently, weakening CDP origin validation can expose substantially more than an isolated automation tab.
A wildcard origin is not required for the declared browser-automation functionality. The specific trusted automation origin can be allowlisted instead. The test report confirms that Chrome originally returned HTTP 403 because of its origin protection and that the wildcard option was presented as the workaround.
Attack Path
- A user follows the Skill documentation and starts Chrome with remote debugging and
--remote-allow-origins=*. - The browser uses a persistent profile containing authenticated website sessions.
- The user opens attacker-controlled content, or an untrusted local client gains ...[truncated 1435 chars]
- Executing arbitrary JavaScript in pages through
- Remediation
View remediation
Remediation Suggestions
-
Replace the wildcard with the exact trusted automation origin:
bash --remote-allow-origins=http://127.0.0.1:18800The permitted origin must match the actual trusted client configuration.
-
Ensure the debugging service listens only on loopback:
bash --remote-debugging-address=127.0.0.1 -
Use a dedicated automation profile that does not contain personal browsing sessions or unrelated authenticated accounts.
-
Do not load untrusted websites while the debugging interface is active.
-
Shut down the debugging browser immediately after the automation task completes.
-
Update
SKILL.mdand测试报告.mdto remove the wildcard recommendation and explain the risks of exposing an authenticated profile through CDP. -
Prefer the OpenClaw browser integration when it provides authenticated and origin-restricted CDP access without disabling Chrome's protection globally.
-
