T09 · Insecure Skill Coding Practices
- Location
SKILL.md:7- Finding
Automatic Paid Requests Use an Unrestricted EVM Private Key Without Explicit Spending Controls
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 7-10, 32-41, and 53-60
Vulnerability Type: Automatic payment authorization with a raw wallet credential
Risk Level: MediumVulnerable Code
yaml metadata: openclaw: requires: env: - EVM_PRIVATE_KEY primaryEnv: EVM_PRIVATE_KEYmarkdown 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-transition-probability-institutional", private_key=os.environ["EVM_PRIVATE_KEY"] ) print(response.json())text ```markdown **$35.00/call** — standard price Early adopters automatically receive 30% off ($24.50/call) until 2026-09-21. Discount tiers apply automatically based on wallet call history: - Early Adopter (0–9 calls): 30% off - Engaged (10–49 calls): 15% off - Loyal (50–199 calls): 15% permanent - VIP (200+ calls): 20% permanentTechnical Analysis
The Skill requires the agent runtime to access a raw EVM private key and passes that key to the third-party
x402client. The documentation explicitly states that the client automatically handles payment authorization for an external endpoint charging up to the documented standard price of $35 per call.No requirement is provided for explicit user confirmation before each payment, verification of the final payment amount and recipient, per-call or cumulative spending limits, or duplicate-payment prevention. Consequently, unintended invocation, agent loops, retries, or repeated task execution can produce multiple paid requests without a separate user decision for each charge.
A raw private key also represents substantially more authority than is needed for a single limited paymen ...[truncated 1634 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit user approval before every paid request. Present the exact amount, token, blockchain network, recipient, endpoint, and maximum total cost before authorization.
- Enforce hard per-call, per-session, and daily spending limits independently of instructions returned by the remote endpoint.
- Use a dedicated low-balance wallet or a scoped payment signer instead of a general-purpose wallet private key.
- Implement idempotency keys and retry controls so timeouts or agent retries cannot generate duplicate charges.
- Verify that the payment uses the expected Base network, USDC contract, recipient, and maximum price before signing.
- Keep the private key in a protected secret manager and prevent it from appearing in logs, prompts, exceptions, telemetry, or model-visible output.
- Pin the x402 client to a reviewed version, verify package provenance and integrity, and audit updates before deployment.
- Provide a dry-run mode that retrieves and displays payment terms without signing or transmitting a payment authorization.
- Record an auditable local transaction log and stop further calls when anomalous repetition or cumulative-spend thresholds are detected.
