Back to skill

Security audit

clawxpay

Security checks for vulnerabilities and agentic risk

Overview

This skill is openly designed for paid API calls, but it relies on an unpinned npm package that auto-creates a funded crypto wallet and stores the private key as plaintext.

Install only if you are comfortable using a dedicated low-balance crypto wallet for API payments. Verify the npm package provenance and version before installing, keep only small amounts of USDC in the generated wallet, exclude the key file from backups and logs, and do not let agents read or display ~/.clawxpay/wallet.key.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T08 · Insecure Dependencies

Error
Location
skill.md:23
Finding
Unpinned Third-Party Package Executes During Installation<![CDATA[ ## Vulnerability Details **File Location**: `skill.md`, lines 23–26 **Vulnerability Type**: Unpinned executable dependency and supply-chain exposure **Risk Level**: High ### Vulnerable Code ```yaml install: - kind: node package: clawxpay-js bins: [clawxpay-init] ``` The Quick Start instructions also direct users to install the package without specifying a version: ```bash npm install clawxpay-js ``` ### Technical Analysis The Skill depends on the externally maintained `clawxpay-js` npm package without pinning an exact version or integrity digest. Consequently, package resolution can select a newer release whose contents differ from those reviewed when this Skill was published. The documentation states that installing the package automatically creates a cryptocurrency wallet and writes its private key to the local filesystem. This indicates that package-controlled code performs security-sensitive initialization during or immediately after installation. The source code for that behavior is not present in the audited project, so the package's implementation, network activity, key-generation quality, and handling of existing credentials cannot be verified from this artifact. This is a supply-chain weakness rather than evidence that the current package is malicious. Exploitation would require compromise of the npm package, its publisher account, its dependency graph, or the package-resolution process. ### Attack Path 1. A user or Agent loads the Skill and follows its installation instructions. 2. `npm install clawxpay-js` resolves the currently published package version because no exact version is specified. 3. An attacker compromises the package publisher, publishes a malicious release, introduces a malicious transitive dependency, or manipulates package resolution. 4. npm installs the attacker-controlled package and may execute its installation lifecycle code with the privileges of the current user. 5. The malicious code reads accessib ...[truncated 897 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `clawxpay-js` to a reviewed exact version rather than a floating package name or semver range. 2. Commit and enforce a lockfile containing registry integrity hashes. 3. Publish or link to the complete SDK source and reproducible build instructions so wallet and payment behavior can be independently audited. 4. Verify package signatures, provenance attestations, and npm publisher identity before installation. 5. Avoid automatic security-sensitive actions in npm lifecycle scripts. Wallet initialization should be a separate, explicit command requiring informed user approval. 6. Install with lifecycle scripts disabled where feasible, review package contents, and then invoke a verified initialization command explicitly. 7. Minimize transitive dependencies and continuously scan the package and dependency graph for known vulnerabilities and ownership changes. 8. Run installation and SDK operations in a restricted environment with least-privilege filesystem and network access. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
skill.md:15
Finding
Cryptocurrency Private Key Stored as Plaintext File<![CDATA[ ## Vulnerability Details **File Location**: `skill.md`, lines 15–18 **Vulnerability Type**: Plaintext storage of sensitive financial credentials **Risk Level**: High ### Vulnerable Code ```yaml storage: - path: ~/.clawxpay/wallet.key description: Wallet private key — written on first install, permissions 0600 (owner read/write only), never transmitted to any server sensitive: true ``` The Key Storage section further specifies the stored format: ```text File | `~/.clawxpay/wallet.key` Format | Plain hex private key (`0x…`), one line Permissions | `0600` — owner read/write only ``` ### Technical Analysis The Skill's documented design stores a directly usable cryptocurrency private key as an unencrypted hexadecimal value in a predictable filesystem location. File mode `0600` appropriately prevents access by other ordinary operating-system users, but it does not provide encryption or isolation from: - Malicious processes running under the same user account. - Compromised npm packages or development tools. - User-level malware and credential-stealing software. - Misconfigured backup, synchronization, archival, or diagnostic systems. - Accidental disclosure through broad home-directory collection. Possession of the key is sufficient to impersonate the wallet owner and authorize irreversible blockchain transactions. No password, second factor, or server-side revocation control protects the wallet once the key is copied. The documentation claims that the key is never transmitted, but the SDK implementation is not included in the audited project. Therefore, that property cannot be independently verified through this audit. ### Attack Path 1. Installation generates the wallet and writes its private key to `~/.clawxpay/wallet.key`. 2. The user funds that wallet with USDC or other transferable assets. 3. A malicious or compromised process running as the same user reads the predictable key file. 4. The attacker exfiltrates and imports the hexad ...[truncated 1036 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Store the private key in an operating-system credential vault such as macOS Keychain, Windows Credential Manager, or a Linux Secret Service implementation. 2. Prefer a hardware-backed signer, hardware wallet, or platform keystore that prevents raw private-key extraction. 3. If file storage is unavoidable, use a standard encrypted EVM keystore protected by a strong user-supplied passphrase instead of raw hexadecimal text. 4. Require explicit user authorization for wallet creation and each security-sensitive signing operation. 5. Keep the wallet isolated from general-purpose application credentials and maintain the documented low-balance policy. 6. Exclude wallet material from backups, synchronization services, diagnostics, crash reports, logs, and project archives. 7. Validate restrictive ownership and permissions before every use and reject symlinked, unexpectedly owned, or overly permissive key files. 8. Provide a documented wallet-rotation and emergency migration procedure for suspected key exposure. 9. Subject the SDK's key generation, storage, signing, and network behavior to an independent source-code audit. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Content
---
name: clawxpay
description: >
  Pay-per-call API gateway — zero account, zero API key, zero subscription via the x402 protocol.
  One Base wallet + USDC is all you need to access 250+ professional API endpoints on a per-call basis:
  real-time crypto prices and on-chain data (coinank · nofxos · coinmarketcap),
  US stock options and technical indicators (alphavantage · polygon · alpaca · twelvedata),
  China A-share market (tushare), Web3 project funding intelligence (rootdata),
  and 7 AI model providers (OpenAI · Anthropic · DeepSeek · Qwen · Gemini · Grok · Kimi).
  From $0.001 per call — s
Confidence
87% confidence
Finding
The manifest advertises creation and storage of a wallet private key in a predictable local path and describes exporting it with a shell command. Even though the skill says not to expose the key, normalizing direct filesystem secret storage in plaintext hex materially increases the chance that an agent, plugin, log collector, backup process, or compromised local environment will access or exfiltrate it. In a payment-enabled skill, compromise of this key can directly lead to wallet takeover and loss of funds.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
console.error(`Balance insufficient — current: ${bal} USDC. Please top up.`);
  } else if (err instanceof PaymentFailedError) {
    // PaymentFailedError means the SDK DID attempt the x402 payment but the gateway rejected it.
    // This is NOT "you forgot to pay" — do NOT ask the user to deposit more.
    // Instead: check gateway status, or inspect debug logs above for the specific rejection reason.
    console.error('Payment was attempted but gateway rejected it:', err.message);
    console.error('Do NOT retry automatically — check gateway status first.');
Confidence
80% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
| `Cannot find module 'clawxpay-js'` | Package not installed | `npm install clawxpay-js` |
| `require is not defined in ES module scope` | clawxpay-js is ESM-only; `require()` does not work | Save file as `.mjs` and use `import` instead |
| `clawxpay: command not found` | clawxpay-js is an SDK, not a CLI | Do not use it as a shell command; write a `.mjs` script and run `node script.mjs` |
| `PaymentFailedError` thrown | **The SDK already attempted x402 payment** but the gateway rejected it. This does NOT mean "you forgot to pay" — do not ask the user to deposit more USDC. | Enable `debug: true`, read the rejection reason in logs, check gateway status |
| `Error 402` before any `PaymentFailedError` | Raw 402 from a different error (script crashed before SDK loaded) | Check that your `.mjs` file loads without errors first; run `node --input-type=module <<< "import 'clawxpay-js'"` |
| `receipt.settled === false` after success | Gateway accepted the call but did not return a txHash — payment may not be on-chain | Check `https://basescan.org/address/<wallet>` to see if USDC left the wallet; report to gateway operator |
| `Balance shows 0` after depositing | Deposit still pending, or sent to wrong network | Wait ~30 s and retry; confirm deposit was on **Base mainnet**, not Ethereum mainnet |
Confidence
80% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Static analysis

No suspicious patterns detected.