T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/authorize.py:34- Finding
Overprivileged OAuth Scope and Unrestricted MCP Tool Dispatch
- Content
View full analysis
dict[str, Any]: session = _session_with_registration( state_dir=Path.home() / ".beatra", post_json=_default_post_json, ) if command == "tools": return session.request(2, "tools/list", {}) try: arguments = json.load(os.sys.stdin) except json.JSONDecodeError as exc: raise RuntimeError("Tool arguments on stdin must be one JSON object") from exc if not isinstance(arguments, dict): raise RuntimeError("Tool arguments on stdin must be one JSON object") assert tool_name is not None return session.request( 2, "tools/call", {"name": tool_name, "arguments": arguments}, ) ``` ```python call = subparsers.add_parser("call", help="Call one tool with a JSON object on stdin") call.add_argument("tool_name") ``` ### Technical Analysis The declared SKU comparison workflow requires image generation or editing, selected artifact uploads, model lookup, and relevant task reads. However, authorization also grants video generation, music generation, speech generation, voice write access, wallet spending, and task cancellation. The command-line client accepts an arbitrary MCP tool name and forwards it through the authenticated session. It does not enforce an allowlist corresponding to the tools documented for this Skill. Consequently, the excessive server-side permissions are directly reachable through the bundled client. Thi ...[truncated 1366 chars]- Remediation
View remediation
