Back to skill

Security audit

bnbchain

Security checks for vulnerabilities and agentic risk

Overview

This skill is purpose-aligned and transparent, but it asks users to run a mutable npm package that may receive wallet private keys for irreversible blockchain actions.

Use this only with a pinned and reviewed package version where possible. Do not provide a private key for read-only tasks. For writes, use a dedicated low-value or testnet wallet, restrict the MCP server environment, and confirm network, recipient, amount, contract, approval limit, and calldata before any transaction.

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

Error
Location
SKILL.md:15
Finding
Unpinned Runtime Dependency Executes Mutable External Code with Wallet Credentials## Vulnerability Details **File Location**: `SKILL.md`, lines 15-32 **Vulnerability Type**: Unpinned runtime dependency and supply-chain exposure **Risk Level**: High **Vulnerable Code Snippet**: ```markdown ## Before you install - **Credentials:** Signing keys and RPC endpoints are supplied by you (see *Credentials and environment* below). Never paste private keys into a UI or an env var you don’t control. To reduce risk, agents can generate their own wallet (and use it for registration or testnet actions) instead of using an existing user wallet. Ask the skill author or [documentation](https://github.com/bnb-chain/bnbchain-mcp) how they are stored and who can access them. - **Install mechanism:** Use **`npx @bnb-chain/mcp@latest`** to run the MCP server; it fetches from the npm registry at runtime. If you prefer to audit first, install the package locally and review the [source code](https://github.com/bnb-chain/bnbchain-mcp) before use. - **Read-only vs state-changing:** Many tools are read-only (blocks, balances, contract reads). Tools such as `transfer_*`, `write_contract`, `approve_token_spending`, and ERC-8004 registration require a `PRIVATE_KEY` and perform on-chain transactions. If you want read-only use only, do not supply a private key and avoid invoking state-changing tools. - **Sandbox and testnet:** Run in a restricted environment when possible. Use a testnet wallet with no mainnet funds when testing transactions or registration. - **Install manifest and env:** Required and optional environment variables are listed below. Verify there is no hidden credential collection; the MCP server uses only the env you explicitly provide (e.g. in your MCP client config). --- ## 1. How to connect Use **`npx @bnb-chain/mcp@latest`** to connect to the BNB Chain MCP server. --- ## 2. Credentials and environment - **RPC / network:** The MCP server uses public or configured RPC endpoints for supported chains (BSC, opBNB, Gre ...[truncated 3546 chars]
Remediation
## Remediation Suggestions 1. Replace `npx @bnb-chain/mcp@latest` with an exact, reviewed version such as `npx @bnb-chain/mcp@1.0.2`, subject to verification that this is the intended release. 2. Commit a lockfile and verify npm integrity metadata or a cryptographic digest before execution. Avoid mutable tags and unconstrained transitive dependencies. 3. Audit the exact package source and dependency tree before allowing it to receive a private key. Repeat the review before upgrading. 4. Prefer a local, reproducible installation using `npm ci` rather than downloading the effective runtime payload on every invocation. 5. Run the MCP server in a restricted sandbox with minimal filesystem access, a constrained environment, and network egress limited to required RPC and service endpoints. 6. Do not expose a private key for read-only use. For writes, use a dedicated low-value wallet with only the permissions and funds needed for the requested operation. 7. Prefer testnet wallets during evaluation. Keep production wallets and unrelated secrets outside the MCP process environment. 8. Require explicit user confirmation of the network, recipient, amount, contract address, function, approval limit, fees, and transaction calldata immediately before every state-changing operation. 9. Reconcile the `SKILL.md` version (`1.0.2`) with `_meta.json` (`1.0.0`) so users can reliably identify the reviewed Skill release.
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 (4)

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
The manifest-level reference to running the MCP server without a pinned version means clients may launch a mutable remote package instead of a deterministic build. This is a genuine supply-chain risk, and in this skill the danger is elevated by wallet, contract-write, token-transfer, Greenfield, and ERC-8004 functionality that could be abused if the runtime package is malicious.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The skill instructs users to run `npx @bnb-chain/mcp@latest`, which fetches and executes the newest package version at runtime rather than a reviewed, immutable version. If the npm package, publisher account, or dependency chain is compromised, users may execute attacker-controlled code in the MCP server context, which is especially dangerous here because the server may have access to `PRIVATE_KEY` and other wallet-related configuration.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
This installation guidance again tells users to execute `npx @bnb-chain/mcp@latest`, creating a supply-chain execution risk because code is retrieved dynamically at runtime. In the context of a blockchain MCP server that can perform writes and may be configured with a signing key, a compromised package could steal secrets or submit unauthorized transactions.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The repeated unpinned `npx` usage normalizes dynamic execution of whatever package version is current at invocation time. Because this skill supports state-changing blockchain operations and explicitly discusses use of a `PRIVATE_KEY`, the blast radius of a package compromise is materially higher than for a read-only utility.

Static analysis

No suspicious patterns detected.