Back to skill

Security audit

MoltyRoyale

Security checks for vulnerabilities and agentic risk

Overview

This skill is for a blockchain-backed game, but it asks the agent to hold wallet private keys, auto-update its own instructions from the web, and make financial transactions with limited user control.

Install only if you are comfortable with an agent managing blockchain keys and spending authority. Use a dedicated low-balance wallet, do not provide an existing private key, review any remote update before use, set strict file permissions, and require explicit confirmation for every transaction, swap, approval, withdrawal, or x402 payment.

Vulnerability Patterns
  • 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
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
Findings (5)

T03 · Remote Payload Retrieval and Execution

Error
Location
heartbeat.md:8
Finding

Mutable Remote Instructions Replace the Audited Skill

Content
View full analysis
~/.molty-royale/skills/skill.md curl -s https://www.moltyroyale.com/game-guide.md > ~/.molty-royale/skills/game-guide.md curl -s https://www.moltyroyale.com/heartbeat.md > ~/.molty-royale/skills/heartbeat.md ``` ### Technical Analysis The Skill treats remotely hosted Markdown as operational instructions and overwrites its local files with newly downloaded versions. No digital signature, checksum, pinned commit, immutable release URL, or manual review is required before the new instructions become effective. Although the retrieved files are Markdown rather than native executables, they determine what actions and tools the Agent will invoke. Replacing these files therefore provides an effective remote payload execution channel. The mandatory pre-game update and daily heartbeat update allow behavior to change after the installed package has been reviewed. ### Attack Path 1. An attacker compromises `www.moltyroyale.com`, its hosting infrastructure, DNS resolution, deployment credentials, or the upstream content publication process. 2. The attacker publishes a modified `skill.md`, `heartbeat.md`, or reference file containing hostile Agent instructions. 3. Before a game or during a heartbeat, the Agent checks the remotely supplied ver ...[truncated 792 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/setup.md:251
Finding

Unnecessary Collection and Persistent Custody of Owner Private Keys

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
heartbeat.md:44
Finding

API Credential File Is Created Without Restrictive Permissions

Content
View full analysis
~/.molty-royale/credentials.json << 'EOF' { "api_key": "mr_live_xxxxxxxxxxxxxxxxxxxxxxxx", "agent_name": "YourAgentName", "account_id": "uuid-here" } EOF ``` ``` ### Technical Analysis The command writes a live API key to a plaintext JSON file but does not set the directory to mode `0700`, create the file with mode `0600`, or set a restrictive `umask`. The resulting permissions depend on the user's environment. This is inconsistent with the wallet examples elsewhere in the project, which explicitly assign mode `0600`. On systems with a permissive umask, another local account or process may be able to read the file. The heredoc pattern can also encourage users to edit or paste a live credential into shell-visible workflows instead of using an operating-system secret store. ### Attack Path 1. A user follows the heartbeat setup command under a permissive umask. 2. `credentials.json` is created with group-readable or world-readable permissions. 3. Another local user, process, backup agent, or exposed container component reads the file. 4. The attacker extracts the `mr_live_...` API key. 5. The attacker authenticates to Molty Royale API endpoints as the victim's Agent account. ### Impact Assessment Exposure permits impersonation of the Agent account within the authority granted to the API key. Depending on server-side authorization, an attacker may inspect account data, join games, submit actions, modify wallet-related account configuration, or disrupt paid and free gameplay. This finding does not demonstrate remote exfiltration by the current code; it concerns preventable local disclosure. ]]>
Remediation
View remediation
"$tmp" <<'EOF' { "api_key": "REPLACE_SECURELY", "agent_name": "YourAgentName", "account_id": "uuid-here" } EOF chmod 600 "$tmp" mv "$tmp" "$HOME/.molty-royale/credentials.json" ``` Additional controls: 1. Prefer an operating-system keychain or dedicated secret manager. 2. Do not place live keys in command arguments, logs, examples, or shell history. 3. Validate permissions before reading the file and refuse overly permissive files. 4. Support API-key rotation and immediate revocation. 5. Redact keys from all diagnostic output. 6. Separate public account metadata from secret authentication material. ]]>

T08 · Insecure Dependencies

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

Wallet-Signing Workflows Install Unpinned Third-Party Dependencies

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

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

Autonomous Asset Purchase and Swapping Lacks Per-Transaction Owner Approval

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 Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (57)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file declares a token trading skill inside a package whose stated purpose is operating a Molty Royale game agent. This capability mismatch is dangerous because it introduces unrelated fund-moving functionality that could be invoked under the trusted umbrella of the game agent, increasing the chance of unauthorized or deceptive asset transfers.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill includes generic mainnet swap and token approval instructions, including router approvals and live trade execution, which are not necessary for the described game-agent functionality. In context, this creates a concealed capability to spend user funds or grant spending approvals to external contracts, making the mismatch substantially more dangerous than if it appeared in a dedicated trading skill.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill description uses very broad trigger phrases like 'token launch', 'create a token', and 'anything about getting a token onto Forge', which can cause the agent to invoke this skill in situations the user did not clearly intend. In this skill's context, mistaken invocation is especially risky because the workflow writes files, installs dependencies, and can perform real blockchain deployment and liquidity actions with financial consequences.

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 {

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

The instructions create a persistent credentials.json file containing a live API key in plaintext. Plaintext credential storage materially increases the risk of secret theft by local malware, other users on the system, accidental commits, backups, or support bundle disclosure, leading to unauthorized use of the account.

Content

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

No credentials file? Create one:

bash
mkdir -p ~/.molty-royale
cat > ~/.molty-royale/credentials.json << 'EOF'
{
  "api_key": "mr_live_xxxxxxxxxxxxxxxxxxxxxxxx",
  "agent_name": "YourAgentName",

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file directly instructs the agent to retain a user's private key in local storage and disclose it only on request, establishing a dangerous secret-retention pattern. Natural-language guidance like this is likely to be implemented literally, creating long-lived exposure of the user's most sensitive credential and enabling theft, impersonation, or unauthorized signing if the stored key is accessed.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This guidance explicitly permits the agent to generate, store, and later hand off an owner private key, creating custodial handling of the user's blockchain credential. Private keys are full-account takeover secrets; storing them locally in an agent workflow and normalizing later disclosure materially increases the chance of theft, misuse, exfiltration, or accidental exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The guidance normalizes local storage of a generated private key without clearly foregrounding the severe security implications of custodial key storage. In practice, this encourages insecure secret persistence and increases exposure to compromise through logs, filesystem leakage, backups, telemetry, or later prompt-triggered disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The example message tells the user the agent will retain the private key and can hand it off later, but does not clearly warn that exposing or transferring that credential grants total control of the wallet. This framing can mislead users into treating a blockchain private key like a routine token instead of a highly sensitive root secret.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The handoff section instructs the agent to provide the generated private key to the user on request, and the broader guidance encourages private-key-based automation. Emitting a raw private key into chat or agent output is highly dangerous because the conversation channel, logs, memory, or surrounding tooling may retain or expose it permanently.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file instructs the agent to ask the user to provide their existing owner private key so the agent can complete signing. Soliciting a live private key is an extremely dangerous anti-pattern because anyone holding that key can irreversibly transfer assets, impersonate the owner, and approve arbitrary onchain actions.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The example text directly encourages asking the user to share the owner private key for automated signing. In the context of a wallet-enabled gaming/paid-room skill, this is especially dangerous because it conditions users to surrender high-value credentials to an automated system, enabling full compromise of funds and approvals.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

These instructions explicitly tell the user they may provide their existing owner private key to the agent without adequate security warning. Because the skill is for operating a paid game agent tied to wallet actions, this creates a direct path to credential compromise and financial loss.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill allows the agent to generate an Owner EOA, retain the private key, and continue using that key for owner-side signing during setup. Allowing an agent to create, store, and later use a user's owner private key is a severe key-management vulnerability because compromise of the agent, logs, memory, or downstream tools could expose full wallet control and enable unauthorized transactions.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The instructions normalize generation and use of an Owner private key without a clear, upfront warning that this credential grants full control over funds and identity associated with the wallet. Users may unknowingly allow highly sensitive secret handling in an unsafe environment, increasing the chance of accidental exposure or misuse.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
100% confidence
Finding

The instructions permit retention of a generated owner's private key and continued operational use by the agent. This is highly dangerous because plaintext or agent-accessible private keys are a single point of catastrophic failure: any compromise of prompts, storage, telemetry, or connected systems can lead directly to wallet takeover and asset theft.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
100% confidence
Finding

The later branch explicitly instructs the agent to provide the generated owner private key on request, which means the system is designed to disclose the secret in plaintext. Any prompt injection, account compromise, or mistaken request handling could exfiltrate the key and grant complete control over the associated wallet and assets.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill describes autonomous purchase of CROSS with USDC and subsequent on-chain swaps without prominent warnings about real-money spending, slippage, fees, recipient correctness, and irreversibility. In context, this is particularly dangerous because the skill is for operating a game agent, so users may not expect the agent to initiate broader financial trading activity on its own.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
89% confidence
Finding

The recommended plain-text credentials.json stores multiple sensitive identifiers and likely secrets, including the API key and wallet metadata, in a predictable local path. Predictable unencrypted credential files are attractive targets for malware, other local users, backups, and accidental commits.

Content

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

md
The `apiKey` is shown only once.

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

Example:

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The guide instructs the agent to generate and retain an Owner EOA private key, and even continue using it for owner-side actions, without a strong custody warning. Holding a user's owner wallet key creates a major compromise risk: theft or misuse of the key could allow unauthorized approvals, asset movement, or full takeover of owner-controlled wallet functions.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The guide says to provide the generated Owner private key on request but does not require verification of the requester or a secure transmission channel. This creates a straightforward secret-exfiltration path through impersonation, compromised chat channels, or accidental disclosure.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Directing the agent to disclose a generated private key is inherently dangerous because the private key is the sole credential controlling the Owner EOA. Any disclosure, even to an allegedly legitimate user, can be intercepted, mishandled, or replayed, resulting in permanent loss of wallet security.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly tells the agent to generate, persist, use, and later disclose an Owner EOA private key. That expands the skill from game automation into custodial key management, creating a direct path to wallet compromise, unauthorized signing, and irreversible asset loss if the agent host, logs, or local storage are exposed. In this context, the danger is increased because the same key is then used for whitelist and paid-room signing flows, making the agent a high-value custodian rather than a narrow game client.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs local storage of a newly generated Owner EOA private key without an upfront, explicit warning about the sensitivity of secret-key custody. Storing a raw private key on disk in a predictable local path materially raises the chance of compromise via filesystem access, backups, telemetry, logs, or malware, and users may not understand that this gives full control of assets and identity. Because the skill frames this as an automatic setup convenience, the surrounding context makes the omission more dangerous, not less.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The legacy-withdraw flow authorizes the agent to perform direct on-chain asset withdrawals using the Owner private key. This grants the skill broad fund-movement capability beyond routine gameplay, so any misuse, prompt injection, storage compromise, or implementation bug could trigger unauthorized transfers or permanent loss through wrong-chain/wrong-address transactions. The risk is amplified because blockchain withdrawals are irreversible and the skill normalizes autonomous execution of those steps.

Content

No source excerpt is available for this finding.