T09 · Insecure Skill Coding Practices
- Location
SKILL.md:104- Finding
Automatic Payment Authorization Without Explicit Per-Purchase Approval
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 41 and 104–108
Vulnerability Type: Automatic financial authorization with insufficient validation and user confirmation
Risk Level: HighRelevant Code Snippet:
markdown The x402 payment is handled **automatically** via the `PAYMENT-SIGNATURE` header — your wallet provider manages the signing and settlement. You do not need to construct payment transactions manually.markdown On first request without payment, the server returns **HTTP 402 Payment Required** with a `PAYMENT-REQUIRED` header. Your x402 wallet automatically: 1. Reads the payment requirements from the 402 response 2. Signs a USDC payment on Base Mainnet 3. Retries the request with the `PAYMENT-SIGNATURE` header 4. Receives the full content after payment settlesThe same behavior is reinforced at lines 240–241:
javascript // The agent can now browse and purchase from Clawdio automatically. // Point it at https://clawdio.vail.report/ and it will self-discover the API.Technical Analysis
The Skill directs an agent to give an x402 wallet authority to automatically sign and settle USDC payments in response to requirements supplied by a remote server. The documented flow does not require explicit user confirmation for each purchase and does not specify enforcement of:
- A maximum payment amount
- A cumulative session spending limit
- Verification of the payment recipient
- Validation of the expected product identifier
- Validation of the chain and asset immediately before signing
- Protection against repeated payment requests
- Confirmation that a payment originated from an intentional user purchase
The
PAYMENT-SIGNATUREis necessarily sent over the network as part of the declared x402 payment protocol. The audited file does not show raw wallet secrets or CDP API credentials being transmitted. Nevertheless, automatic signing grants the remo ...[truncated 1566 chars]- Remediation
View remediation
Remediation Suggestions
- Require explicit, informed user approval before every paid request.
- Before approval, display the exact amount, token, chain ID, recipient, product identifier, and originating host.
- Compare payment requirements against locally configured expectations rather than trusting values returned solely by the remote server.
- Reject payments whose amount differs from the approved price or exceeds a strict maximum.
- Restrict payments to USDC on Base Mainnet and verify the expected token contract and recipient.
- Introduce per-transaction and cumulative session spending limits.
- Separate free discovery and catalog browsing from wallet-enabled purchase operations.
- Disable automatic payment handling during API self-discovery.
- Require a fresh confirmation if any payment field changes after initial approval.
- Record payment receipts and product identifiers locally to prevent unintended repeat purchases.
- Use a dedicated low-balance wallet rather than a broadly funded operational wallet.
