T09 · Insecure Skill Coding Practices
- Location
scripts/read_sheet.py:216- Finding
Unrestricted Browser Navigation Enables Access to Untrusted or Internal Resources
- Content
View full analysis
';" "document.getElementById('p').focus();" ) run([AB, 'eval', js], timeout=10) time.sleep(1) run([AB, 'press', 'Control+v'], timeout=10) time.sleep(2) out = run([AB, 'eval', "document.getElementById('p').value"], timeout=10) text = out.strip() ``` ### Technical Analysis The `--url` command-line argument is passed directly to `agent-browser open` without validating its scheme, hostname, port, path, or resolved network address. Although the documented purpose is to read Tencent Docs spreadsheets, the implementation does not require the destination to be `docs.qq.com`. Because the browser may have access to network resources unavailable to an external attacker, this behavior creates an SSRF-style browser primitive. The script also attempts to select, copy, and return the displayed content, potentially turning navigation into a data-extraction channel. Use of an argument array prevents shell command injection, but it does not mitigate unsafe browser navigation. ### Attack Path 1. An attacker persuades a user or automation workflow to invoke the script with an attacker-selected `--url`. 2. The attacker supplies a loopback, private-network, link-loc ...[truncated 1051 chars]- Remediation
View remediation
