Back to skill

Security audit

cpbox-batch-balance

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for a paid balance-query API, but it asks users to run unpinned payment software that may use wallet credentials and make automatic paid requests.

Review this before installing in a wallet-enabled environment. Use a dedicated low-value wallet, confirm the payment amount and network before requests, avoid running the unpinned npx command in a sensitive workspace, and prefer a pinned, reviewed package version or controlled local install.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:6
Finding
Unpinned Third-Party Package Is Downloaded and Executed Through npx## Vulnerability Details **File Location**: `SKILL.md`, lines 6–7 and 40–43 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```yaml dependencies: - "@springmint/x402-payment" ``` ```bash npx @springmint/x402-payment \ --url https://www.cpbox.io/api/x402/batch-balance \ --method POST \ --input '{"chain":"ethereum","token":"","addresses":["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","0xBE0eB53F46cd790Cd13851d5EFf43D12404d33E8"]}' ``` ### Technical Analysis The Skill instructs users or an AI Agent to execute `@springmint/x402-payment` through `npx` without specifying an exact package version. If the package is not already installed locally, `npx` may retrieve executable package content from the npm registry at invocation time. Consequently, the code that executes can differ from the code originally reviewed. This package occupies a sensitive trust position because the documented workflow uses it to configure a wallet, create EIP-712 payment signatures, communicate with external services, and perform automatic payments. The audited project does not contain the dependency source, a lockfile, a cryptographic integrity value, or other controls that bind execution to a reviewed artifact. The external API communication itself is consistent with the Skill's declared batch-balance functionality: wallet addresses are sent to the API provider, and a payment signature is sent to authorize payment. The document does not instruct users to transmit a private key. The vulnerability is therefore the uncontrolled dependency execution path rather than the necessary API request. ### Attack Path 1. An attacker compromises the npm account, publication process, or distribution infrastructure associated with `@springmint/x402-payment`. 2. The attacker publishes a malicious package version that is selected when the unversioned `npx` command resolves the dependency. 3. A user or AI ...[truncated 1602 chars]
Remediation
## Remediation Suggestions 1. Pin the dependency and command to an exact, reviewed version, for example `@springmint/x402-payment@X.Y.Z`, rather than allowing registry-time version resolution. 2. Provide a lockfile with verified integrity metadata and require installation through a reproducible package-manager workflow. 3. Avoid ad hoc `npx` retrieval during Skill execution. Install the approved dependency in a controlled build or provisioning stage and invoke the locally installed binary. 4. Verify package provenance through registry signatures, checksums, or an internally controlled package mirror. 5. Review the dependency and its transitive dependencies before approval, especially wallet loading, signing, payment-validation, and network-request logic. 6. Run the client in a sandbox with access only to files and network destinations required for this API. 7. Use a dedicated low-value wallet with explicit spending, token, chain, recipient, and per-transaction limits. 8. Require confirmation of the payment asset, amount, destination, chain, and domain before signing rather than relying on unrestricted automatic payment. 9. Ensure private keys are held by a constrained signer or hardware-backed wallet and are never exposed directly to general-purpose dependency code where avoidable. 10. Add the missing prerequisite and secret-handling documentation to the auditable project so wallet setup and credential protections can be reviewed.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill describes automatic payment handling and later notes pricing, but it does not place a prominent warning near the example commands that executing them will automatically incur charges. This can lead users or agents to make paid requests unintentionally, especially since the SDK automates the 402 payment flow and may sign transactions with configured wallets. The context increases risk because the skill is specifically designed to operationalize a paid endpoint.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding
The skill instructs users to run `npx @springmint/x402-payment` without pinning a specific version. That causes execution of whatever package version is current at run time, creating supply-chain risk if a malicious or compromised release is published later. In an agent skill context, this is more dangerous because users may copy-paste commands and execute remote package code immediately.

External Transmission

Medium
Category
Data Exfiltration
Content
}
```

## cURL Example (Manual Two-Step)

**Step 1 - Get payment requirements:**
```bash
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.