Back to skill

Security audit

Buzz BD

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its token-scanning purpose, but one adapter can pass user text into a shell command, creating a serious command-injection risk.

Review before installing. The basic scanner does not trade, move funds, or request wallet credentials, but it sends token lookups to DexScreener and currently includes an adapter path that could execute unintended shell commands from crafted token input. It should be fixed to use argument-separated subprocess calls and its capability claims should be narrowed or implemented before relying on it for business or investment decisions.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/eliza-adapter.mjs:27
Finding
OS Command Injection Through Agent-Controlled Token Input## Vulnerability Details **File Location**: `scripts/eliza-adapter.mjs`, lines 27–33 **Vulnerability Type**: OS command injection **Risk Level**: High ### Vulnerable Code ```js const { execSync } = await import('child_process'); const skillDir = new URL('.', import.meta.url).pathname; const result = execSync( `node ${skillDir}scripts/buzz-scan.mjs --token "${message.content.text}" --json`, { encoding: 'utf-8', timeout: 30000 } ); return { text: result }; ``` ### Technical Analysis The `BUZZ_TOKEN_INTELLIGENCE` action interpolates `message.content.text` directly into a command string passed to `child_process.execSync()`. `execSync()` executes the string through a system shell. Wrapping attacker-controlled input in double quotes does not make it safe: shell command substitutions such as `$(command)` and backtick substitutions remain active inside double-quoted strings. Shell metacharacters that interact with the surrounding command may likewise become exploitable depending on the supplied text and shell. Because action messages may originate from untrusted or indirectly attacker-controlled agent input, the token parameter crosses a trust boundary before reaching a command shell. There is no address-format validation, length restriction, escaping, or argument separation. The computed `skillDir` is also inserted without shell-safe argument separation. In addition, because `import.meta.url` already points to a file under `scripts/`, appending `scripts/buzz-scan.mjs` appears likely to produce a duplicated `scripts/scripts/` path. That path issue may impair functionality but does not mitigate the injection because shell substitutions occur while the shell evaluates the command. ### Attack Path 1. An attacker provides token-analysis text containing a shell substitution, such as a token-like value with `$(attacker_command)`. 2. The agent passes that text to `BUZZ_TOKEN_INTELLIGENCE.handler` as `message.content.text`. 3. The handler embeds the text in the co ...[truncated 1254 chars]
Remediation
## Remediation Suggestions Eliminate shell interpretation by using `execFileSync()` or `spawnSync()` with an argument array: ```js const { execFileSync } = await import('child_process'); const scriptPath = new URL('./buzz-scan.mjs', import.meta.url); const token = message.content.text; const result = execFileSync( process.execPath, [scriptPath.pathname, '--token', token, '--json'], { encoding: 'utf-8', timeout: 30000, shell: false } ); return { text: result }; ``` Apply defense in depth: 1. Validate that the input is a string and impose a strict length limit. 2. Require a supported chain to be selected explicitly. 3. Validate the token against the selected chain's address syntax: - Ethereum and BSC: a properly formed hexadecimal contract address. - Solana: a valid base58 public key of the expected decoded length. 4. Reject token names in this execution path unless they are resolved through a non-shell API flow. 5. Avoid manual shell escaping as the primary defense; pass every argument separately. 6. Run the adapter with a restricted operating-system account, minimal filesystem access, a constrained environment, and limited outbound network permissions. 7. Add regression tests containing command-substitution and shell-metacharacter payloads to confirm that they are treated only as literal arguments. 8. Correct the scanner path by resolving `./buzz-scan.mjs` relative to `import.meta.url`, rather than appending another `scripts/` directory.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The documented purpose is token discovery and scoring, but the detected behavior includes publishing to ClawHub, performing local repository checks, and scanning project files for secrets. That mismatch is dangerous because users may invoke a market-intelligence skill without realizing it can access local files and perform release-oriented actions, which expands trust boundaries and could expose sensitive repository content or trigger unintended publication workflows.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The handler builds a shell command with `message.content.text` interpolated directly into a string passed to `execSync`, which invokes a shell. An attacker can inject shell metacharacters or command substitutions through the message text and achieve arbitrary command execution on the host running the agent. In an autonomous agent skill, this is especially dangerous because chat input is a natural untrusted entrypoint.

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill metadata advertises external network use and shell-capable dependencies via `curl`, `node`, and `scripts/*`, but it does not declare an explicit tool scope such as allowed tools or permissions. That creates a least-privilege gap: an agent/runtime may grant broader execution or network access than users expect, increasing the chance of unintended command execution or outbound requests.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill metadata promises AIXBT and on-chain forensic analysis, but this code only pulls DexScreener data and scores it with local heuristics. That mismatch can mislead users into trusting outputs as enriched or independently verified intelligence when they are not, creating a supply-chain style integrity risk in security- or finance-adjacent automation.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The skill advertises verified contract addresses and outreach-ready business development briefs, but the code only displays token metrics, raw contract values from DexScreener, and links. In a crypto discovery context, users may rely on these claims to make contact, listing, or investment decisions based on unverified data, increasing fraud and impersonation risk.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
This action executes a local subprocess based on user-provided text without any disclosure, confirmation, or indication that local code will run. The lack of transparency is not the core issue by itself, but in combination with direct shell interpolation it increases the chance that users and integrators unknowingly expose the host to command execution and data access risks.

Missing User Warnings

Low
Confidence
91% confidence
Finding
The skill states it queries DexScreener but does not clearly warn that token names, contract addresses, and search patterns may be transmitted to a third-party service. In a crypto intelligence context, those queries can reveal trading or business-development interest, which may be sensitive even if no credentials are exposed.

Missing User Warnings

Low
Confidence
87% confidence
Finding
These handlers invoke `execSync` to run local scanning scripts, but the code provides no confirmation prompt or visible disclosure beyond internal descriptions that they will execute shell commands. Subprocess execution is a safety-relevant operation under the rule, and this file does not include explicit warning text for users.

Missing User Warnings

Low
Confidence
87% confidence
Finding
The momentum scan handler launches a child process via `execSync`, but there is no confirmation, warning, or other user-facing disclosure in this code about running a local command. This qualifies as missing disclosure for subprocess execution in a code file.