T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- SKILL.md:104
- Finding
- Declared API-Key Scope Conflicts with Authenticated Asset-Transfer Capabilities<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 104–111 and 211–247 **Vulnerability Type**: Least-privilege violation and inaccurate permission declaration **Risk Level**: High ### Vulnerable Snippet ```markdown > **Key scope notice:** The API key can create and start live trading deployments that execute real trades using the user's platform-managed trading wallet. It cannot withdraw funds, export private keys, or move money. | Can do | Cannot do | | -------------------------------------------------------------------------------- | ------------------------------------------------------- | | Create, list, delete backtests | Access other users' data | | Create, start, stop, delete deployments (including live trading with real funds) | Withdraw funds from any wallet | | Trigger server-side credential resolution (no user secrets collected) | Export or view private keys | | View deployment logs, status, wallet metadata | Transfer or bridge funds (user does this independently) | ``` The same file subsequently documents the following authenticated operations: ```markdown ### Hyperliquid Authorize-and-Send API `POST https://api.superior.trade/v2/authorize-and-send/hyperliquid` A unified endpoint for Hyperliquid operations. All requests use `{"type": "...", ...}` body. Requires `x-api-key` header. **Supported operation types:** | Operation | Description | | --------- | ----------- | | `createSubAccount` | Create a new sub-account | | `subAccountTransfer` | Transfer between main and sub-account | | `sendAsset` | Move assets (main→sub, sub→main, or sub→sub) | | `userSetAbstraction` | Set account mode (unified/legacy) | | `subAccountModify` | Mod ...[truncated 3173 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Correct the Skill manifest and scope notice so they accurately enumerate all asset-transfer capabilities. 2. Separate trading/backtesting privileges from asset-transfer privileges using distinct API keys or OAuth-style scopes. 3. Disable transfer endpoints for the default Skill credential unless the user explicitly enables them. 4. Require fresh, operation-specific confirmation before every transfer. The confirmation should show: - Source account. - Destination account. - Asset and amount. - Resulting source and destination balances. - Effects on active positions and deployment collateral. 5. Enforce server-side ownership checks for every source and destination. 6. Restrict destinations to verified accounts associated with the authenticated user. 7. Add amount limits, rate limits, idempotency keys, audit logs, and anomaly detection. 8. Require reauthentication or step-up authorization for high-value transfers. 9. Prevent transfer execution when it would place active accounts below configured margin or safety thresholds. 10. Prefer a read-only or backtesting-only credential as the default and grant live-trading or transfer scope only when required. ]]>
