T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/authorize.py:32- Finding
Authorization Requests Permissions Beyond Product-Photography Requirements
- Content
View full analysis
Vulnerability Details
File Location:
scripts/authorize.py:32-35
Vulnerability Type: Excessive OAuth authorization scope
Risk Level: HighAffected 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" )Technical Analysis
The Skill's declared purpose is to upload product photographs and generate or edit product images. However, its device authorization requests permissions for unrelated capabilities, including:
- Video generation
- Music generation
- Speech generation
- Voice reading and writing
- Generic MCP tool access
- Wallet spending
- Task cancellation
Image generation, necessary artifact operations, and limited task access are consistent with the declared functionality. Video, music, speech, and voice permissions are not required for product-photo processing. The generic
mcp:toolsand financially sensitivewallet:spendscopes also expand the consequences of credential misuse.This violates least privilege because the bearer credential stored by the Skill can potentially authorize substantially more activity than the advertised task requires.
Attack Path
- The user runs
scripts/authorize.py. - The authorization request asks the user to approve the complete scope string.
- Beatra returns a bearer token containing the approved broad privileges.
- The token is stored in
~/.beatra/credentials.json. - A compromised Skill update, malicious local process running as the same user, or other credential compromise obtains or uses that token.
- The token is used for unrelated voice, speech, music, or video operations, or to spend wallet credits beyond the Skill's legitimate image-processing needs.
No direct token theft was found in the reviewed version. The vulnerability is the unnecessarily broad authority a ...[truncated 379 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
videos:generate,music:generate,speech:generate,voices:read, andvoices:write. - Limit authorization to image generation/editing, required artifact upload/read operations, and the minimum task lookup permissions.
- Replace generic
mcp:toolswith operation-specific scopes if the service supports them. - Replace unrestricted
wallet:spendwith a narrowly constrained image-generation billing scope, spending cap, or per-operation authorization. - Request task-cancellation permission only when the user explicitly chooses to enable cancellation.
- Use incremental authorization if unrelated media capabilities are added later, with separate and explicit user consent.
- Document each requested scope and why it is necessary on the approval screen.
- Remove
