Back to skill

Security audit

Openclaw Fomo3d

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to match its advertised blockchain game and trading purpose, but it handles real-wallet signing in ways that can put funds at risk.

Review carefully before installing. Use only a dedicated low-value wallet, prefer testnet first, avoid storing a private key in config.json, and do not use mainnet trading commands unless you understand that transactions are irreversible, approvals may be unlimited, and trades have no slippage protection.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
src/commands/setup.ts:18
Finding

Wallet Private Key Is Collected with Echo and Stored in a Plaintext Configuration File

Content
View full analysis
): void { const existing = readConfigFile() ?? {} const merged = { ...existing, ...config } writeFileSync(CONFIG_PATH, JSON.stringify(merged, null, 2) + "\n") } ``` ### Technical Analysis The setup command accepts a raw blockchain private key through a normal `readline` prompt. Standard terminal input remains visible while the user types, allowing shoulder surfing, terminal recording, or session logging to capture the secret. The unencrypted private key is subsequently written into `config.json` at the project root. The write operation does not explicitly request owner-only permissions such as mode `0o600`, inspect the permissions of an existing file, or use an operating-system credential store. Its effective accessibility therefore depends on the process umask and existing ...[truncated 1479 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
src/commands/buy.ts:46
Finding

Token Trades Execute Without Slippage Protection

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
src/lib/erc20.ts:25
Finding

Automatic ERC-20 Approval Grants Permanent Unlimited Allowance

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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 (43)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description focuses on gameplay and market operations on BNB Chain: Fomo3D participation, slot spins, prediction markets, token trading, dividends, and wallet management. The supplied code does none of those things directly. Instead, it provides a separate faucet feature for testnet only, claiming FOMO tokens by POSTing the user's wallet address to a Supabase Edge Function. That is a materially different primary purpose and involves an external centralized resource not disclosed in the description. While a faucet could be adjacent to a testnet gaming ecosystem, it is still an undeclared capability and not covered by the stated functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The description presents a broad gaming and trading skill covering Fomo3D, slot machine, prediction markets, token trading, and wallet operations. The supplied code chunk is much narrower: it is a CLI command for viewing token info and balances. It reads local config, may derive an address from a stored private key, queries token status from FLAP/Portal, gets ERC-20 and native BNB balances, and formats output. This is not inherently malicious, but it is materially different from the declared primary purpose because none of the advertised game actions or market operations appear here. Additionally, deriving an account from a configured private key is a capability touching sensitive wallet material that is not reflected in the declared permissions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description centers on three gaming products: Fomo3D, a slot machine, and prediction markets, plus broad user actions around those products. The supplied code chunk instead implements low-level token trading/status infrastructure for a FLAP Portal and PancakeSwap on BNB Chain. It contains contract addresses, swap ABIs, token status definitions, and a query function for token market state. While the description briefly mentions trading on FLAP Portal or PancakeSwap, that is only one small part of the declared scope; this chunk does not implement the prominently declared game mechanics or related operations. Therefore the code's actual purpose is materially narrower and different from the declared primary purpose, so this should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description describes a full-featured BNB Chain gaming/trading skill with on-chain gameplay, market operations, token trading, and wallet actions. The actual code chunk is a small output helper module unrelated to those domain capabilities. It does not interact with BNB Chain, wallets, smart contracts, games, markets, or exchanges; it only manages console output and JSON formatting. While this could be a supporting utility within a larger skill, the supplied code chunk itself does not accurately represent the declared purpose, so this is a clear description-behavior mismatch for the provided code.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill asks users to configure a raw blockchain private key and supports real-funds transactions, but the warninging and consent language is not proportionate to that risk. In this context, insufficient disclosure is dangerous because users may expose signing credentials or authorize irreversible on-chain actions without understanding the consequences.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill requires sensitive environment access (FOMO3D_PRIVATE_KEY) and networked blockchain interactions but does not declare an explicit tool scope or permissions boundary. That omission increases the chance the agent invokes a high-risk skill without adequate user awareness or sandbox policy enforcement.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The invocation text is very broad and encourages use for many generic gaming, trading, and wallet-management requests. In a skill that can sign blockchain transactions with a private key, overbroad triggering materially raises the risk of accidental invocation and unintended fund-moving actions.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

The skill states it will automatically issue ERC-20 approvals before multiple transactional commands. Automatic approval is dangerous in a blockchain context because allowances can authorize future token spending beyond the immediate action, and users may not see or approve the exact amount, spender, or duration.

Content

Scanner excerpt · SKILL.md (reported line 69)May include surrounding context.

md
Share amounts for `purchase --shares` are **integers** (not wei). 1 share = 1 share.

### Auto-Approve

The CLI automatically checks ERC20 token allowance and approves if needed before `purchase`, `buy`, `sell`, `slot spin`, `slot deposit`, `pred bet`, `pred propose`, and `pred dispute`. No manual approval step required.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

Auto-approval during share purchases delegates token-spending authority as part of a user flow that also spends funds in a high-risk gambling application. Because approvals are a separate authorization step from purchase execution, hiding them behind automation can expose more value than the user intended if the spender contract is buggy, upgraded, or malicious.

Content

Scanner excerpt · SKILL.md (reported line 139)May include surrounding context.

md
**Pre-checks performed automatically:**
- Game must not be paused
- No pending withdrawal (must `settle` first)
- Token approval (auto-approved if needed)

**Output fields:** `txHash`, `blockNumber`, `status`, `sharesAmount`, `tokensCost` (wei)

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

Automatic approval for sell flows is especially risky because it can grant DEX/router contracts token-spending rights without deliberate user review. In a real-funds trading skill, this increases the blast radius of contract compromise, wrong-token routing, or mistaken approvals.

Content

Scanner excerpt · SKILL.md (reported line 208)May include surrounding context.

  • --amount: Sell exact token amount (in wei, 18 decimals)
  • --percent: Sell by percentage of holdings in basis points (10000=100%, 5000=50%, 1000=10%)

Cannot use both flags simultaneously. Token allowance is auto-approved for Portal/PancakeSwap.

Example: Sell 50% of holdings:

bash

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
93% confidence
Finding

Auto-approving token spending for prediction-market bets combines gambling behavior with silent authorization changes. Users may think they are placing a single bet while the skill first creates a broader allowance that could be reused by the contract or misused if the target contract is unsafe.

Content

Scanner excerpt · SKILL.md (reported line 344)May include surrounding context.

md
**Pre-checks performed automatically:**
- Market must be Active (not paused)
- Amount must be >= minBet
- Token approval (auto-approved if needed)

**Output fields:** `txHash`, `blockNumber`, `status`, `marketId`, `side`, `amount` (wei)

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

Auto-approving bond transfers for optimistic proposals silently authorizes token movement in a dispute-resolution system where funds may be locked or forfeited. Although the amounts may be smaller than trading flows, hidden approvals still reduce user control over on-chain authorization.

Content

Scanner excerpt · SKILL.md (reported line 420)May include surrounding context.

bash
fomo3d pred propose --id <marketId> --outcome <yes|no|draw> --json

Propose the outcome for an Optimistic-type market. Requires bond (auto-approved from token balance). Bond is returned if proposal is not disputed and is finalized.

Output fields: txHash, blockNumber, status, marketId, outcome, bondAmount (wei)

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

Auto-approval for disputes is risky because it authorizes token transfer for an adversarial process where the user may lose part of the bond. In this skill context, silent approvals are more dangerous because they are tied to speculative/gambling workflows and potentially irreversible outcomes.

Content

Scanner excerpt · SKILL.md (reported line 429)May include surrounding context.

bash
fomo3d pred dispute --id <marketId> --json

Challenge a proposed outcome within the challenge period. Requires same bond amount (auto-approved). If you win the dispute, you get your bond back + 50% of proposer's bond.

Output fields: txHash, blockNumber, status, marketId, bondAmount (wei)

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

The shebang uses #!/usr/bin/env npx tsx, which causes execution to resolve and potentially download tsx at runtime rather than relying on a pinned, locally installed dependency. That creates a supply-chain risk: an attacker controlling dependency resolution, registry responses, or the execution environment could cause unreviewed code to run before the CLI logic, which is especially dangerous for a wallet-enabled blockchain tool.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
89% confidence
Finding

The help text advertises that purchase --shares <n> 'auto-approves token', indicating the command may grant token allowance automatically as part of a purchase flow. In a blockchain wallet context, automatic approvals are security-sensitive because they can authorize future token movement without a clear, separate user consent step, and excessive or unlimited approvals can lead to fund loss if the spender contract is compromised or misconfigured.

Content

Scanner excerpt · bin/fomo3d.ts (reported line 214)May include surrounding context.

ts
faucet                        Claim 10000 test FOMO tokens

GAME ACTIONS:
  purchase --shares <n>         Buy shares (auto-approves token)
  exit                          Exit game, claim dividends
  settle                        Settle after round ends + claim prize
  end-round                     End expired round

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The Portal buy path sends an irreversible on-chain transaction with minOutputAmount: 0n, which provides no slippage protection and can result in receiving far fewer tokens than expected if price movement, poor liquidity, or manipulation occurs before execution. In a wallet-managing trading skill, the absence of an explicit confirmation about finality and pricing risk materially increases the chance of accidental financial loss.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The PancakeSwap path uses swapExactETHForTokensSupportingFeeOnTransferTokens with amountOutMin set to 0n, meaning the trade will execute regardless of how few tokens are returned. This exposes users to severe value loss from slippage, frontrunning, sandwich attacks, or illiquid/malicious token pairs, and the transaction is final once broadcast.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The command falls back to loading a private key via requirePrivateKey(config) and constructing a wallet client, which accesses sensitive credentials. In this file there is no confirmation prompt, warning log, or explanatory comment disclosing that credential material may be used when --address is omitted.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This command automatically grants token allowance for the dispute bond and immediately submits an on-chain dispute transaction with no explicit user confirmation or dry-run step. In a wallet-managing blockchain skill, that creates a real risk of unintended token approval and irreversible fund expenditure if the user mistypes parameters, misunderstands the action, or the skill is invoked in an unexpected context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This command performs two state-changing blockchain actions in sequence: it may automatically approve token spending via ensureAllowance and then submits proposeOutcome using the user's private key, without any explicit confirmation prompt, dry-run, or final transaction summary in this file. In a wallet-managing gaming/betting skill, silent approval plus transaction execution is dangerous because a user can unintentionally authorize token movement and lock funds as a bond, especially if CLI arguments are mistaken, maliciously supplied, or socially engineered.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The command automatically derives the user's wallet address from the configured private key and then queries and displays wallet balances without an explicit opt-in or warning. In a blockchain gaming/trading skill, this can unintentionally disclose sensitive financial metadata in terminals, logs, screenshots, CI runs, or shared environments, even though it does not print the private key itself.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

When no --address is provided, the command loads a private key via requirePrivateKey and derives the wallet address from it. Although this is part of wallet-related functionality, this file contains no user-facing disclosure, prompt, or explanatory comment that sensitive credential material will be accessed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This code reads a sensitive credential via process.env.FOMO3D_PRIVATE_KEY and falls back to a config file value, but there is no user-facing log, prompt, or explanatory comment warning that a private key will be consumed. For code files, access to sensitive environment variables or credentials should have some visible disclosure unless clearly documented elsewhere.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

writeConfig writes merged configuration directly to config.json, and the Config schema includes a privateKey field. In a wallet-managing blockchain skill, this can result in plaintext private key storage on disk, exposing funds if the file is read by other local users, malware, backups, or accidental commits.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The function automatically grants maxUint256 allowance whenever the current allowance is insufficient, creating an effectively unlimited approval to the spender. If the spender contract is compromised, malicious, upgradeable, or incorrectly configured, it can drain all present and future tokens of that type from the user's wallet without further consent; in this gaming/trading skill context, frequent token interactions make this more dangerous, not less.

Content

No source excerpt is available for this finding.