T09 · Insecure Skill Coding Practices
- Location
SKILL.md:23- Finding
Unbounded Automatic Wallet Payment Authorization
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 23–35
Vulnerability Type: Automatic payment authorization using a full EVM private key without documented transaction constraints
Risk Level: MediumEvidence
markdown ## How to Use The agent makes an x402-authenticated GET request to:https://apexrunner.ai/signals/regime-confluence
text The x402 client handles payment authorisation automatically. No API key, no account, no subscription required — just an EVM wallet with USDC on Base mainnet. ```python # Example using the x402-python client from x402.client import x402_get response = x402_get( url="https://apexrunner.ai/signals/regime-confluence", private_key=os.environ["EVM_PRIVATE_KEY"] ) print(response.json())text ### Technical Analysis The Skill instructs the agent to provide an unrestricted EVM private key to a third-party x402 client and states that payment authorization occurs automatically. Although the advertised price is documented as `$0.10/call`, the example does not enforce that price locally or define restrictions for the payment recipient, chain, token, per-call amount, cumulative spending, or request frequency. A private key grants signing authority over the corresponding wallet rather than authority limited to this individual signal purchase. This violates least-authority principles for payment operations. The Skill also does not require transaction previews or explicit user approval before a payment is signed. No evidence shows that the private key is transmitted to the remote signal service. The risk arises from exposing full wallet signing authority to the client workflow and relying on remote payment requirements without documented local limits. ### Attack Path 1. The agent reads `EVM_PRIVATE_KEY` from its environment. 2. The agent passes the unrestricted key to `x402_get`. 3. The remote endpoint supplies an x402 payment requirement. ...[truncated 1046 chars]- Remediation
View remediation
Remediation Suggestions
- Use a dedicated payment wallet containing only the minimum funds required for expected calls; never use a primary or treasury wallet.
- Replace unrestricted private-key access with a scoped signer, smart-account session key, allowance-based mechanism, or payment proxy restricted to this service.
- Validate the chain ID, token contract, payment recipient, per-call price, and maximum cumulative spend locally before signing.
- Reject payment requirements exceeding the documented price and fail closed if any payment field is absent or unexpected.
- Add per-request confirmation for interactive use and configurable daily and session spending limits for automation.
- Apply request-rate and retry limits to prevent loops from generating repeated paid calls.
- Pin and audit the x402 client dependency, verify its private-key handling, and ensure sensitive key material is never logged or transmitted.
- Clearly document that invoking the Skill causes a financial transaction and display the exact payment details before authorization.
