T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:51
- Finding
- State-Changing Cryptocurrency API Requests Lack Documented Authentication## Vulnerability Details **File Location**: `SKILL.md:51-54`, `SKILL.md:61-64`, `SKILL.md:83-86`, and `SKILL.md:113-116` **Vulnerability Type**: Missing authentication and authorization for state-changing API operations **Risk Level**: High The Skill documents requests that register wallets, control agents, exchange cryptocurrency assets, and initiate withdrawals. The examples provide only an agent name or wallet address and do not include an authorization token, wallet signature, nonce, session credential, or other proof of ownership. ### Vulnerable Code Wallet registration at `SKILL.md:51-54`: ```bash curl -s -X POST https://wirx.xyz/botworld/crust/api/join \ -H "Content-Type: application/json" \ -d '{"name": "YourAgent", "wallet": "your_solana_address"}' ``` Agent movement at `SKILL.md:61-64`: ```bash curl -s -X POST https://wirx.xyz/botworld/crust/api/move \ -H "Content-Type: application/json" \ -d '{"name": "YourAgent", "direction": "right"}' ``` Cross-chain asset exchange at `SKILL.md:83-86`: ```bash curl -s -X POST https://wirx.xyz/botworld/exchange/swap \ -H "Content-Type: application/json" \ -d '{"from": "CRUST", "to": "WIR", "amount": 100, "agent": "YourAgent"}' ``` Token withdrawal at `SKILL.md:113-116`: ```bash curl -s -X POST https://wirx.xyz/botworld/crust/api/withdraw \ -H "Content-Type: application/json" \ -d '{"name": "YourAgent", "amount": 50}' ``` ### Technical Analysis The documented API design identifies an account using an agent name but does not demonstrate that the caller is authorized to act for that account. An agent name is an identifier, not an authentication secret. Public wallet addresses likewise cannot prove control of their associated private keys. This is especially significant for the swap and withdrawal endpoints because they change balances or trigger transfers involving cryptocurrency. If the service operates exactly as documented and lacks additional server-side controls, an attacker could subm ...[truncated 2154 chars]
- Remediation
- ## Remediation Suggestions 1. Require authentication for every state-changing endpoint, including registration, movement, swaps, and withdrawals. 2. Use wallet-based challenge signing: - Generate a server-issued random nonce. - Require the wallet owner to sign a domain-separated message containing the nonce, agent name, intended action, chain ID, and expiration time. - Verify the signature server-side before issuing a short-lived session token. 3. Bind each authenticated session to a specific agent and wallet. Do not treat an agent name or public wallet address as an authorization credential. 4. Require fresh authorization for sensitive operations such as swaps, wallet changes, and withdrawals. 5. Add nonce consumption, expiration timestamps, request identifiers, and replay protection. 6. Implement server-side ownership checks and reject attempts to act on agents owned by another wallet. 7. Prevent agent-name squatting and wallet rebinding through uniqueness constraints and signed ownership confirmation. 8. Apply withdrawal limits, swap limits, rate limiting, anomaly detection, and optional confirmation delays. 9. Return explicit authorization errors without disclosing unnecessary account information. 10. Update all Skill examples to include the required authentication headers or signed request fields so agents do not rely on an insecure name-only authorization pattern. 11. Commission a separate assessment of the remote `wirx.xyz` implementation to verify that these controls are enforced server-side rather than merely documented.
