Back to skill

Security audit

Vrf

Security checks for vulnerabilities and agentic risk

Overview

The skill claims to analyze VRF/blockchain security but actually provides a local record/config manager with persistent file writes, deletion/export, and a risky config update path.

Use Review caution. Do not install this as a VRF or blockchain-security analysis skill. Only consider it as a local data-management script after the publisher aligns the description with the real behavior and fixes the sed/serialization/path-safety issues; avoid storing secrets 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/script.sh:132
Finding

Arbitrary Command Execution Through Sed Program Injection

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 The `key` and `val` arguments are interpolated directly into a sed program: ```bash sed -i "s|^${key}=.*|${key}=${val}|" "$cfg" ``` Shell quoting prevents a direct shell metacharacter injection at the initial command-parsing stage, but it does not make the resulting sed program safe. An attacker can supply sed delimiters, newlines, regular-expression operators, replacement operators, or additional sed commands. On GNU sed, the `e` command and the `e` substitution flag execute commands through a shell. A value containing embedded newlines can terminate the intended substitution and introduce a separate `e` command. The final delimiter generated by the script can be neutralized as a sed comment. Exploitation requires the targeted configuration key to exist so that execution reaches the `sed -i` branch. The `key` is also interpreted as a regular expression in both `grep` and `sed`, allowing an attacker to select or overwrite unintended configuration records. ### Attack Path 1. The attacker causes the skill or an Agent to invoke `config` with attacker-controlled a ...[truncated 1465 chars]
Remediation
View remediation
&2 return 1 } ``` - Reject control characters and newline characters in configuration values if multiline values are not explicitly required. - Replace the sed update with a safely parameterized implementation using a language that performs exact string comparisons rather than regular-expression evaluation. - Write updates to a securely created temporary file in the same directory and atomically rename it over the original file. - Apply restrictive permissions to the temporary and final configuration files. - If sed must be retained, escape regular-expression and replacement syntax separately; however, a redesign that avoids executable sed source generation is strongly preferred. - Add regression tests covering delimiters, backslashes, ampersands, newlines, regex metacharacters, and GNU sed commands such as `e`. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:10
Finding

JSONL Record Injection Through Unescaped Entry Values

Content
View full analysis
> "$DATA_DIR/data.jsonl" } ``` The affected data is subsequently parsed using regular expressions, for example: ```bash tail -20 "$DATA_DIR/data.jsonl" | while IFS= read -r line; do local ts=$(echo "$line" | grep -o '"ts":"[^"]*' | cut -d'"' -f4) local cmd=$(echo "$line" | grep -o '"cmd":"[^"]*' | cut -d'"' -f4) local val=$(echo "$line" | grep -o '"val":"[^"]*' | cut -d'"' -f4) echo " [$ts] $cmd: $val" done ``` ### Technical Analysis `_save_entry` inserts `val` directly between JSON quotation marks. It does not escape: - Double quotation marks - Backslashes - Newline or carriage-return characters - Tabs and other JSON control characters Consequently, arbitrary user input is not safely serialized as a JSON string. A value containing a quote can terminate the intended field, while a newline can terminate the JSONL record and inject one or more additional physical lines. The later `list`, `search`, and `export` operations do not use a JSON parser. They extract fields with `grep` and `cut`, which cannot correctly distinguish escaped content, malformed records, or injected records. This compounds the integrity issue and can cause attacker-controlled content to be presented as legitimate stored data. ### Attack Path 1. The attacker supplies a crafted argument to the `add` command. 2. The argument contains JSON syntax and one or more newline characters. 3. `_save_entry` writes the argument directly into `data.jsonl`. 4. The injected newline creates additional apparent JSONL records or corrupts the original record. 5. `list`, `search`, `stats`, `remove`, or `exp ...[truncated 935 chars]
Remediation
View remediation
> "$DATA_DIR/data.jsonl" ``` - Parse stored records with a JSON-aware parser instead of `grep` and `cut`. - Reject malformed existing records and report corruption instead of silently processing them. - Consider applying a maximum length to entry values to prevent excessive storage consumption. - Add tests for quotes, backslashes, Unicode, tabs, carriage returns, and embedded newlines. - Where existing installations may already contain malformed data, provide a validation or migration utility before relying on the records. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:6
Finding

Unsafe Data-Directory Permissions and Symbolic-Link Following

Content
View full analysis
> "$DATA_DIR/data.jsonl" } ``` Configuration data is created similarly: ```bash local cfg="$DATA_DIR/config.txt" ... echo "${key}=${val}" >> "$cfg" ``` ### Technical Analysis The script accepts `VRF_DIR` as an unrestricted storage location and creates the directory using the caller's current umask. It does not explicitly set a restrictive umask, verify ownership, reject symbolic links, or ensure that `data.jsonl` and `config.txt` are regular files owned by the invoking user. The append redirections follow symbolic links. If an attacker can control or prepopulate the selected data directory, a malicious `data.jsonl` or `config.txt` symbolic link can redirect append operations to another file writable by the victim account. File confidentiality also depends entirely on the environment's umask. Under a permissive umask, stored entries and configuration values may be readable by other local users. ### Attack Path 1. The attacker controls or can influence `VRF_DIR`, or the attacker can write inside a shared directory selected as `VRF_DIR`. 2. The attacker creates `data.jsonl` or `config.txt` as a symbolic link to another file writable by the victim. 3. The victim or Agent invokes `add` or invokes `config` on a new key. 4. Shell append redirection follows the symbolic link. 5. Attacker-influenced content is appended to the linked target file. Alternatively, if no symbolic link is involved but the caller has a permissive umask, another local user may read newly created data or configurat ...[truncated 561 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as a VRF/blockchain analysis utility, but the documented behavior is a generic local CRUD/export tool with persistent storage under ~/.vrf. This mismatch is dangerous because users or higher-level agents may invoke it expecting security analysis while it actually performs unrelated filesystem operations, creating a risk of unintended data manipulation, misleading outputs, and trust-boundary violations.

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 documentation claim VRF/blockchain analysis, but every exposed command maps to generic record management actions such as add, list, search, remove, export, and config. In an agent ecosystem, this kind of semantic deception can cause unsafe tool selection and execution, especially when another component relies on the declared purpose to decide whether filesystem-affecting behavior is appropriate.

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 explicitly claims VRF-analysis functionality that the code does not perform. In a skill ecosystem, deceptive documentation is security-relevant because it can cause operators or agents to invoke the tool in sensitive workflows, trusting outputs and data handling that are unrelated to the advertised 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 presented as a VRF-analysis tool, but the implementation is an unrelated local note/config manager with add/list/search/remove/export functionality. This kind of capability mismatch is dangerous because it can mislead users and orchestrators into granting trust or supplying sensitive inputs under false pretenses, while the script silently persists and manages arbitrary user data on disk.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The help text reinforces the false claim of VRF analysis while exposing commands for local data storage, search, deletion, export, and configuration. This increases the likelihood of social-engineering-style misuse: a user expecting analysis may instead provide sensitive material that gets written to disk and later exported or searched.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation says the skill analyzes VRF operations, but the enumerated commands describe a local stateful database-style utility instead. Internal contradiction increases the chance that users or agents misunderstand side effects, rely on incorrect assumptions, or supply sensitive data to a tool that is not performing the expected analysis task.

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 remove and export capabilities, along with configurable storage paths, without warning about data deletion, overwriting, or file disclosure risks. Even without code execution shown here, the absence of operator-facing safety guidance makes accidental destructive use or unintended data exposure more likely in automated or semi-automated workflows.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

Configuration values are written to a persistent file without any explicit warning, confirmation, or sensitivity guidance. In this skill context, the mismatch between advertised analysis behavior and actual local storage makes silent persistence more dangerous because users may not realize operational data, tokens, or other secrets could be retained on disk.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.