T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/authorize.py:34- Finding
Overprivileged Beatra credential combined with unrestricted 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 authorization flow requests a shared bearer credential with broad permissions, including image generation, music generation, wallet spending, artifact writes, voice writes, and task cancellation. The declared rental walk-in workflow requires media upload, speech or voice generation, video generation, model and task reads, and user-authorized task cancellation. It does not establish a functional need for image generation or music generation. The client compounds this excessive scope by accepting an arbitrary `tool_name` from the command line and forwarding it directly to ...[truncated 1739 chars]- Remediation
View remediation
