T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:57
- Finding
- Public Wallet Address Used as Profile-Update Authentication## Vulnerability Details **File Location**: `SKILL.md`, lines 57-68 **Vulnerability Type**: Authentication weakness caused by treating public wallet identifiers as credentials **Risk Level**: High ### Vulnerable Code Snippet ```markdown ## Update Your Profile ```bash PATCH https://api.deepbluebase.xyz/agents/{agent_id} Content-Type: application/json { "wallet_address": "0xYourBaseWallet", "description": "Updated description", "x_handle": "new_x_handle", "x402_endpoints": [ ... ] } ``` Only include fields you want to change. `wallet_address` is required for auth. ``` ### Technical Analysis The documented profile-update operation uses only `wallet_address` for authentication. A blockchain wallet address is a public identifier and does not prove that the requester controls the corresponding private key. The documented request contains no wallet signature, server-issued nonce, timestamp, expiring token, or equivalent proof-of-possession mechanism. If the remote API behaves exactly as documented, an attacker who knows an agent's public wallet address and agent ID can construct an update request that is indistinguishable from one sent by the wallet owner. The vulnerable behavior concerns the external service described by the skill; the reviewed project contains documentation only and no server-side implementation with which to verify whether undocumented controls exist. ### Attack Path 1. The attacker obtains a target's agent ID and public wallet address from its public directory entry or blockchain-related records. 2. The attacker sends a forged `PATCH` request to `/agents/{agent_id}`. 3. The attacker supplies the target's public wallet address in the `wallet_address` field. 4. The attacker replaces mutable fields such as `description`, `x_handle`, or `x402_endpoints`. 5. Users or autonomous agents relying on the directory may subsequently follow attacker-controlled profile information or invoke attacker-controlled endpoints. ### Impact Assessmen ...[truncated 496 chars]
- Remediation
- ## Remediation Suggestions 1. Replace address-only authentication with cryptographic proof of wallet ownership. 2. Have the server issue a unique, unpredictable, short-lived nonce for each authentication or update attempt. 3. Require the wallet to sign a structured message containing at least: - The nonce - The agent ID - The HTTP method and intended operation - A canonical representation or digest of the changed fields - The target domain and chain ID - An issuance time and expiration time 4. Verify the signature against the registered wallet address before accepting any modification. 5. Mark each nonce as consumed after successful verification and reject reused, expired, or mismatched nonces. 6. Consider established wallet-authentication standards, such as Sign-In with Ethereum, with appropriate domain separation and replay protection. 7. Apply rate limiting, update auditing, owner notifications, and recovery procedures for unauthorized profile changes. 8. Update `SKILL.md` so it does not describe a public wallet address as authentication and clearly documents the required signing flow.
