T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:6- Finding
Raw EVM Private Key Used for Automatic Paid Requests
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 6–9, 24–40, and 52–59
Vulnerability Type: Excessive wallet authority and automatic financial authorization
Risk Level: HighVulnerable Code
yaml requires: env: - EVM_PRIVATE_KEY primaryEnv: EVM_PRIVATE_KEYmarkdown The agent makes an x402-authenticated GET request to:https://apexrunner.ai/signals/grid-health-score
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/grid-health-score", private_key=os.environ["EVM_PRIVATE_KEY"] ) print(response.json())text ```markdown ## Pricing **$3.00/call** — standard price Early adopters automatically receive 30% off ($2.10/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 an unrestricted raw EVM private key for a read-only grid-health query and passes that key directly to the external
x402client. The documented client automatically authorizes a USDC payment for every request.A raw private key grants signing authority over the corresponding wallet rather than narrowly scoped permission to purchase one signal. The documented workflow does not require transaction-level user confirmation, impose a maximum payment amount, enforce a cumulative spending limit, prevent duplicate charges, or require a dedicated low-balance wallet. It also does not pin or otherwise constrain the referenced client dependency.
The available evidence does not establish that the private key i ...[truncated 1588 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit confirmation before each paid request. Display the recipient, chain, token, exact amount, maximum amount, and endpoint before requesting a signature.
- Replace the unrestricted primary wallet key with a dedicated low-balance payment wallet containing only the funds needed for approved calls.
- Prefer a scoped session signer, smart-account policy, allowance-limited authorization, or another payment mechanism that cannot transfer unrelated wallet assets.
- Enforce per-call, daily, and cumulative spending limits locally, independent of values supplied by the remote server.
- Disable automatic payment retries or use idempotency controls so network failures cannot create duplicate charges.
- Validate the payment request before signing, including the Base mainnet chain ID, USDC contract address, recipient, amount, and request origin.
- Pin the x402 client to a reviewed version with integrity verification and document its private-key handling behavior.
- Keep the private key in an isolated secret manager or hardware-backed signer, never log it, and avoid exposing it directly to general-purpose agent processes.
- Provide a non-paying preview mode so users can inspect the requested operation before granting wallet authority.
