T09 · Insecure Skill Coding Practices
- Location
SKILL.md:6- Finding
Raw EVM Private Key Exposed to an Automatically Paying Third-Party Client
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 6–36
Vulnerability Type: Sensitive credential handling and unrestricted automatic payment authorization
Risk Level: HighVulnerable Code
yaml metadata: openclaw: requires: env: - EVM_PRIVATE_KEY primaryEnv: EVM_PRIVATE_KEY homepage: https://apexrunner.ai/signals/regime emoji: "🗺️"markdown 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", private_key=os.environ["EVM_PRIVATE_KEY"] ) print(response.json())Technical Analysis
The skill requires a raw EVM private key and passes it directly to the
x402client, which automatically authorizes a paid request. An EVM private key is a bearer credential capable of signing transactions for its associated wallet. Giving application code direct access to that key therefore grants substantially more authority than is required merely to retrieve a market-regime classification.The documentation does not specify a pinned or verified client version, an isolated signing mechanism, a transaction preview, recipient and chain validation, or per-call and cumulative spending controls. This creates a least-privilege and supply-chain exposure: a compromised, substituted, or unexpectedly behaving client could access the key or request unintended signatures.
The reviewed file does not establish that the private key is transmitted to
apexrunner.ai; private-key exfiltration by that service is therefore not asserted. The confirmed weakness is the unsafe trust boundary created by supplying an unrestricted wallet key to third-party client code that performs automatic payments.Atta
...[truncated 1299 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace direct private-key access with an isolated signer, hardware wallet, delegated session key, or payment mechanism that never exposes the raw key to application code.
- Use a dedicated wallet containing only the minimum funds required for this skill. Do not reuse a primary wallet or a key controlling unrelated assets.
- Enforce strict per-request, daily, and cumulative spending limits outside the skill and client process.
- Validate the expected chain, token, recipient, contract, and exact payment amount before signing.
- Require explicit user confirmation before the first payment and whenever the amount, recipient, or network differs from an approved policy.
- Pin the
x402dependency to a reviewed version, verify package provenance and integrity, and document the trusted installation source. - Run the payment client in a restricted environment with minimal filesystem, network, and environment-variable access.
- Add rate limits and replay protection to prevent accidental loops or repeated paid calls.
- Document wallet-rotation and incident-response procedures in case the key or dependency is compromised.
