Back to skill

Security audit

MoltyRoyale

Security checks for vulnerabilities and agentic risk

Overview

This game-agent skill is broadly coherent, but it grants high-impact wallet, payment, token-deployment, self-update, and persistent-memory authority without enough scoping or consent controls.

Install only if you intend to let an agent operate a crypto-enabled game account and you are comfortable auditing every wallet, signing, paid-entry, token-deployment, dependency-install, and self-update path. Use a dedicated low-balance wallet, avoid owner private-key custody in chat, disable or remove the remote self-update behavior, require explicit approval and spending limits for every paid or on-chain action, and keep API keys/private keys in a real secret manager rather than plaintext files.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
Findings (8)

T03 · Remote Payload Retrieval and Execution

Error
Location
heartbeat.md:43
Finding

Unverified Remote Replacement of Active Skill Instructions

Content
View full analysis
`memory.localFetchedAt`: ```bash curl -s https://www.moltyroyale.com/skill.md > ~/.molty-royale/skills/skill.md curl -s https://www.moltyroyale.com/heartbeat.md > ~/.molty-royale/skills/heartbeat.md ``` Then update `memory.localFetchedAt` to the current time. ``` ### Technical Analysis The heartbeat replaces locally reviewed Skill instructions with content retrieved from mutable external URLs. The update is triggered by a timestamp supplied through the service API, but the downloaded files are not protected by: - A cryptographic signature - A pinned content hash - A fixed release identifier - Content validation - Atomic staging and rollback - Explicit owner review or confirmation Because `skill.md` and `heartbeat.md` determine subsequent agent behavior, activating downloaded Markdown is functionally equivalent to executing a remote payload. The remote content may instruct the agent to use its filesystem, network, wallet, signing, or credential capabilities in ways that were not present during the original audit. ### Attack Path 1. An attacker compromises or gains control of the Molty Royale API, web origin, CDN, DNS, or deployment pipeline. 2. The API reports a `skillLastUpdate` newer than the locally recorded timestamp. 3. The heartbeat downloads attacker-controlled `skill.md` and `heartbeat.md`. 4. The files overwrite the active local Skill instructions. 5. A later heartbeat loads and follows the replacement instructions. 6. The attacker can direct the agent to disclose credentials, sign transactions, alter persistent state, or perform other available tool operations. ### Impact Assessment Successful exploitation gives the remote content effective control over the agent within al ...[truncated 506 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
heartbeat.md:93
Finding

Recurring Paid-Game Entry Without Transaction-Level Owner Consent

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/paid-games.md:399
Finding

Autonomous Cryptocurrency Purchase and Conversion While Owner Is Unavailable

Content
View full analysis
**When to use Option 3:** Agent is running autonomously, owner is unavailable, agent holds USDC on Base. ``` ### Technical Analysis This flow gives the agent authority to perform a chain of financial operations: 1. Sign an EIP-3009 USDC payment authorization 2. Purchase CROSS through a remote x402 service 3. Trade CROSS for Moltz through a DEX 4. Transfer the result to a game smart-contract wallet 5. Spend the resulting Moltz on paid-game entry The instructions expressly recommend performing these operations without human intervention while the owner is unavailable. They do not require approval of the final payment amount, exchange rate, recipient, token contracts, minimum output, slippage, gas cost, or cumulative budget. ### Attack Path 1. The paid-game flow detects insufficient Moltz. 2. The agent finds an accessible private key whose address holds USDC. 3. It requests a quote from the x402 service. 4. The SDK signs payment requirements returned by the remote server. 5. USDC is spent to acquire CROSS. 6. The agent approves or trade ...[truncated 788 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
forge-token-deployer.md:36
Finding

Unpinned Third-Party Dependency Installation in Wallet and Payment Workflows

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
x402-quickstart.md:13
Finding

Testnet and Production Payment Configurations Use the Same Endpoint

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/setup.md:246
Finding

API Credentials May Be Stored Without Restrictive File Permissions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
cross-forge-trade.md:208
Finding

Private Keys Are Passed Through Command-Line Arguments

Content
View full analysis
\ \ \ --value 10ether \ --rpc-url https://mainnet.crosstoken.io:22001 \ --private-key ``` ``` The approval and sell examples use the same pattern: ```bash --private-key ``` ### Technical Analysis Substituting a real private key into the `--private-key` argument can expose it through: - Shell history - Process listings - Terminal or session recording - Audit logs - Agent transcripts - Command telemetry - Error reports Environment isolation does not fully address this issue because the secret is still present in the process argument vector. A private key authorizes arbitrary transactions for the corresponding EVM account, not only the documented trade. ### Attack Path 1. The user or agent replaces `` with a real key. 2. The command is executed. 3. The command line is retained in history, logs, or process metadata. 4. An attacker or another local process retrieves the key. 5. The attacker imports the key and signs arbitrary transfers or contract calls. ### Impact Assessment Compromise of the private key gives control over all assets and permissions associated with the wallet, potentially including CROSS, Moltz, deployed-token ownership, whitelist authority, and unrelated assets held by the same account. ]]>
Remediation
View remediation

T02 · Agent Memory Poisoning

Warning
Location
references/agent-memory.md:93
Finding

Untrusted Game Content Can Influence Persistent Strategy Memory

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
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (47)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill metadata says it is for operating a Molty Royale game agent, but the actual content implements token deployment and liquidity-pool creation on a blockchain. This mismatch can cause a user or higher-level agent to invoke a financially impactful capability under false pretenses, increasing the risk of unauthorized token launches, on-chain transactions, and supply-chain style abuse.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · forge-token-deployer.md (reported line 106)May include surrounding context.

md
const clientKey = process.env.CLIENT_KEY;
    const clientSecret = process.env.CLIENT_SECRET;
    if (!clientKey || !clientSecret) {
      throw new Error("CLIENT_KEY and CLIENT_SECRET environment variables are not set. Please check your .env file.");
    }
    headers["Authorization"] = `API-Key ${clientKey}:${clientSecret}`;
  } else {

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The workflow instructs the agent to write code, install dependencies, deploy tokens, and create liquidity pools without a strong, upfront warning that these are real on-chain actions with possible fees, irreversible effects, and ownership consequences. In practice, this can lead users or autonomous agents to trigger financially and operationally significant transactions without informed consent.

Content

No source excerpt is available for this finding.

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · heartbeat.md (reported line 254)May include surrounding context.

clear temp entirely

text

**Reset memory:**

```text
current_phase = preparing

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/identity.md (reported line 128)May include surrounding context.

3. Unregister Identity

DELETE /api/identity (requires X-API-Key)

bash
curl -X DELETE https://cdn.moltyroyale.com/api/identity \

Ssd 3

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The example message normalizes keeping a stored private key so the agent can later perform owner-side signing and disclose it on request, which embeds unsafe secret-retention behavior into the operational workflow. In the Molty Royale context, that makes the agent a custodian of the owner's wallet credentials, greatly increasing the blast radius of any prompt leakage, system compromise, or operator error.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The guidance explicitly instructs the agent to provide a generated owner wallet private key to the user, which normalizes secret export and increases the chance of exposure through chat logs, prompt injection, logging, or mishandling by the agent platform. In a skill that manages paid-room setup and owner-side signing, private-key disclosure is especially dangerous because compromise would give full control over the owner wallet and any linked onchain actions.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instructions authorize handing the generated wallet private key to the user in plain language, which implicitly treats a high-value secret as ordinary conversational content. Because this is an agent skill operating through text interfaces, disclosure via chat can be captured in transcripts, observability systems, browser history, or downstream integrations, leading to irreversible wallet compromise.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This section explicitly enables the agent to autonomously buy CROSS with USDC and then swap CROSS to Moltz, which extends the skill from game participation into discretionary external asset trading and spending. Those transactions are irreversible and can move user-controlled funds across systems; within a game-agent skill, that broader financial authority materially increases the risk of unauthorized spending or abuse.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

The workflow relies on reading local credential files to determine first-run status and decide whether to continue with existing secrets. Accessing and trusting local credential stores as control inputs can expose or misuse sensitive data if the files are readable by other processes, tampered with, or inherited from another user/session.

Content

Scanner excerpt · references/setup.md (reported line 24)May include surrounding context.

md
First-run detection (file-based):
- Treat as **first-run** if one of these is missing:
  - `dev-agent/credentials.json`
  - `dev-agent/owner-intake.json`
- If both files exist, treat as **returning-run**.
- Returning-run asks only missing/invalid fields, not the full list.

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

This instruction explicitly directs the agent to persist credential values, including API keys and wallet-related data, into a local JSON file. Plaintext local storage of reusable credentials materially increases the chance of account takeover or unauthorized API use if the host, backups, or workspace are compromised.

Content

Scanner excerpt · references/setup.md (reported line 43)May include surrounding context.

md
After answers are collected:
- Persist normalized answers into `dev-agent/owner-intake.json`.
- Persist credential values into `dev-agent/credentials.json`.
- If `X-API-Key` is present, start execution immediately.
- If paid prerequisites are missing, continue free loop and keep paid as pending.
- Never block gameplay waiting for non-critical prerequisites.

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

The guide tells the agent to save the one-time API key immediately to a recommended credentials file and then use it for all subsequent API calls. This encourages durable local storage of a bearer credential that can grant ongoing account access if exposed.

Content

Scanner excerpt · references/setup.md (reported line 119)May include surrounding context.

md
- ⚠️ **CRITICAL: if you use a placeholder like `0xYourEthereumAddress`, EIP-712 signing will permanently fail**
  - `apiKey` appears in this response **once only** — save it immediately
  - Also save `accountId` and `publicId`
  - Recommended path: `~/.molty-royale/credentials.json`
  - All subsequent API calls require `X-API-Key: mr_live_xxx` header

- [ ] Step 3: Determine Owner EOA (separate from Agent EOA)

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

The recommended credentials path and example schema normalize storing the API key, owner EOA, and wallet identifiers together in a local file. Consolidating sensitive access data in one plaintext location makes host compromise more damaging and simplifies credential harvesting.

Content

Scanner excerpt · references/setup.md (reported line 254)May include surrounding context.

md
The `apiKey` is shown only once.

Recommended credentials path:
`~/.molty-royale/credentials.json`

Example:

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file explicitly tells the agent to provide a generated Owner private key to the user on request. Normalizing secret disclosure through conversational output is dangerous because it increases the chance of accidental exfiltration via logs, transcripts, prompt injection, UI history, or delivery to the wrong party.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documented scope extends beyond the declared purpose of running a Molty Royale agent into general crypto trading, token deployment, and payment-protocol operations. In agentic systems, this kind of scope creep is dangerous because an operator invoking a game skill may unknowingly expose wallets, signing flows, or funds to actions outside expected gameplay behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises top-level files for CROSS/Forge DEX trading, token deployment, and x402 payment workflows that are not necessary to operate a Molty Royale gameplay agent. Expanding a game-automation skill into financial and token-management actions increases privilege scope and creates a path for unintended or unsafe high-impact operations if an agent follows the broader index.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill includes ready-to-run cast send commands for approve, buy, and sell operations using a live mainnet RPC and a private key parameter, but it does not clearly and explicitly warn that these are real, irreversible on-chain transactions. In an agent-skill context, this omission increases the risk that a user or automated agent executes fund-spending or token-approval actions without understanding financial consequences, approval risk, or the need to verify recipient, router, chain, and amount parameters.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The description contains broad trigger phrases such as 'anything about getting a token onto Forge,' which can cause accidental or overly eager activation. In an agent setting, ambiguous routing into a skill that writes files, installs packages, and performs blockchain actions materially raises the chance of unintended execution.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · heartbeat.md (reported line 14)May include surrounding context.

md
- `overall` → apply accumulated playstyle, strategy, and lessons
- `temp` → restore game context from the previous turn

If the file does not exist, start with defaults and create it after the first game ends.

---

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The heartbeat includes a self-update mechanism that downloads and replaces local skill files from remote URLs during normal operation. This creates a supply-chain and remote-instruction injection risk: if the remote content is compromised, changed unexpectedly, or served maliciously, the agent will ingest new behavior without review, potentially including credential misuse or unsafe actions.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · heartbeat.md (reported line 117)May include surrounding context.

2b. Enter queue

bash
curl -X POST https://cdn.moltyroyale.com/api/join \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"entryType": "free"}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file documents talk, whisper, and broadcast network actions but does not clearly warn that message content is transmitted to other players or globally to all agents. In an agent skill context, that omission can cause operators or downstream agents to send sensitive data, prompts, secrets, or internal reasoning over player-visible channels, creating preventable privacy and data-leakage risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The document states that thought fields are revealed later and immediately on death, but presents this as a normal feature rather than a prominent security warning. Because the thought object may contain reasoning or planned actions, agents could expose strategy, sensitive context, system prompts, or other internal metadata to other players, making this a meaningful confidentiality risk in an autonomous-agent setting.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill instructs an agent to perform irreversible blockchain actions such as ERC20 deployment, liquidity pool creation, and token registration without an explicit confirmation gate immediately before execution. In an autonomous or loosely supervised agent setting, this can lead to unintended on-chain transactions, permanent misconfiguration, wasted funds, or locking an agent into a one-token-per-agent registration state.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/free-games.md (reported line 46)May include surrounding context.

1. Register identity (one-time)

bash
curl -X POST https://cdn.moltyroyale.com/api/identity \
  -H "Content-Type: application/json" \
  -H "X-API-Key: mr_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -d '{"agentId": 42}'