Back to skill

Security audit

Gasless

Security checks for vulnerabilities and agentic risk

Overview

This skill is advertised as gasless blockchain analysis, but the shipped script is a local record manager that writes, deletes, exports, and configures files.

Read this carefully before installing. Treat it as a local journal/config shell tool, not a gasless blockchain analysis skill. Do not run it with sensitive entries, elevated privileges, untrusted GASLESS_DIR values, or untrusted working directories, and assume export/config/remove commands mutate local files until the package is renamed, scoped, and hardened.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/script.sh:127
Finding

Sed Program Injection Through Configuration Values

Content
View full analysis
)"; fi elif [ -z "$val" ]; then grep "^${key}=" "$cfg" 2>/dev/null | cut -d= -f2- || echo "(not set)" else if [ -f "$cfg" ] && grep -q "^${key}=" "$cfg" 2>/dev/null; then sed -i "s|^${key}=.*|${key}=${val}|" "$cfg" else echo "${key}=${val}" >> "$cfg" fi echo "Set: $key=$val" fi } ``` ### Technical Analysis Both `key` and `val` originate from command-line arguments and are inserted directly into a sed program. They are not escaped for the selected `|` delimiter, regular-expression syntax, replacement syntax, command separators, or control characters. An attacker can place a sed delimiter and additional commands in an argument. GNU sed supports the `e` command, which executes a command using the system shell. Consequently, this is not limited to corrupting configuration data: a malicious value can terminate the intended substitution expression and inject an additional sed command. The key is also interpreted as a regular expression by both `grep` and `sed`. Even when command execution is not achieved, metacharacters can select or overwrite unintended configuration records. ### Attack Path 1. The attacker invokes the Skill in a context where they can supply arguments to `config`. 2. The attacker first creates a normal configuration record if one does not already exist: ```bash scripts/script.sh config safe initial ``` 3. The attacker invokes the update path ...[truncated 1071 chars]
Remediation
View remediation
&2 return 1 } ``` - Reject carriage returns, line feeds, NUL-equivalent input, and other control characters in values. - Replace the dynamic sed update with a parser that compares keys as literal strings and writes to a securely created temporary file. - Create the temporary file with `mktemp` inside a trusted directory, set restrictive permissions, and atomically rename it after a successful write. - If sed must be retained, escape regular-expression, replacement, delimiter, backslash, ampersand, and newline characters separately. Input validation should still be applied. - Add tests covering `|`, `&`, backslashes, newlines, regular-expression metacharacters, and sed command-injection payloads. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:7
Finding

Unsafe Predictable File Handling and Symbolic-Link Following

Content
View full analysis
> "$DATA_DIR/data.jsonl" } ``` Related predictable writes include: ```bash local cfg="$DATA_DIR/config.txt" ``` ```bash echo "${key}=${val}" >> "$cfg" ``` ```bash local out="gasless-export.$fmt" ``` ```bash json) cp "$DATA_DIR/data.jsonl" "$out" ;; ``` ```bash echo "timestamp,command,value" > "$out" ``` ### Technical Analysis `GASLESS_DIR` is entirely caller-controlled, and the script uses fixed file names such as `data.jsonl`, `config.txt`, `gasless-export.json`, and `gasless-export.csv`. Before opening these paths, it does not verify that: - The data directory is owned by the invoking user. - The directory is not a symbolic link. - Destination files are regular files rather than symbolic links or special files. - Existing files have safe ownership and permissions. - Export files are newly and exclusively created. Shell append and truncation redirections follow symbolic links. Copying to an existing symbolic-link destination can also write through to its target. Therefore, an attacker who can prepare files in the selected data directory or current working directory may redirect writes to another file accessible to the process. The severity is highly dependent on execution context. Under an ordinary user in a private directory, the scope is generally limited to that user's files. It becomes significantly more serious when the script runs with elevated privileges or from an attacker-writable working directory. ### Attack Path 1. The attacker identifies a privileged o ...[truncated 1386 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:10
Finding

Unescaped JSONL and CSV Data Injection

Content
View full analysis
> "$DATA_DIR/data.jsonl" } ``` The unsafe data is later exported without CSV quoting: ```bash csv) echo "timestamp,command,value" > "$out" while IFS= read -r line; do ts=$(echo "$line" | grep -o '"ts":"[^"]*' | cut -d'"' -f4) c2=$(echo "$line" | grep -o '"cmd":"[^"]*' | cut -d'"' -f4) vl=$(echo "$line" | grep -o '"val":"[^"]*' | cut -d'"' -f4) echo "$ts,$c2,$vl" >> "$out" done < "$DATA_DIR/data.jsonl" ;; ``` ### Technical Analysis User-controlled entry values are inserted into JSON text without escaping quotation marks, backslashes, carriage returns, newlines, or other JSON control characters. An input containing a quote can terminate the intended `val` string, while an input containing a newline can inject additional apparent JSONL records. The list, search, and export functions do not use a JSON parser. They extract fields using `grep` and `cut`, which cannot reliably process escaped JSON and may misinterpret attacker-crafted records. The CSV exporter also writes fields without RFC 4180 quoting. Commas, quotes, and line breaks can introduce extra columns or rows. Values beginning with spreadsheet formula markers such as `=`, `+`, `-`, or `@` may be interpreted as formulas when a user opens the exported file in spreadsheet software. ### Attack Path #### JSONL record injection 1. An attacker supplies an entry containing quotes or embedded line breaks: ```bash scripts/script.sh add '' ``` 2. `_save_entry` writes the input directly into `data.jsonl`. 3. The resulting ...[truncated 1301 chars]
Remediation
View remediation

other

Note
Location
SKILL.md:3
Finding

Skill Description Materially Misrepresents Implemented Functionality

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill claims to analyze gasless/blockchain operations, but the documented commands implement a generic local CRUD utility with persistent storage, deletion, export, and configuration changes. This mismatch is dangerous because an agent or user may invoke the skill under a benign analytical pretext while it performs filesystem-affecting actions unrelated to the declared purpose, increasing the risk of unintended data modification or exfiltration.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest and top-level description present a blockchain/gasless analysis capability, but the actual documented interface is a generic entry-management CLI. In an agent setting, this kind of semantic disguise can cause unsafe tool selection and trust elevation, leading the agent to execute local state-changing operations when it intended to perform read-only security analysis.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The 'When to Use' section frames the skill as suitable for gasless and protocol-security analysis, while the commands below are operational data-management actions such as add, remove, export, and config. This contradiction increases the chance that an autonomous system will invoke the skill in an inappropriate context and permit modifications or exports that were not expected from an analysis tool.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The header comment and branding state that the script analyzes gasless operations, but the code performs local entry logging and file management instead. In a skill ecosystem, deceptive inline documentation increases the risk of social engineering because reviewers and users may rely on metadata and comments to decide whether a tool is safe to run.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill advertises gasless-operation analysis but actually implements a generic local datastore with add/list/search/remove/export/config functions. This mismatch is dangerous because users may grant trust and execute the skill expecting blockchain analysis, while it instead persists arbitrary local data and manages files under the user's home directory, which is behavior outside the stated scope.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description says to use the skill whenever you need to 'understand gasless mechanisms, evaluate protocol security, or reference on-chain concepts,' which is a wide and ambiguous scope rather than a specific trigger. The file does not provide negative examples or clear boundaries for when the skill should not be invoked, increasing the risk of unintended activation for general blockchain questions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation advertises export and configuration-changing commands without warning about persistence, filesystem effects, or possible overwriting and data-leak consequences. In agent-driven environments, lack of impact disclosure can lead to silent writes or exports of local data to user-specified paths, making unintended modification or disclosure more likely.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The help text frames the tool as an analysis utility while the listed commands expose generic record-management operations unrelated to gasless security analysis. This is dangerous because misleading UX can trick users into providing sensitive notes or operational data to a tool that silently stores them on disk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The remove command deletes a line from the persistent data file with sed -i and immediately commits the change. Although it prints a message after deletion, there is no confirmation prompt or pre-action warning, and the help text does not warn that this command irreversibly modifies stored data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The export command creates or overwrites gasless-export.<fmt> in the current directory via shell redirection and cp. While completion is printed afterward, there is no prior notice, confirmation, or help-text warning that running the command will write local files containing stored entry data.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.