T09 · Insecure Skill Coding Practices
- Location
SKILL.md:6- Finding
Unconstrained Automatic Payments Using a Raw Wallet Private Key
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 6–43
Vulnerability Type: Automatic financial authorization with an unrestricted private key
Risk Level: HighVulnerable 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/grid-health", private_key=os.environ["EVM_PRIVATE_KEY"] ) print(response.json())markdown ## Pricing **$0.50/call** — standard priceTechnical Analysis
The Skill requires a raw EVM private key and passes it to an application-level third-party client that automatically authorizes a paid request. The documented flow does not require explicit user confirmation for each payment and does not prescribe a per-request limit, cumulative spending limit, request-frequency limit, recipient validation, or separation between the payment wallet and the user's primary wallet.
A private key grants signing authority over the associated wallet. Supplying it to a client library therefore exposes substantially more authority than is necessary to retrieve a health-status response. Although the reviewed file does not demonstrate key exfiltration or malicious dependency behavior, a compromised client, unsafe runtime, or uncontrolled repeated invocation could misuse the signing authority or generate unintended charges.
Attack Path
- The user configures
EVM_PRIVATE_KEYfor the Skill. - The agent invokes
x402_getto retrieve the advertised health signal. - The client reads the unrestricted private key and automatically signs payment authorization for the request.
- The invocation occurs without a documented per-payment confirm ...[truncated 958 chars]
- The user configures
- Remediation
View remediation
Remediation Suggestions
- Use a dedicated, low-balance payment wallet instead of a primary wallet or a wallet containing unrelated assets.
- Replace direct raw-key access with a constrained signer, delegated authorization mechanism, or wallet interface that can enforce transaction policies.
- Require explicit user confirmation before every paid request, displaying the exact price, asset, network, recipient, and destination endpoint.
- Enforce hard per-call, per-session, and cumulative daily spending limits independently of instructions supplied by the remote service.
- Validate that authorization is restricted to the expected USDC contract on Base mainnet and the intended payment recipient.
- Add request-frequency controls, duplicate-request protection, timeouts, and replay protection.
- Pin the
x402client to a reviewed version, verify package provenance and integrity, and audit its key-handling and signing behavior. - Ensure private keys are never logged, included in exception messages, persisted to files, or returned in model-visible output.
- Document wallet revocation and incident-response procedures, including immediate fund migration if key exposure is suspected.
