Back to skill

Security audit

Investing

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed investing helper, but one included budget script can execute unintended shell commands if given a crafted input.

Review before installing. The market-price script is ordinary public API polling, but do not run monthly-dca.sh with budget values from untrusted text or agent-generated input unless the script is fixed to accept only bounded numeric amounts. Treat all investing and tax content as general guidance, not personalized financial advice.

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
monthly-dca.sh:3
Finding
Arbitrary Command Execution Through Unvalidated Bash Arithmetic Input<![CDATA[ ## Vulnerability Details **File Location**: `monthly-dca.sh`, lines 3-12 **Vulnerability Type**: Bash arithmetic expression injection **Risk Level**: High ### Vulnerable Code ```bash BUDGET=${1:-500} # Default €500/month echo "💰 Monthly DCA Plan" echo "===================" echo "Budget: €$BUDGET" echo "" echo "Allocation:" echo "├── VWCE (70%): €$((BUDGET * 70 / 100))" echo "├── EIMI/IXUS (10%): €$((BUDGET * 10 / 100))" echo "├── BTC (10%): €$((BUDGET * 10 / 100))" echo "└── Cash buffer (10%): €$((BUDGET * 10 / 100))" ``` ### Technical Analysis The script accepts its first positional argument as `BUDGET` without checking that it is a decimal integer. It then references this variable inside four Bash arithmetic expansions. Bash recursively evaluates variable values as arithmetic expressions in arithmetic contexts. A malicious value containing an array-subscript expression can include command substitution, causing Bash to execute a command while resolving the arithmetic expression. Quoting the outer `echo` argument does not prevent this because the command execution occurs during arithmetic evaluation. Consequently, an attacker-controlled budget is not merely treated as financial data; it can be interpreted as executable Bash arithmetic syntax. ### Attack Path 1. An attacker supplies a crafted budget value or convinces a user or agent to invoke the script with that value. 2. The crafted value uses an arithmetic array-subscript expression containing command substitution, conceptually in the form: ```bash ./monthly-dca.sh 'x[$(ATTACKER_COMMAND)]' ``` 3. On line 9, Bash evaluates `BUDGET` while processing: ```bash $((BUDGET * 70 / 100)) ``` 4. Bash evaluates the embedded command substitution during arithmetic expression resolution. 5. The same unsafe variable is evaluated again on lines 10-12, so the injected command may execute multiple times. 6. The command runs with the operating-system identity, environment, fil ...[truncated 893 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Validate the argument before it reaches any arithmetic context. Accept only a bounded, non-negative decimal integer: ```bash #!/bin/bash set -euo pipefail BUDGET=${1:-500} if [[ ! $BUDGET =~ ^[0-9]+$ ]]; then printf 'Error: budget must be a non-negative whole number.\n' >&2 exit 1 fi if (( BUDGET > 100000000 )); then printf 'Error: budget exceeds the supported maximum.\n' >&2 exit 1 fi ``` Additional hardening measures: 1. Define an appropriate lower and upper bound based on the legitimate financial use case. 2. Reject signs, whitespace, decimal points, variable names, brackets, parentheses, and other arithmetic syntax. 3. Use a validated internal variable for all calculations rather than reusing raw input. 4. Add tests confirming rejection of array syntax, command substitutions, malformed numbers, negative values, and excessively large integers. 5. Consider performing calculations with a language or utility that parses input strictly as numeric data if decimal currency values must be supported. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill includes executable shell scripts and operational instructions to run them, but it does not declare any explicit tool scope or allowed tools. This creates an authorization and transparency gap: a host agent may expose shell execution more broadly than intended, and users cannot easily assess what capabilities the skill expects to use.

External Transmission

Medium
Category
Data Exfiltration
Content
echo "VWCE (All-World):  €$VWCE"

# Bitcoin
BTC=$(curl -s "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=eur" 2>/dev/null | jq -r '.bitcoin.eur // "N/A"')
echo "Bitcoin (BTC):     €$BTC"

# Ethereum
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
echo "VWCE (All-World):  €$VWCE"

# Bitcoin
BTC=$(curl -s "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=eur" 2>/dev/null | jq -r '.bitcoin.eur // "N/A"')
echo "Bitcoin (BTC):     €$BTC"

# Ethereum
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
echo "VWCE (All-World):  €$VWCE"

# Bitcoin
BTC=$(curl -s "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=eur" 2>/dev/null | jq -r '.bitcoin.eur // "N/A"')
echo "Bitcoin (BTC):     €$BTC"

# Ethereum
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The description states the skill is for 'Lithuanian investors,' which imposes a locale-specific constraint in the skill's natural-language behavior. The file does not indicate any user opt-in, language/locale selection, or justification as a region-locked compliance requirement.

Static analysis

No suspicious patterns detected.