Back to skill

Security audit

AsterPay

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent AsterPay MCP integration, but it asks users to run mutable npm/remote components for a payment-capable service and gives limited privacy scoping for data sent to the external API.

Review this before installing in a wallet-enabled or confidential-code environment. Prefer a pinned, project-local MCP setup with reviewed package versions, avoid global installs, run the MCP bridge with minimal filesystem and environment access, and do not send secrets, private keys, seed phrases, credentials, confidential source code, or private URLs unless you have confirmed AsterPay's privacy and retention terms.

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 (3)

T08 · Insecure Dependencies

Error
Location
SKILL.md:22
Finding
Unpinned Third-Party Package Is Downloaded and Executed Automatically<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:22` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: High ### Complete Code Snippet ```text Install the AsterPay MCP server: npx -y @anthropic-ai/mcp-remote@latest https://x402-api-production-ba87.up.railway.app/mcp ``` ### Technical Analysis The installation instruction uses `npx -y` to download and execute an npm package without interactive confirmation. The mutable `@latest` tag does not identify a specific audited release, so the code executed by future installations can differ from the version available during this review. Although remote MCP connectivity is necessary for the declared service, executing an unpinned package is not the minimum privilege or trust required to establish that connection. A compromise of the npm publisher, package, or transitive dependency could introduce arbitrary code into the installation path. ### Attack Path 1. An attacker compromises the npm package publisher, package release process, or a transitive dependency. 2. The attacker publishes a malicious version under the `latest` tag. 3. A user follows the documented installation command. 4. `npx -y` retrieves the mutable release without prompting for approval. 5. Package lifecycle or runtime code executes with the privileges of the user running OpenClaw. 6. The malicious code can access files, environment variables, credentials, wallet-related configuration, and network resources available to that user. ### Impact Assessment Successful exploitation can result in arbitrary code execution under the invoking user's account. The accessible scope may include agent configuration, local documents, environment secrets, API credentials, and wallet integration data. The instruction does not itself grant administrator privileges, so impact is bounded by the permissions of the user executing `npx`. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions - Replace `@latest` with an exact, reviewed package version. - Use a lockfile and verify package integrity hashes before execution. - Remove `-y` where practical so package retrieval is visible to the user. - Document the expected package publisher, version, and checksum. - Prefer a project-local, locked dependency over ad hoc `npx` execution. - Run the MCP bridge in a restricted environment with minimal filesystem, environment-variable, and network access. - Establish a process for reviewing and deliberately updating the pinned version. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:41
Finding
Unpinned MCP Server Package Is Installed Globally<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:41-43` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Complete Code Snippet ```markdown ### Option 3: Local MCP server ```bash npm install -g @asterpay/mcp-server ``` ``` ### Technical Analysis The documented command installs the current registry version of `@asterpay/mcp-server` globally without pinning a reviewed version or verifying package integrity. npm packages may execute lifecycle scripts during installation, and the resulting executable remains available on the user's command path. The global installation broadens the potential effect beyond the project directory and makes the installed executable persistent until explicitly removed. This is unnecessary when a project-local, version-locked installation could provide the declared functionality with a smaller trust boundary. ### Attack Path 1. An attacker compromises the package publisher, npm release process, or a dependency. 2. A malicious package version is published to the registry. 3. A user executes the documented global installation command. 4. Malicious lifecycle code may execute during installation, or malicious runtime code executes when the MCP server is launched. 5. The globally installed executable remains available for subsequent agent sessions until removed. ### Impact Assessment A compromised release could execute arbitrary code with the permissions of the user running npm. It could read or alter user-accessible files, inspect environment variables, access agent configuration, initiate network connections, or replace the expected MCP behavior. Global installation increases persistence and exposure but does not, by itself, demonstrate administrator-level privilege escalation. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions - Pin `@asterpay/mcp-server` to an exact reviewed version. - Verify registry provenance and package integrity before installation. - Prefer a project-local dependency controlled by a lockfile instead of `npm install -g`. - Disable or review npm lifecycle scripts where operationally possible. - Execute the server in a sandbox with restricted filesystem and credential access. - Document removal and upgrade procedures for any globally installed component. - Review each new package release before updating the approved version. ]]>

other

Warning
Location
SKILL.md:22
Finding
Potentially Sensitive User Content Is Sent to an External MCP Service Without Explicit Privacy Controls<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:22-34, 65-99` **Vulnerability Type**: `other: Sensitive Data Exposure to External Service` **Risk Level**: Medium ### Complete Code Snippet ```text Install the AsterPay MCP server: npx -y @anthropic-ai/mcp-remote@latest https://x402-api-production-ba87.up.railway.app/mcp ``` ```json { "mcpServers": { "asterpay": { "command": "npx", "args": ["-y", "@anthropic-ai/mcp-remote@latest", "https://x402-api-production-ba87.up.railway.app/mcp"] } } } ``` ```markdown | `check_wallet_tier` | Check your wallet's token balance and discount tier | | `ai_summarize` | $0.01 | Summarize any text | | `ai_sentiment` | $0.01 | Sentiment analysis (positive/negative/neutral) | | `ai_translate` | $0.02 | Translate text to any language | | `ai_code_review` | $0.05 | Code review with security analysis | | `wallet_score` | $0.05 | Wallet reputation and risk score | | `take_screenshot` | $0.02 | Webpage screenshots | ``` ### Technical Analysis The Skill registers a Railway-hosted MCP endpoint and exposes operations that inherently transmit user-controlled data to that external service. Depending on the selected tool, transmitted data may include arbitrary text, proprietary source code, wallet addresses, webpage URLs, or webpage contents captured in screenshots. Remote transmission is functionally necessary for a hosted API, but the documentation does not provide an explicit consent step, a data-classification warning, a retention policy, or instructions to redact credentials and confidential information. The remote server is also an independent trust boundary whose implementation and exposed tool metadata can change without modification to this local file. The Skill does include a guardrail stating that wallet private keys must not be stored or logged. However, it does not establish technical controls preventing users or agents from including secrets in text, source code, URLs, or other reques ...[truncated 1030 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Require explicit user confirmation before transmitting source code, documents, wallet identifiers, private URLs, or webpage contents. - Clearly disclose the remote destination, data processor, retention period, logging behavior, and applicable privacy policy. - Warn users not to submit private keys, seed phrases, access tokens, credentials, personal data, or confidential code. - Add automatic secret detection and redaction before requests leave the local environment. - Send only the fields required for the selected operation. - Allowlist approved MCP tools and validate remote tool definitions before use. - Provide a local-processing option for sensitive summarization, translation, and code review tasks. - Apply contractual and technical controls to remote logs, including encryption, access restrictions, retention limits, and deletion procedures. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The skill instructs users to execute `npx -y @anthropic-ai/mcp-remote@latest ...`, which pulls and runs remote code at install time without pinning to an immutable version. If the package, its dependencies, or the resolved latest tag are compromised, users installing the MCP server could execute attacker-controlled code on their machine; this is especially concerning because the skill is explicitly about connecting agents to a remote payment-related API.