T07 · Tool Hijacking and Spoofing
- Location
colony-cli.mjs:379- Finding
Blind Signing of Remotely Supplied Jupiter Transactions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is purpose-aligned for a Solana game bot, but it can autonomously spend real crypto and exposes wallet/signing risks that users need to review carefully.
Install only with a dedicated low-balance Solana wallet, assume transactions are irreversible, avoid unattended swaps or spending without an external approval process, treat generated private-key output as sensitive, and review the Colony program authority model before funding the wallet.
colony-cli.mjs:379Blind Signing of Remotely Supplied Jupiter Transactions
colony-cli.mjs:1153Wallet Private Key Exposed Through Plaintext JSON Output
colony-cli.mjs:981Documented Swap Spending Controls Are Not Enforced by the CLI
idl.json:787Undisclosed Centralized Treasury Withdrawal and Mutable Token-Mint Controls
The CLI loads SOLANA_PRIVATE_KEY from the environment and can immediately perform asset-moving operations such as swaps, token burns for land purchases, upgrades, and claims without any runtime confirmation, policy check, amount cap, or human approval step. In an autonomous agent setting, this makes accidental or malicious invocation highly dangerous because a single command can irreversibly spend funds or sign third-party supplied transactions.
The command output includes privateKey: secretKeyBase58 with only a mild instructional note, not a strong execution-time warning or safeguards. Exposed private keys can be copied by logs, terminal history, agent transcripts, or monitoring systems, enabling full theft of any funds later sent to that wallet.
The program includes explicit owner-only withdraw_sol and withdraw_tokens instructions, allowing the authority to drain the SOL vault and SPL token vault. Given the skill claims autonomous gameplay and token earning/claiming, this means deposited or accrued value can be exfiltrated by the owner at any time, making the treasury custodial and enabling a straightforward rug pull.
The lockfile includes bigint-buffer 1.1.5, which is flagged for a buffer overflow in toBigIntLE(). Even though this is a transitive dependency used in Solana serialization tooling, malformed or attacker-controlled binary data could trigger memory-safety issues or process instability when parsing on-chain/network data.
The lockfile includes ws 8.19.0, which is reported as vulnerable to uninitialized memory disclosure and memory-exhaustion DoS. This matters in a networked Solana skill because websocket connections are commonly used for RPC subscriptions, so a malicious or compromised endpoint could potentially leak memory contents or exhaust the agent process.
toml 3.0.0 is flagged for uncontrolled recursion and prototype pollution. Because Anchor depends on TOML parsing and skills often consume config-like data, parsing attacker-controlled TOML could corrupt Object.prototype or crash the process, which is especially concerning in an autonomous blockchain agent handling funds and external inputs.
The lockfile includes ws 7.5.10, which is reported vulnerable to memory-exhaustion DoS from fragmented websocket frames. This is relevant because the dependency tree includes JSON-RPC/websocket components, and an autonomous Solana agent may maintain persistent connections to external services that could be abused to degrade availability.
The README advertises autonomous buying, upgrading, claiming, and token swapping on Solana without a clear risk disclosure that these actions spend real assets, can burn tokens, and may incur irreversible financial loss. Because the skill is specifically designed for unattended execution and strategy optimization, the absence of prominent warnings makes misuse and accidental loss more likely.
The README instructs users to place a Solana private key in an environment variable but gives no warning about key-handling risks, least-privilege usage, secret storage, or operational safeguards. In a skill that can autonomously execute on-chain actions, this increases the chance of wallet compromise or accidental exposure through shell history, process inspection, logs, CI systems, or misconfigured hosting environments.
The skill requires access to sensitive environment variables and external networked services, including a private key and RPC/Jupiter endpoints, but does not declare any explicit tool or permission scope. That creates a governance gap: an agent or platform may grant broader capabilities than the user realizes, increasing the chance of unintended secret exposure or unauthorized on-chain actions.
The skill describes the agent as an autonomous manager of a Solana game account and later defines an autonomous loop that includes claiming, swapping, buying, and upgrading assets without requiring per-action approval or bounded delegation. Because these are real on-chain transactions involving private keys and token value, unrestricted autonomy materially increases the risk of unintended spending, excessive trading, and repeated loss-causing actions.
The onboarding flow explicitly instructs the agent to ask the owner to fund a generated wallet with real SOL, but it does not present a clear risk disclosure or require an explicit confirmation checkpoint for a real-money transfer. In a crypto context this is especially risky because funds sent to the wrong address, a maliciously substituted address, or an untrusted strategy are typically irreversible.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
async function jupiterQuote(solAmount) {
requireJupiterKey();
const lamports = Math.round(solAmount * 1_000_000_000);
const url = `https://api.jup.ag/swap/v1/quote?inputMint=${SOL_MINT}&outputMint=${GAME_TOKEN_MINT}&amount=${lamports}&slippageBps=100`;
const resp = await fetch(url, { headers: jupiterHeaders() });
if (!resp.ok) {
throw new Error(`Jupiter quote failed: ${resp.status} ${await resp.text()}`);
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
async function jupiterQuote(solAmount) {
requireJupiterKey();
const lamports = Math.round(solAmount * 1_000_000_000);
const url = `https://api.jup.ag/swap/v1/quote?inputMint=${SOL_MINT}&outputMint=${GAME_TOKEN_MINT}&amount=${lamports}&slippageBps=100`;
const resp = await fetch(url, { headers: jupiterHeaders() });
if (!resp.ok) {
throw new Error(`Jupiter quote failed: ${resp.status} ${await resp.text()}`);
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
async function jupiterQuote(solAmount) {
requireJupiterKey();
const lamports = Math.round(solAmount * 1_000_000_000);
const url = `https://api.jup.ag/swap/v1/quote?inputMint=${SOL_MINT}&outputMint=${GAME_TOKEN_MINT}&amount=${lamports}&slippageBps=100`;
const resp = await fetch(url, { headers: jupiterHeaders() });
if (!resp.ok) {
throw new Error(`Jupiter quote failed: ${resp.status} ${await resp.text()}`);
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
async function jupiterQuote(solAmount) {
requireJupiterKey();
const lamports = Math.round(solAmount * 1_000_000_000);
const url = `https://api.jup.ag/swap/v1/quote?inputMint=${SOL_MINT}&outputMint=${GAME_TOKEN_MINT}&amount=${lamports}&slippageBps=100`;
const resp = await fetch(url, { headers: jupiterHeaders() });
if (!resp.ok) {
throw new Error(`Jupiter quote failed: ${resp.status} ${await resp.text()}`);
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
requireJupiterKey();
const quote = await jupiterQuote(solAmount);
const swapResp = await fetch("https://api.jup.ag/swap/v1/swap", {
method: "POST",
headers: jupiterHeaders(),
body: JSON.stringify({
The generate-wallet command creates a new Solana keypair and prints the private key directly to stdout in JSON. In an agent/tooling context, stdout is commonly captured in logs, traces, chat history, or orchestration systems, so this exposes secret material far beyond the intended recipient. This capability is not necessary for routine gameplay and expands the skill from game interaction into unsafe wallet management.
The IDL exposes multiple privileged instructions unrelated to ordinary gameplay, including withdrawing SOL/tokens, changing the token mint, pausing the game, and closing user/land accounts. In the context of an autonomous gameplay skill, these capabilities materially expand what the agent could invoke and create a clear rug-pull/admin-abuse path where user assets, rewards, or state can be seized or invalidated by the program authority.
The file begins by presenting the program as a normal game IDL, while destructive admin operations later allow closing land accounts, user profiles, and the token vault. Without prominent warnings about irreversible state deletion and authority seizure powers, users and integrators may treat the skill as ordinary gameplay automation and unknowingly interact with a system where the admin can destroy or reset critical state.
stream-json 1.9.1 is flagged for O(depth²) behavior on deeply nested input, which can enable denial of service via CPU amplification. In this package-lock context it is a transitive dependency and likely not a primary code path for the gameplay skill, so the risk is real but comparatively limited unless untrusted nested JSON is processed.
uuid 8.3.2 is reported to lack bounds checks in some hash-based UUID functions when a buffer argument is supplied. This is a genuine dependency risk, but its exploitability here appears limited because it requires specific API usage and this lockfile alone does not show the skill invoking the affected code paths on attacker-controlled inputs.
The dependency is version-ranged with a caret, so installs may pull newer minor or patch releases than originally tested. In a wallet/game automation skill that signs Solana transactions, unexpected upstream changes or a compromised release could affect transaction construction or key-handling behavior and increase supply-chain risk.
"private": true,
"type": "module",
"dependencies": {
"@coral-xyz/anchor": "^0.32.1",
"@solana/web3.js": "^1.98.0",
"@solana/spl-token": "^0.4.9",
"bs58": "^6.0.0"
Using a caret range for @solana/web3.js allows non-identical builds over time, which is risky for software that interacts with blockchain accounts and submits signed transactions. If a later compatible-seeming release introduces a regression or malicious code through the supply chain, the skill could behave differently than audited.
"type": "module",
"dependencies": {
"@coral-xyz/anchor": "^0.32.1",
"@solana/web3.js": "^1.98.0",
"@solana/spl-token": "^0.4.9",
"bs58": "^6.0.0"
}
The caret version on @solana/spl-token means the resolved package may drift from the reviewed version, which can impact token transfer, account, or mint operations. In this skill's Solana token-management context, dependency drift increases the chance of transaction errors or exploitation through a compromised package release.
"dependencies": {
"@coral-xyz/anchor": "^0.32.1",
"@solana/web3.js": "^1.98.0",
"@solana/spl-token": "^0.4.9",
"bs58": "^6.0.0"
}
}
Detected: suspicious.env_credential_access