Back to skill

Security audit

Bitget Wallet Skill.Disabled

Security checks for vulnerabilities and agentic risk

Overview

This skill is openly crypto-focused, but it includes high-impact wallet signing, payment, self-update, and raw key-handling flows that need careful review before installation.

Install only if you intend to let an agent handle crypto wallet custody, signing, swaps, and x402 payments. Use a dedicated low-balance wallet, avoid passing private keys on the command line or through broad environment variables, do not use x402 --auto with untrusted URLs, review every decoded transaction/payment before signing, and avoid the main-branch self-update path unless you separately verify the new release.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/order_sign.py:409
Finding

Opaque Server-Provided Transactions and Authorization Hashes Are Signed Without Intent Validation

Content
View full analysis
list[str]: """ Sign all EIP-712 hash signatures in an order-create response. """ from eth_account import Account acct = Account.from_key(private_key) signed_list = [] sigs = order_data.get("signatures", []) if not sigs: raise ValueError("No signatures in order data. Is this a 'txs' mode order?") for item in sigs: api_hash = item.get("hash") if not api_hash: raise ValueError(f"Missing 'hash' field in signature item: {item}") hash_bytes = bytes.fromhex(api_hash[2:]) signed = acct.unsafe_sign_hash(hash_bytes) sig_hex = "0x" + signed.signature.hex() signed_list.append(sig_hex) return signed_list ``` ```python def sign_order_txs_evm(order_data: dict, private_key: str, chain_id: int = None) -> list[str]: from eth_account import Account acct = Account.from_key(private_key) signed_list = [] txs = order_data.get("txs", []) if not txs: raise ValueError("No txs in order data. Is this a 'signatures' mode order?") for tx_item in txs: item_cid = int(tx_item.get("chainId") or (tx_item.get("deriveTransaction") or {}).get("chainId") or 0) if item_cid == _SOLANA_CHAIN_ID: raise ValueError( "One or more tx items are Solana (chainId 501). " "Use --private-key-sol for Solana orders." ) derive = tx_item.get("deriveTransaction") or {} msgs = tx_item.get("msgs") or derive.get("msgs") or [] if msgs and any(m.get("signType") == "eth_sign" for m in msgs): msg_sigs = _sign_m ...[truncated 4881 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/order_sign.py:593
Finding

Wallet Private Keys Are Passed Through Process Arguments and Environment Variables

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/x402_pay.py:177
Finding

Arbitrary x402 Servers Can Define Automatically Signed Payment Authorizations

Content
View full analysis
MAX_AMOUNT: raise ValueError( f"Payment amount {amount} exceeds hard cap {MAX_AMOUNT} " f"(${amount / 1_000_000:.2f} > " f"${MAX_AMOUNT / 1_000_000:.2f} USDC). " f"Refusing to sign — possible malicious server." ) scheme = req.get("scheme", "exact") network = req.get("network", "") payload = { "x402Version": 2, "accepted": req, } if network.startswith("eip155:"): cid = int(network.split(":")[1]) if not chain_id else chain_id extra = req.get("extra", {}) method = extra.get("assetTransferMethod", "eip3009") if method == "eip3009": result = sign_eip3009( private_key=private_key, token_address=req["asset"], chain_id=cid, to=req["payTo"], amount=req["amount"], token_name=extra.get("name", "USD Coin"), token_version=extra.get("version", "2"), max_timeout=req.get("maxTimeoutSeconds", 60), ) payload["payload"] = result else: raise NotImplementedError("Permit2 signing not yet implemented") elif network.startswi ...[truncated 5771 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:47
Finding

Mutable Main-Branch Self-Update Can Replace the Audited Skill

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (34)

Context-Inappropriate Capability

Critical
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code signs EIP-3009 authorizations and Solana transactions using a provided private key, enabling real asset transfers or authorization of transfers. In the context of a market-data skill, this is especially dangerous because it grants transaction-signing capability unrelated to the advertised purpose, creating a severe risk of unauthorized or socially engineered fund movement if invoked by an agent or operator.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documentation extends beyond Bitget API interaction into raw private-key use, x402 payment signing, and submission of signatures to external services. That is a substantial expansion of capability beyond the declared purpose and introduces payment and exfiltration risk under the guise of a normal wallet-info skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation extends beyond Bitget API interaction into raw private-key use, x402 payment signing, and submission of signatures to external services. That is a substantial expansion of capability beyond the declared purpose and introduces payment and exfiltration risk under the guise of a normal wallet-info skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documentation extends beyond Bitget API interaction into raw private-key use, x402 payment signing, and submission of signatures to external services. That is a substantial expansion of capability beyond the declared purpose and introduces payment and exfiltration risk under the guise of a normal wallet-info skill.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill instructs the agent to fetch remote content from a GitHub main branch, replace all local files, and then continue operating. This is a classic remote code supply-chain risk: an attacker controlling the repository, branch, or transport outcome could change the skill's behavior to steal secrets, alter transactions, or expand capabilities.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The wallet setup flow tells the agent to generate and store a mnemonic but does not require a strong upfront warning that this creates a custodial secret whose compromise or loss can irreversibly lose user funds. In a crypto-wallet context, insufficient disclosure around seed generation and storage is especially dangerous because users may not understand they are delegating key custody to the agent environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The one-shot make/sign/send flow combines order creation, signing, and submission using raw private keys, which creates a high-risk path for immediate fund movement without clear safety friction. In this skill context, automated transaction execution is especially dangerous because users may treat documentation examples as safe defaults while the operation is irreversible and secret-bearing.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The pay --url interface advertises a generic pay-and-fetch capability for arbitrary URLs, which is unjustified by a wallet/market-data/swap-audit skill and materially broadens the attack surface. In an agent setting, this could enable unintended payments to attacker-controlled services or exfiltration-linked transaction flows under the guise of fetching a resource.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · docs/wallet-signing.md (reported line 27)May include surrounding context.

Principle: mnemonic is the only persistent secret. Private keys are ephemeral.

text
Storage:     Mnemonic in secure storage (encrypted vault, keychain, etc.)
Derivation:  On-the-fly, per signing operation
Lifecycle:   Derive → sign → discard. Keys never persist beyond a single operation.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This is the same underlying issue at a slightly different span: the docs instruct operators to provide private keys on the command line for both EVM and Solana signing flows. For wallet-signing automation, that creates a realistic credential-exposure path via ps, audit logs, orchestration metadata, shell history, or crash reports, enabling theft of assets and unauthorized signing.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

This script goes beyond passive wallet or market-data functionality and directly performs signing and submission of blockchain transactions. In an agent skill context, that creates a dangerous capability boundary violation: a compromised agent flow, prompt injection, or mistaken invocation could trigger irreversible fund movements using user-controlled keys.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Accepting raw EVM and Solana private keys via command-line arguments is highly dangerous because CLI arguments are commonly exposed through shell history, process listings, job logs, crash reports, and orchestration telemetry. In this skill, those keys are then used to sign transactions, so any leakage can result in full wallet compromise and theft of all assets controlled by the keys.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This file implements a standalone x402 payment/signing client, including private-key based blockchain payment flows, which does not align with the declared Bitget Wallet market-data and token-info skill purpose. That mismatch is dangerous because it introduces hidden money-movement capability into a skill that users and reviewers would reasonably expect to be read-only, increasing the risk of deceptive wallet operations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The generic fetch-pay-retry HTTP 402 flow allows the script to contact arbitrary URLs, parse server-supplied payment instructions, sign them, and transmit a payment payload back. Even with a hard cap, this creates a generalized paid-access mechanism unrelated to the declared Bitget Wallet API scope, and could be abused to route funds to attacker-controlled endpoints or normalize autonomous payment behavior in an otherwise informational skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README instructs users to invoke an x402 payment flow with a raw --private-key <key> argument and emphasizes automatic payment retries, but it does not prominently warn that this authorizes spending USDC to third-party services. In an agent-skill context, examples like this can be copied verbatim into automation, increasing the chance that users expose signing keys in shell history/process lists and approve unintended paid requests.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill declares no explicit tool scope even though it clearly requires network access and likely access to environment/secrets for wallet and signing workflows. In a wallet-management skill, undeclared capabilities reduce policy visibility and increase the chance the agent is granted broader access than users or reviewers expect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger language is broad enough to activate on many common wallet, token, and market questions, potentially routing benign informational requests into a skill that also has transactional and signing capabilities. In this context, broad activation increases exposure to accidental use of high-risk functionality.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

These instructions describe signing and submitting transactions with private keys but do not warn that the keys are highly sensitive or that sending signed transactions can irreversibly move funds. In agent-operated environments, omission of those warnings increases the likelihood of unsafe key handling and accidental transaction broadcast.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documented x402_pay.py functionality expands the skill from Bitget wallet market-data/swap tooling into generic third-party payment execution and resource fetching. That scope drift is dangerous because it normalizes signing and sending value-bearing transactions to arbitrary endpoints, increasing the chance an agent or user invokes payment behavior unrelated to the skill’s stated purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The payment examples accept private keys for automated signing and fetching paid resources without warning about secret exposure, replay of examples, or unintended value transfer. Because this is documented inside a wallet skill, users may over-trust the flow and expose credentials or trigger payments to untrusted services.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
81% confidence
Finding

The example shows sending payment and fetching data from an external URL, which confirms the skill supports outbound interaction with arbitrary remote services. Even if the example domain is illustrative, the capability is risky in an agent context because it can facilitate unintended external transmission tied to payment execution.

Content

Scanner excerpt · docs/commands.md (reported line 131)May include surrounding context.

bash
python3 scripts/x402_pay.py sign-eip3009 --private-key <hex> --token <usdc> --chain-id 8453 --to <payTo> --amount 10000
python3 scripts/x402_pay.py sign-solana --private-key <hex> --transaction <base64_tx>
python3 scripts/x402_pay.py pay --url https://api.example.com/data --private-key <hex>

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% 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.

Content

Scanner excerpt · docs/swap.md (reported line 160)May include surrounding context.

md
### EVM token approval

On EVM chains, tokens must be **approved** for the router before spending. Without approval, the swap will revert on-chain and still consume gas.

- Only ERC-20 (and similar) need approval; **native** tokens (ETH, BNB, etc.) do not.
- Approval is typically done once with a large amount; later swaps of the same token can reuse it.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation explicitly shows order_sign.py --private-key <hex> and --private-key-sol <...> usage even though the same file warns not to pass secrets via command-line arguments because they may be exposed through process listings, shell history, and monitoring tools. In an agent/wallet context, exposing a mnemonic-derived private key can immediately compromise funds across one or more chains.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · docs/x402-payments.md (reported line 147)May include surrounding context.

md
| Facilitator | URL | Networks | Auth | Cost |
|------------|-----|----------|------|------|
| **CDP (Coinbase)** | `https://api.cdp.coinbase.com/platform/v2/x402` | Base, Base Sepolia, Solana, Solana Devnet | CDP API keys | Free 1000/mo, then $0.001/tx |
| x402.org | `https://x402.org/facilitator` | Base Sepolia, Solana Devnet only | None | Free (testnet only) |

**Notes:**

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document provides a paid mainnet test flow that requires passing a private key on the command line and spending real USDC, but it does not prominently warn about key exposure and real financial loss. Command-line secrets can leak via shell history, process listings, logs, or screenshots, making credential compromise and unauthorized wallet use more likely.

Content

No source excerpt is available for this finding.