T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:84
- Finding
- Insecure Browser Debugging Interface Configuration## Vulnerability Details **File Location**: `SKILL.md`, lines 84–87 **Vulnerability Type**: Insecure browser debugging configuration **Risk Level**: Medium ### Vulnerable Code ```text waxiang.exe --remote-debugging-port=9222 --user-data-dir=<独立目录> --remote-allow-origins=* --no-first-run --no-default-browser-check --test-model about:blank ``` The accompanying security note claims that the debugging endpoint is bound only to `127.0.0.1`, but the documented command does not explicitly specify `--remote-debugging-address=127.0.0.1`. ### Technical Analysis The Skill enables the Chrome DevTools Protocol through `--remote-debugging-port` for a browser that may contain an authenticated WaXiang session. CDP is a privileged browser-control interface: a connected client may inspect pages, execute JavaScript, read data available to the browser session, navigate tabs, and invoke supported browser-level methods. The command also uses `--remote-allow-origins=*`, which disables meaningful WebSocket Origin restriction by accepting every Origin. Although the document asserts that the endpoint is loopback-only, that boundary is not explicitly enforced by the shown launch arguments. Its security consequently depends on the browser executable's defaults or implementation-specific behavior. This does not prove that the endpoint will be remotely exposed in every environment. However, a privileged interface should enforce its intended listening address directly rather than rely on an undocumented default. The wildcard Origin policy also unnecessarily increases exposure to hostile local web content or untrusted processes. ### Attack Path 1. A user approves the workflow, and the Skill starts WaXiang Browser with remote debugging enabled. 2. The browser acquires or reuses an authenticated WaXiang session. 3. The CDP endpoint accepts WebSocket Origins without restriction because of `--remote-allow-origins=*`. 4. If the endpoint is reachable by an untrusted local process—or extern ...[truncated 1303 chars]
- Remediation
- ## Remediation Suggestions 1. Explicitly enforce loopback binding: ```text waxiang.exe --remote-debugging-address=127.0.0.1 --remote-debugging-port=<ephemeral-port> --user-data-dir=<isolated-profile> --no-first-run --no-default-browser-check --test-model about:blank ``` 2. Remove `--remote-allow-origins=*`. If the client requires an Origin allowance, permit only the exact trusted Origin supported by the local CDP client. 3. Select a random, currently unused ephemeral port rather than documenting a predictable fixed port such as `9222`. 4. Before login or store access, inspect the actual listening socket and abort unless it is bound exclusively to `127.0.0.1` or `::1`. 5. Keep the dedicated browser profile isolated per account and protect its directory with restrictive user-only permissions. 6. Close debugging WebSocket connections promptly and terminate the debugging-enabled browser process when the workflow no longer requires it. 7. Avoid logging the complete CDP response. Log only the fields required for status handling, redact session-related metadata, and restrict access to any output containing a debugging port.
