Back to skill

Security audit

Hot Fun Integration

Security checks for vulnerabilities and agentic risk

Overview

This skill is for creating Solana tokens, but it gives a remote service and mutable npm code too much practical authority over a wallet private key and on-chain transactions.

Review this skill carefully before installing. Use only a low-balance dedicated wallet, avoid project-local .env files for PRIVATE_KEY, avoid unpinned npx or @latest installs, and do not sign unless the transaction can be independently decoded and verified against the intended token creation action. I found no direct private-key exfiltration or hidden destructive code in the artifact, so this is Review rather than malicious.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/create-token.ts:114
Finding
Untrusted Server-Provided Transaction Is Signed Without Validation<![CDATA[ ## Vulnerability Details **File Location**: `scripts/create-token.ts:114-155` **Vulnerability Type**: Signing and broadcasting an untrusted transaction without validating its instructions **Risk Level**: High ### Vulnerable Code ```ts const res = await fetch(API_URL, { method: 'POST', body: formData, }); if (!res.ok) { const text = await res.text().catch(() => ''); throw new Error(`API request failed: ${res.status} ${res.statusText}\n${text}`); } const json = await res.json() as { data: { transaction: string; signature: string; dbc_config: string; dbc_pool: string; base_mint: string; name: string; symbol: string; uri: string; royalty_party: string; }; common: Record<string, unknown>; }; const { transaction: txBase58, dbc_config, dbc_pool, base_mint, uri } = json.data; if (!txBase58) { throw new Error('API returned empty transaction. Response: ' + JSON.stringify(json)); } console.error(` base_mint: ${base_mint}`); console.error(` dbc_config: ${dbc_config}`); console.error(` dbc_pool: ${dbc_pool}`); console.error(` uri: ${uri}`); // ── Step 2: Deserialize and sign transaction ────────────────────────── const txBytes = bs58.decode(txBase58); const tx = VersionedTransaction.deserialize(txBytes); tx.sign([keypair]); // ── Step 3: Send to Solana RPC ──────────────────────────────────────── console.error('Sending transaction ...'); const txHash = await connection.sendRawTransaction(tx.serialize(), { skipPreflight: false, maxRetries: 3, }); ``` ### Technical Analysis The remote API at `https://gate.game.com/v3/hotfun/agent/create_pool_with_config` fully controls the serialized Solana transaction returned to the client. The script decodes and deserializes that transaction, signs it with the wallet key supplied through `PRIVATE_KEY`, and broadcasts it without inspecting its contents. The script does not verify: - The transaction fee payer. - The invoked Solana program IDs. - The transactio ...[truncated 2023 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Decode and validate every transaction instruction before signing. 2. Require the fee payer to equal the expected wallet public key. 3. Maintain a strict allowlist of permitted Solana program IDs and instruction variants. 4. Reject unrelated writable accounts, additional signers, unexpected transfers, account closures, authority changes, and token approvals. 5. Enforce explicit upper limits for network fees, service fees, SOL transfers, and token transfers. 6. Resolve and validate all address lookup tables referenced by versioned transactions. 7. Verify that returned mint, pool, and configuration accounts match the transaction instructions and API response. 8. Simulate the transaction and inspect expected SOL and token balance changes. 9. Present a human-readable transaction summary to the user and require explicit confirmation immediately before signing. 10. Prefer constructing the transaction locally from audited instructions rather than signing an opaque transaction supplied by a remote service. 11. Treat API response fields as untrusted and validate their schema, types, addresses, and relationship to the requested operation. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:79
Finding
Mutable Global Installation of an Unreviewed npm Package<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:79-87` **Vulnerability Type**: Unpinned third-party package installation and supply-chain exposure **Risk Level**: Medium ### Vulnerable Code ```markdown ## Installation (required before use) **You must install the hotfun CLI before using this skill.** Recommended (global): ```bash npm install -g @hot-fun/hot-fun-ai@latest ``` After installation, run commands with `hotfun <command> [args]`. If you use a local install instead, use `npx hotfun <command> [args]` from the project root. ``` The same installation guidance is reiterated later in the file: ```markdown - **Install**: `npm install -g @hot-fun/hot-fun-ai@latest`. Runtime: Node.js. Dependencies (including dotenv, @solana/web3.js, tsx) are declared in the package's `package.json`; global install installs them. ``` ### Technical Analysis The Skill requires users to install the mutable `@latest` release of `@hot-fun/hot-fun-ai` globally. The exact installed package version can therefore change after this Skill has been reviewed. The reviewed artifact does not include the npm package's `package.json`, lockfile, integrity hashes, CLI dispatcher, dependency tree, or lifecycle scripts. Consequently, the local `scripts/create-token.ts` file does not establish that the globally installed `hotfun` command executes the same reviewed implementation. npm packages can execute lifecycle scripts during installation. The installed CLI also runs in a process that is expected to receive `PRIVATE_KEY`. A compromised publisher account, malicious future release, or compromised transitive dependency could therefore introduce code with access to the user's environment and filesystem. This finding identifies an unsafe supply-chain practice. The audit did not establish that the current npm package is malicious. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, or a dependency used by `@hot-fun/hot-fun-ai`. 2. T ...[truncated 1144 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `@latest` with an exact, audited package version. 2. Commit a lockfile with verified dependency versions and integrity hashes. 3. Prefer a project-local installation over a global installation. 4. Publish the complete package source, CLI entry point, manifest, and lockfile for review. 5. Use npm provenance and verify package signatures, checksums, publisher identity, and release provenance. 6. Disable lifecycle scripts during installation where operationally feasible, then explicitly run only reviewed setup steps. 7. Use automated dependency scanning and monitor publisher and dependency changes. 8. Produce reproducible builds so the published package can be compared with the reviewed source. 9. Run the CLI with least privilege and expose only the environment variables required for the specific operation. 10. Require a new security review before updating the pinned package or dependency versions. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (16)

Credential Access

High
Category
Privilege Escalation
Content
**When not using OpenClaw (standalone)**
Set **PRIVATE_KEY** and optionally **SOLANA_RPC_URL** via the process environment:

- **.env file**: Put a `.env` file in **the directory where you run the `hotfun` command** (i.e. your project / working directory). The CLI automatically loads `.env` from that current working directory. Use lines like `PRIVATE_KEY=...` and `SOLANA_RPC_URL=...`. Do not commit `.env`; add it to `.gitignore`.
- **Shell export**: `export PRIVATE_KEY=your_base58_key` and optionally `export SOLANA_RPC_URL=https://api.mainnet-beta.solana.com`, then run `npx hotfun <command> ...`.

### Declared and optional environment variables
Confidence
84% confidence
Finding
The skill instructs users to place `PRIVATE_KEY` in a `.env` file in the working directory and states the CLI auto-loads `.env` from the current directory. That pattern materially increases secret exposure risk through accidental commits, overly broad filesystem access, malicious local project contents, or running the command from an unexpected directory, especially because the same secret authorizes blockchain transactions.

Lp1

High
Category
MCP Least Privilege
Confidence
98% confidence
Finding
The code has active network capability via fetch() and Solana RPC submission, yet this capability is reportedly not covered by declared permissions. In this skill, network access is especially sensitive because it retrieves an opaque transaction from a remote service and then broadcasts a signed transaction, so undeclared networking materially increases the risk of hidden fund movement or interaction with untrusted endpoints.

Lp1

High
Category
MCP Least Privilege
Confidence
98% confidence
Finding
The code has active network capability via fetch() and Solana RPC submission, yet this capability is reportedly not covered by declared permissions. In this skill, network access is especially sensitive because it retrieves an opaque transaction from a remote service and then broadcasts a signed transaction, so undeclared networking materially increases the risk of hidden fund movement or interaction with untrusted endpoints.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
The skill manifest itself references `Bash(npx hotfun *)` without any version pinning, which is the most security-relevant instance because it defines what the agent is allowed to execute. Since the skill also requests `PRIVATE_KEY`, this creates a high-risk combination of dynamic code fetching plus access to signing credentials.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
The manifest allows execution via `npx hotfun *`, which can fetch and execute whatever package version resolves at runtime instead of a reviewed, immutable artifact. In a skill that handles a Solana `PRIVATE_KEY` and performs on-chain signing, a compromised package, typosquat, or malicious newly published version could directly steal credentials or sign unauthorized transactions.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The installation guidance tells users to run `npx hotfun` as an alternative to a global install without pinning an exact package version. That exposes users to supply-chain risk because the executed code may differ over time and can access environment-provided secrets during token creation flows.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The standalone instructions explicitly pair `export PRIVATE_KEY=...` with `npx hotfun <command>`, creating a direct path where unpinned remotely resolved code runs in a secret-bearing environment. If an attacker controls the package resolution path or a future release, they can exfiltrate the key or misuse it for signing.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding
The execution section authorizes `hotfun <command>` or `npx hotfun <command>` and thereby normalizes an unpinned package execution route for a privileged CLI. In the context of blockchain signing, this significantly raises the consequence of supply-chain compromise from generic code execution to direct financial loss.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding
The execution section authorizes `hotfun <command>` or `npx hotfun <command>` and thereby normalizes an unpinned package execution route for a privileged CLI. In the context of blockchain signing, this significantly raises the consequence of supply-chain compromise from generic code execution to direct financial loss.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The document instructs an agent to deserialize, sign, and broadcast a remote API-supplied Solana transaction using the wallet private key, but it does not require independent validation of the transaction contents or explicit user consent before signing. This creates a real risk of unauthorized asset movement or other unintended on-chain actions if the API response is malicious, compromised, or tampered with.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The script deserializes a transaction obtained from a remote API, signs it with the user's private key, and submits it on-chain without any explicit confirmation or transaction inspection before the irreversible send step. In this skill context, that is particularly dangerous because the transaction payload is externally supplied and opaque to the user, so a compromised or malicious API could cause unintended token creation actions, transfers, or other wallet-authorized operations.

Scope Creep

Low
Category
Excessive Agency
Content
**User Agreement**

**Notice**: Before using this plugin and this skill (including but not limited to token creation), please read the following. **By choosing to continue using this plugin and this skill, you have read, understood, and agreed to this agreement.**

**Plugin nature and limitation of liability**: This plugin provides local-only CLI interaction (private key is used via environment or local config). It **does not collect, upload, or store your private key**. The plugin and its providers **are not liable** for private key disclosure or asset loss due to any cause (including but not limited to tampered plugin, compromised environment, user error, or third-party plugins).
Confidence
70% confidence
Finding
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Scope Creep

Low
Category
Excessive Agency
Content
**User Agreement**

**Notice**: Before using this plugin and this skill (including but not limited to token creation), please read the following. **By choosing to continue using this plugin and this skill, you have read, understood, and agreed to this agreement.**

**Plugin nature and limitation of liability**: This plugin provides local-only CLI interaction (private key is used via environment or local config). It **does not collect, upload, or store your private key**. The plugin and its providers **are not liable** for private key disclosure or asset loss due to any cause (including but not limited to tampered plugin, compromised environment, user error, or third-party plugins).
Confidence
70% confidence
Finding
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/create-token.ts:75