Back to skill

Security audit

aiusd-core

Security checks for vulnerabilities and agentic risk

Overview

This AIUSD trading skill matches its stated purpose, but it gives a dynamically downloaded npm CLI broad control over wallet, authentication, trading, withdrawal, and automation workflows without enough version pinning or user-confirmation guardrails.

Install only if you trust the `aiusd-core` npm supply chain and are comfortable letting it handle real funds. Prefer a reviewed, pinned, locally installed version; verify login URLs and domains; never expose mnemonic contents in chat; use limited balances; and require fresh confirmation for every withdrawal, stake, trade, leveraged position, or auto-buy rule.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (1)

T08 · Insecure Dependencies

Error
Location
SKILL.md:18
Finding
Unpinned npm Package Is Downloaded and Executed for Financial Operations<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 18–23 and 65–89 **Vulnerability Type**: Unpinned remote dependency execution **Risk Level**: High ### Complete Code Snippet ```markdown ## CLI entry point All commands in this skill use `npx -y aiusd-core` as the CLI prefix. This works without any global installation — npx resolves the package from npm automatically. If `aiusd-core` is already in PATH (via `npm install -g aiusd-core`), you may use `aiusd-core` directly instead. **NEVER use `dist/cli.js` — it is a library module, not an entry point.** ``` The same remotely resolved package is also trusted to provide mutable operating instructions: ```markdown ## Capabilities Before executing commands in a domain, run `npx -y aiusd-core guide <domain>` to get the latest commands, parameters, and workflows. Follow the guide exactly. ``` The Skill further directs the Agent to act on instructions returned by that package: ```markdown ### Always guide before operate Do not guess command syntax or parameters from memory. Before executing commands in any domain, run `npx -y aiusd-core guide <domain>` to get the current reference. Guides may change between CLI versions. ### Asset names can be ambiguous The same asset symbol may exist on multiple venues. When the user's intent is ambiguous, ask which venue before executing. If the user has a clear preference from context (e.g., "buy SOL" implies Solana), proceed without asking. ### Follow `next_steps`, don't re-confirm When a command returns `action_required` with `next_steps`, execute those steps directly. The user has already confirmed the intent — do not ask again unless the next step involves a different action than what was originally requested. ``` ### Technical Analysis The command `npx -y aiusd-core` resolves and executes the npm package without specifying an exact version. The project contains no lockfile, package integrity hash, vendored executable source, or other mechanis ...[truncated 3342 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Pin an exact reviewed version** - Replace unversioned execution with an exact immutable version, such as `npx --yes aiusd-core@1.0.1`, after independently reviewing that release. - Do not use version ranges or distribution tags such as `latest`. 2. **Verify package integrity** - Maintain a lockfile containing the expected resolved version and integrity hash. - Verify the downloaded package checksum or npm integrity metadata before execution. - Fail closed if the version or integrity value differs from the approved value. 3. **Vendor and review security-sensitive code** - Prefer bundling a reviewed copy of the executable source with the Skill. - Make the reviewed local entry point the default rather than downloading executable code during each invocation. - Subject every dependency update to source review, malware scanning, and reproducible-build verification. 4. **Reduce installation-time execution risk** - Disable npm lifecycle scripts where compatible, for example through an audited installation process using `--ignore-scripts`. - Install dependencies in a controlled build stage rather than dynamically during financial operations. 5. **Sandbox the CLI** - Execute it as a dedicated, unprivileged operating-system identity. - Restrict filesystem access to the minimum required configuration directory. - Limit environment variables and prevent access to unrelated credentials. - Apply outbound network restrictions so the process can contact only explicitly approved endpoints. 6. **Constrain remote instructions** - Treat `guide` and `next_steps` output as untrusted data. - Validate generated commands against a local allowlist of approved commands, options, networks, and parameter types. - Reject shell metacharacters, unexpected executables, arbitrary file access, and instructions outside the requested domain. 7. **Require confirmation at financial boundaries** - Require ...[truncated 705 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (32)

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding
The skill repeatedly instructs the agent to execute `npx -y aiusd-core` without pinning an exact package version. Because `npx` fetches the latest package from npm at runtime, a malicious package update, account compromise, or dependency hijack could cause arbitrary code execution in the agent environment and directly affect wallet, auth, and trading workflows.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding
The skill repeatedly instructs the agent to execute `npx -y aiusd-core` without pinning an exact package version. Because `npx` fetches the latest package from npm at runtime, a malicious package update, account compromise, or dependency hijack could cause arbitrary code execution in the agent environment and directly affect wallet, auth, and trading workflows.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The skill includes wallet creation, browser auth, session polling, and mnemonic restore instructions, but does not include strong warnings about secret handling, phishing risks, irreversible transactions, or the sensitivity of backup material. In a financial skill, omission of these safety constraints makes accidental credential exposure or unsafe fund operations more likely.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding
This login command uses unpinned `npx` to fetch and execute a package that creates wallets and authenticates sessions. In a financial/account-management skill, runtime resolution of mutable remote code is especially dangerous because compromise could steal credentials, wallet material, or execute unauthorized trades.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding
The browser login flow begins by executing unpinned remote code via `npx`, allowing the fetched package to control the generated login URL and session bootstrap process. If the package or supply chain is compromised, users could be redirected to phishing infrastructure or session tokens could be exfiltrated.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding
Polling a browser-login session via unpinned `npx` executes mutable remote code during an authentication completion step. A compromised package could harvest session identifiers, tokens, or falsely report success while persisting malicious state.

Rp1

Medium
Category
MCP Rug Pull
Confidence
99% confidence
Finding
The restore command runs unpinned code in a context explicitly handling mnemonic backup material. That combination is particularly sensitive because any compromise could immediately expose seed data, restore to attacker-controlled destinations, or drain funds.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding
The fallback interactive login also uses unpinned `npx`, so the same supply-chain execution risk applies even when no special flags are provided. Because this touches authentication state, the risk remains material.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
Logout is lower risk than wallet creation or restoration, but it still executes unpinned remote code in an authenticated environment. A malicious package could abuse existing tokens or alter local auth state before removal.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding
Account-switching instructions again rely on unpinned `npx` for logout/login, exposing a full auth transition to supply-chain compromise. This creates an opportunity for credential theft or account substitution during a sensitive workflow.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding
The alternate account-switch command also uses unpinned runtime package resolution during wallet creation. In context, this can directly affect account ownership and custody of funds if the fetched code is malicious.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding
The skill instructs the agent to run `guide` commands via unpinned `npx` before any domain action. Because the guide output is then treated as authoritative for trading, withdrawals, and staking, compromised remote code could manipulate subsequent behavior across the whole skill.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding
Even the fallback guide invocation uses unpinned remote package execution, which can seed malicious instructions for later operations. The danger is amplified because the skill tells agents to 'follow the guide exactly.'

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding
The second instance on the same line carries the same supply-chain risk: a mutable package is executed to control workflow in a high-value financial environment. Repetition increases exposure because agents are more likely to normalize unsafe execution patterns.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding
The generic `guide <domain>` instruction is central to the skill and uses unpinned live package execution. Because all major capabilities depend on this step, a compromised package could systematically influence all subsequent fund-moving operations.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The account domain guide covers balances, staking, withdrawals, and gas top-up, yet it is invoked through unpinned `npx`. This creates a direct path from supply-chain compromise to fund movement or disclosure of account details.

Vague Triggers

Medium
Confidence
91% confidence
Finding
Trigger phrases such as 'trade', 'market data', 'trending', or 'how much do I have' are broad enough to overlap with ordinary discussion and can cause unintended invocation of a fund-capable skill. In context, accidental activation is more dangerous because the skill supports trading, withdrawals, staking, and automation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The spot trading guide is fetched and executed via unpinned `npx`, enabling remote code to shape buy/sell/swap behavior. In a trading context, that could lead to unauthorized venues, manipulated parameters, or direct financial loss.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The perpetual futures guide introduces leverage-related workflows through unpinned remote code execution. Because leveraged trading can amplify losses quickly, any malicious guidance or code is especially dangerous.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The HyperLiquid spot guide also uses the same unsafe pattern of unpinned `npx` execution. Although domain-specific, it still governs financial actions and could redirect or alter trades.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The prediction-market guide is fetched from a mutable package at runtime. This can lead to manipulated market instructions, bad orders, or phishing-like redirections in a money-moving context.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The monitor domain can set conditional auto-buy rules, but its guidance is pulled via unpinned `npx`. That combination is risky because compromised code could establish persistent or hidden automated trading behavior.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The market data guide is also unpinned, and while informational, it can influence downstream trading decisions. Tainted market guidance could mislead the agent into unsafe or manipulated actions.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The fallback statement about `guide` being unreachable still centers the unpinned command as normal operation. This normalizes live execution of mutable npm code in a sensitive skill and increases chances of unsafe adoption.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The 'Always guide before operate' rule makes unpinned `npx` execution a prerequisite for every domain action. This magnifies the supply-chain risk from isolated command examples into a systemic control point for all financial operations in the skill.

Static analysis

No suspicious patterns detected.