T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:13
- Finding
- Unverified External Service and Irreversible Cryptocurrency Payment Flow## Vulnerability Details **File Location**: `SKILL.md`, lines 13–24 **Vulnerability Type**: Unverified API destination, unsafe credential transmission guidance, and insufficiently protected cryptocurrency payment flow **Risk Level**: Medium ### Vulnerable Code ```markdown ## Payment Options **Option A — Stripe Credits:** $10 = 100 credits at /buy. Send api_key with each request. **Option B — Pay-per-call with USDC:** No account needed. Send exact USDC on Base to 0xC9D03C8Af4Bd51e0aDc9fc885AB227cbe6B649F5, then retry with tx_hash. ## Endpoints ### Token Price Cost: 1 credit or $0.05 USDC. Returns current USD price, 24h change, and market cap. POST /api/defi/price {"api_key": "your_key", "token": "ethereum"} ``` ### Technical Analysis The skill directs an agent to transmit an API key and make an irreversible USDC payment, but it does not identify a canonical API hostname, require HTTPS, authenticate the service operator, or provide a mechanism for verifying that the fixed wallet address belongs to the claimed service. All documented API paths are relative. Their actual destination therefore depends on external execution context that is not defined by the audited skill. If an untrusted or incorrectly configured base URL is used, the API key could be disclosed to that endpoint. Similarly, the cryptocurrency workflow lacks documented controls for validating the Base network, the official USDC token contract, recipient ownership, quoted amount, transaction uniqueness, expiration, and service fulfillment. This finding does not prove that the listed address or service is malicious. It identifies missing trust, transport, and transaction controls that make safe independent verification impossible from the package itself. ### Attack Path 1. An agent loads the skill and attempts to use one of the relative API endpoints. 2. An external or compromised configuration supplies the base URL because the skill does not pin a canonical service origin. 3. The agent send ...[truncated 949 chars]
- Remediation
- ## Remediation Suggestions 1. Specify and pin a canonical HTTPS API origin for every endpoint; do not rely on relative paths or externally supplied base URLs. 2. Document the service operator and provide a verifiable association between the operator, API domain, and payment address. 3. Require TLS certificate validation and prohibit sending API keys over plaintext HTTP or to redirected, user-supplied, or unapproved hosts. 4. Prefer scoped, revocable API tokens with short lifetimes and limited credit or request permissions. 5. Require explicit user confirmation immediately before each cryptocurrency transfer. Display the network, verified token contract, recipient, exact amount, and estimated total cost. 6. Enforce wallet-side spending limits and reject unexpected chain IDs, token contracts, recipients, amounts, and stale or replayed payment requests. 7. Use signed payment quotations containing a nonce, amount, recipient, chain, token contract, purpose, and expiration time. 8. Bind each transaction hash to one request and reject transaction reuse. 9. Document service-failure, dispute, and refund procedures before requesting payment. 10. Avoid logging API keys or exposing them in error messages, redirects, telemetry, or diagnostic output.
