T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- scripts/authorize.py:34
- Finding
- Speech-only Skill requests excessive cross-media and account privileges<![CDATA[ ## Vulnerability Details **File Location**: `scripts/authorize.py:34-37` **Additional Locations**: `references/installation-and-auth.md:73-74`, `references/mcp-connection.md:9-10`, `scripts/mcp_client.py:1475-1483` **Vulnerability Type**: Excessive OAuth scopes and unrestricted remote tool dispatch **Risk Level**: Medium ### Vulnerable Code ```python SCOPE = ( "mcp:tools artifacts:write images:generate videos:generate music:generate " "speech:generate voices:read voices:write wallet:spend tasks:read artifacts:read tasks:cancel" ) ``` The client also exposes a generic remote tool dispatcher: ```python call = subparsers.add_parser("call", help="Call one tool with a JSON object on stdin") call.add_argument("tool_name") ``` ```python assert tool_name is not None return session.request( 2, "tools/call", {"name": tool_name, "arguments": arguments}, ) ``` The documentation confirms that this broad authorization is intentional: ```text One approval covers image, video, music, speech, upload, model, and task tools. ``` ### Technical Analysis The declared functionality requires text-to-speech generation, optional voice cloning and sample upload, model and voice discovery, billing access, and task management. It does not require image, video, or music generation. Nevertheless, the authorization flow requires privileges for all these unrelated media types. The resulting bearer credential also includes wallet spending and artifact access. In addition, the bundled client accepts an arbitrary MCP tool name rather than enforcing a package-specific allowlist. This violates the principle of least privilege. Although the credential file is appropriately protected on POSIX systems with owner-only permissions and symlink checks, compromise of the credential or execution context would expose substantially more account authority than this Skill legitimately needs. ### Attack Path 1. The user authorizes the incident voice Skill. 2. Beatra i ...[truncated 1118 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace the shared full-scope authorization with a package-specific, least-privilege credential. 2. Remove unrelated scopes, particularly: - `images:generate` - `videos:generate` - `music:generate` 3. Retain only the permissions required for speech synthesis, optional authorized voice cloning and upload, model or voice discovery, billing, and task management. 4. Add an explicit allowlist in `scripts/mcp_client.py` for the tools this package may invoke. 5. Reject tool names not required by the declared workflow before sending an MCP request. 6. Require a new, explicit authorization decision before adding capabilities to an existing installation. 7. Where possible, separate read-only wallet and task permissions from billable generation permissions. 8. Avoid sharing a single full-scope Device Token among unrelated Skill packages. ]]>
