T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- SKILL.md:60
- Finding
- Ambiguous User Input Can Be Treated as Authorization for a Financial Transaction## Vulnerability Details **File Location**: `SKILL.md:60-75` **Vulnerability Type**: Insufficient transaction authorization and unsafe agent instructions **Risk Level**: High ### Vulnerable Code Snippet ```markdown **IMPORTANT: Once the user confirms an amount, execute the entire buy flow immediately in one pass. Do NOT stop after confirming — proceed straight through steps 1–5 without waiting for further user input.** 1. **Resolve the mint** — run `scripts/search.py --filter "TOKEN" --address-only` to get the Solana address. 2. **Confirm with the user** — show amount, token name, and mint address. Ask the user to confirm. 3. **Once confirmed, execute immediately without pausing:** - **Build the swap** — use the **standard Jupiter quote + swap flow** (`jupiter_swap` tool, or `/quote` + `/swap` REST endpoints). **Do NOT use Jupiter Ultra** (`/ultra/...` endpoints) — Ultra transactions are not compatible with external signers. - **Sign and broadcast** — use your wallet tools (we recommend lobster.cash). If no wallet tool is configured, return the mint address so the user can execute with their own wallet. 4. **Report outcome** — only claim success when transaction status is `success` or `completed`. Share transaction ID and explorer link. ``` The later guidance broadens the definition of confirmation: ```markdown - **Do not pause between confirmation and execution.** When the user says "yes" or provides an amount, execute the swap immediately. Never reply with "confirmed" and then wait for another prompt. ``` ### Technical Analysis The skill instructs the agent to build, sign, and broadcast a swap as soon as the user provides an amount. Supplying an amount is not necessarily explicit authorization to execute a transaction; it may instead be part of a request for a quote, fee estimate, price comparison, or general discussion. The instructions are internally inconsistent. The numbered workflow requires the agent ...[truncated 2313 chars]
- Remediation
- ## Remediation Suggestions Implement a strict two-stage quote and authorization workflow: 1. Treat an amount only as a transaction parameter, never as approval. 2. Resolve the asset and obtain a quote without signing or broadcasting. 3. Present the complete final transaction summary, including: - Input token and exact input amount. - Output token name, symbol, and full mint address. - Expected and minimum output amounts. - Slippage tolerance and price impact. - Network and provider fees. - Wallet address and Solana network. - Quote expiration or freshness information. 4. Require an explicit confirmation that unambiguously refers to the displayed transaction, such as “Confirm this swap.” 5. Reject generic responses such as an isolated amount or ambiguous “yes” if no current transaction summary is awaiting approval. 6. Bind confirmation to an immutable quote or transaction digest. If any material field changes, obtain confirmation again. 7. Keep quote retrieval separate from signing and broadcasting. 8. Add wallet-side transaction simulation and policy checks before signing. 9. Replace the unsafe instruction with language such as: ```markdown Providing an amount is not authorization to transact. Obtain a quote, display all material transaction details, and require explicit confirmation of that exact transaction before invoking any signing or broadcast tool. ```
