Back to skill

Security audit

Multicall

Security checks for vulnerabilities and agentic risk

Overview

The skill claims to analyze blockchain multicalls, but it actually manages local stored entries and configuration, including a config-update weakness that can lead to local command execution.

Do not install this as a multicall or blockchain analysis skill. It should only be considered after its name and documentation are aligned with its actual local data-management behavior, persistence and deletion/export effects are clearly disclosed, and the sed-based config update is replaced with a non-interpreted safe write path. Avoid storing sensitive notes, keys, incident details, or protocol data in it.

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/script.sh:145
Finding

Arbitrary Command Execution Through Configuration Value Injection

Content
View full analysis
/dev/null; then sed -i "s|^${key}=.*|${key}=${val}|" "$cfg" else echo "${key}=${val}" >> "$cfg" fi ``` ### Technical Analysis The `cmd_config` function interpolates the user-controlled `key` and `val` arguments directly into a `sed` program. Shell quoting prevents immediate shell expansion of characters contained inside these arguments, but it does not prevent those characters from altering the syntax interpreted later by `sed`. An attacker can place the `|` delimiter in `val` to terminate the replacement expression and append GNU `sed` flags. In particular, GNU `sed` supports the `e` substitution flag, which passes the resulting pattern space to a shell for execution. For example, the value: ```text $(touch /tmp/pwn)|e;# ``` causes the script to construct a `sed` expression equivalent to: ```sed s|^theme=.*|theme=$(touch /tmp/pwn)|e;#| ``` When the target line matches, the `e` flag executes the substituted content through a shell. The command substitution therefore runs `touch /tmp/pwn`. Other shell commands could be substituted to read, modify, or delete files available to the invoking account. The vulnerable update branch requires the configuration file to exist and contain a line matching the supplied key. An attacker can satisfy this precondition through an initial ordinary configuration command. ### Attack Path 1. Invoke the configuration command with a benign value to create the configuration file and target key: ```bash scripts/script.sh config theme safe ``` 2. Invoke the same command with a crafted value that terminates the `sed` replacement and enables GNU `sed` command execution: ```bash scripts/script.sh config theme '$(touch /tmp/pwn)|e;#' ``` 3. The existing `theme` en ...[truncated 1310 chars]
Remediation
View remediation
&2 return 1 fi ``` 2. Replace the `sed`-based update with a configuration-writing implementation that treats keys and values exclusively as data. Avoid dynamically constructing code for `sed`, `awk`, shells, or similar interpreters. 3. Write updates to a securely created temporary file in the same directory and atomically rename it over the original file. Ensure cleanup occurs on errors or signals. 4. Reject or safely encode line breaks in values because the storage format is line-oriented. Clearly define whether characters such as carriage returns, newlines, and NUL bytes are supported. 5. Create the data directory and configuration file with restrictive permissions, such as directory mode `0700` and file mode `0600`, where appropriate. 6. Add regression tests covering: - The `|` delimiter and other punctuation. - GNU `sed` flags such as `e`. - Command substitutions such as `$(...)` and backticks. - Semicolons, backslashes, ampersands, and newlines. - Regular-expression metacharacters in keys. - Values beginning with dashes or containing shell syntax. Escaping only the current `sed` delimiter is insufficient unless every character meaningful in the regular expression, replacement, command separator, and flags sections is handled correctly. A non-interpreted data-processing implementation is strongly preferred. ]]>
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill presents itself as a blockchain multicall analysis tool, but the documented interface is actually a generic local CRUD/data-management utility with persistent storage under ~/.multicall. This mismatch is dangerous because users or calling agents may grant trust, invoke it under the wrong assumptions, and allow unintended local data creation, modification, export, or deletion.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Across the manifest and full documentation, the declared purpose is blockchain multicall analysis while the operational behavior centers on local entry management and config handling. This broad end-to-end mismatch undermines trust boundaries and can cause users or orchestration systems to invoke a file-writing skill in security-sensitive workflows expecting passive analysis only.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The command set describes status/add/list/search/remove/export/config operations typical of a local note or record manager, not a multicall-analysis tool. In an agent ecosystem, this kind of semantic deception increases the chance of inappropriate activation and can be used to smuggle data-handling behavior into contexts where only read-only blockchain analysis was expected.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The inline documentation advertises multicall/protocol-security analysis, but the actual code performs local record storage and retrieval. This deceptive framing increases the chance that sensitive prompts, notes, or analysis artifacts are provided to and silently retained by a tool that users believe serves a different purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill is materially misrepresented: it claims to analyze multicall operations, but the implementation is a local CRUD datastore for arbitrary user input. In an agent-skill context, this mismatch is dangerous because users and orchestrators may grant trust, invoke it with sensitive protocol-analysis data, or rely on expected blockchain-focused behavior while the script instead persists and manages local data.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The help text continues the false representation by presenting the tool as a multicall analyzer while exposing only local storage commands like add, list, remove, export, and config. In a skill ecosystem, misleading help text can trick users or agents into supplying sensitive or irrelevant data under false assumptions, leading to unintended data retention and misuse.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The description says to use the skill when you need to 'understand multicall mechanisms, evaluate protocol security, or reference on-chain concepts,' which is broad and could overlap with many general blockchain-analysis requests. The file does not provide explicit trigger phrases, scope constraints, or negative examples to clarify when this skill should and should not activate.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Local data-management features such as add, remove, export, and config are not justified by the stated multicall-analysis purpose. Unnecessary stateful capabilities enlarge the attack surface by introducing write/delete/exfiltration primitives that a simple analysis skill should not need.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation includes mutating commands like remove, export, and config changes without warning users that data may be written, deleted, or moved. This creates risk of unintended destructive actions or silent local data exposure, especially when invoked by an automated agent on behalf of a user.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

User-supplied entries are written persistently to a file under the home directory without any user-facing warning or consent flow. In the context of a misrepresented security-analysis skill, this is more dangerous because users may provide contract notes, API keys, incident details, or other sensitive material expecting analysis rather than long-term local storage.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The remove operation deletes a selected line immediately with no confirmation, preview, or backup. While not a code-execution issue, it can cause irreversible data loss, especially in an agent-assisted workflow where commands may be generated automatically or based on ambiguous user input.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The export command writes collected records into a new file without an explicit warning that potentially sensitive stored content is being copied into another location. This can broaden exposure by creating additional plaintext artifacts that may be shared, committed, or left behind unintentionally.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.