Back to skill

Security audit

Massive Financial Connector

Security checks for vulnerabilities and agentic risk

Overview

This market-data skill is purpose-aligned, but it runs unpinned remote MCP code and handles the API key in riskier-than-necessary ways.

Install only if you are comfortable giving this skill access to a Massive API key and running the Massive MCP server from GitHub at launch time. Prefer a version pinned to an immutable commit or verified package, remove ~/.zshrc sourcing, and avoid URL-query API keys before using it in a sensitive environment.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/get-last-trade.sh:18
Finding
API Credential Exposed Through Command-Line URLs<![CDATA[ ## Vulnerability Details **File Location**: `scripts/get-last-trade.sh:18`, `scripts/get-prev-close.sh:18`, and `scripts/get-agg-day.sh:19` **Vulnerability Type**: API credential disclosure through process arguments and URL query strings **Risk Level**: Medium ### Vulnerable Code `scripts/get-last-trade.sh:18`: ```bash RESP=$(curl -sS "https://api.massive.com/v2/last/trade/${SYMBOL}?apiKey=${KEY}") ``` `scripts/get-prev-close.sh:18`: ```bash RESP=$(curl -sS "https://api.massive.com/v2/aggs/ticker/${SYMBOL}/prev?adjusted=true&apiKey=${KEY}") ``` `scripts/get-agg-day.sh:19`: ```bash RESP=$(curl -sS "https://api.massive.com/v2/aggs/ticker/${SYMBOL}/range/1/day/${DAY}/${DAY}?adjusted=true&sort=asc&limit=5000&apiKey=${KEY}") ``` ### Technical Analysis All three scripts interpolate `MASSIVE_API_KEY` directly into a URL passed as a command-line argument to `curl`. Although HTTPS protects the URL while it is transmitted over the network, it does not prevent local exposure before transmission. While `curl` is running, the full URL may be observable through process inspection interfaces or endpoint-monitoring products. Query strings may also be retained by debugging tools, proxies, URL telemetry, shell tracing, or error-reporting systems. The scripts do not deliberately print the key, but placing it in the URL expands the number of locations in which it can be exposed. ### Attack Path 1. A user invokes one of the market-data scripts with a valid `MASSIVE_API_KEY`. 2. The script expands the key into the URL supplied to `curl`. 3. A local user, monitoring agent, or process-inspection mechanism captures the `curl` command line while it is executing, or an intermediary records the URL. 4. The observer extracts the `apiKey` query parameter. 5. The exposed credential is reused to access the Massive API until it is revoked or expires. ### Impact Assessment An attacker obtaining the key could make API requests under the victim's Massive account, consume su ...[truncated 272 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Use Massive's supported authorization-header mechanism instead of placing the credential in the URL query string. 2. Ensure the secret-bearing header is not itself exposed as a process argument. Supply sensitive curl configuration through standard input or another protected mechanism rather than directly using a secret-expanded `-H` argument. 3. Disable verbose shell tracing around credential handling and ensure application, proxy, and diagnostic logs redact authorization information. 4. Keep `MASSIVE_API_KEY` in the process environment only for the minimum required duration. 5. Rotate the existing API key if process telemetry, proxy logs, or diagnostics may already have captured these URLs. 6. Apply restrictive permissions to any dedicated credential file if one is introduced, and never commit it to source control. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/start-mcp-server.sh:4
Finding
Unnecessary Execution of User Shell Startup Configuration<![CDATA[ ## Vulnerability Details **File Location**: `scripts/start-mcp-server.sh:4`, `scripts/get-last-trade.sh:9`, `scripts/get-prev-close.sh:9`, and `scripts/get-agg-day.sh:10` **Vulnerability Type**: Execution of unrelated local startup commands **Risk Level**: Low ### Vulnerable Code `scripts/start-mcp-server.sh:4`: ```bash source "$HOME/.zshrc" >/dev/null 2>&1 || true ``` `scripts/get-last-trade.sh:9` and `scripts/get-prev-close.sh:9`: ```bash source "$HOME/.zshrc" >/dev/null 2>&1 || true ``` `scripts/get-agg-day.sh:10`: ```bash source "$HOME/.zshrc" >/dev/null 2>&1 || true ``` The startup-file execution is followed by credential retrieval such as: ```bash KEY="${MASSIVE_API_KEY:-}" KEY="${KEY#\"}"; KEY="${KEY%\"}"; KEY="${KEY#\'}"; KEY="${KEY%\'}" ``` ### Technical Analysis A shell startup file is executable shell code and can contain aliases, command substitutions, network operations, environment mutations, or arbitrary program invocations. These scripts source `$HOME/.zshrc` even though their documented requirement is only that `MASSIVE_API_KEY` be available in the environment. This unnecessarily expands the scripts' trust boundary to all code contained in `.zshrc`. Redirecting output and appending `|| true` does not make execution safe; it merely hides output and suppresses startup-file failures, making unexpected behavior harder to diagnose. This does not establish a new privilege boundary because `.zshrc` ordinarily belongs to the invoking user. However, if that file has already been modified by another process, shared configuration, or an attacker with write access, invoking any affected script triggers the inserted commands. ### Attack Path 1. An attacker or compromised local component obtains the ability to modify the invoking user's `.zshrc`. 2. The attacker inserts a command into the file, such as launching another executable or copying environment variables. 3. The user invokes any affected script. 4. The script sources `.zshrc` ...[truncated 677 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the following statement from every script: ```bash source "$HOME/.zshrc" >/dev/null 2>&1 || true ``` 2. Require callers to export `MASSIVE_API_KEY` before invoking the scripts, as already stated in `SKILL.md`. 3. If file-based configuration is necessary, use a dedicated configuration file containing only data rather than executable shell syntax. 4. Validate the dedicated file's ownership and permissions before reading it; reject files writable by unauthorized users. 5. Do not silently suppress configuration errors. Return a clear error without exposing the credential. 6. Run the scripts with the minimum user privileges required for market-data access. ]]>

T03 · Remote Payload Retrieval and Execution

Warning
Location
scripts/start-mcp-server.sh:14
Finding
Runtime Retrieval and Execution of Code Referenced by a Mutable Git Tag<![CDATA[ ## Vulnerability Details **File Location**: `scripts/start-mcp-server.sh:14` **Vulnerability Type**: Remote payload retrieval and execution without immutable content verification **Risk Level**: Medium ### Vulnerable Code ```bash export MASSIVE_API_KEY="$KEY" exec "$HOME/.local/bin/uvx" --from git+https://github.com/massive-com/mcp_massive@v0.4.0 mcp_polygon ``` ### Technical Analysis The startup script directs `uvx` to obtain Python code from a remote Git repository and execute the `mcp_polygon` entry point. The referenced repository is associated with the declared service provider and the reference includes a version tag. However, a Git tag is not necessarily an immutable content identity and the script does not verify a commit hash, signed release, lockfile, or artifact digest. Consequently, the code that executes can differ from the code reviewed with this Skill if the upstream repository, maintainer account, dependency resolution process, or referenced tag is compromised or changed. The remote process also inherits the exported `MASSIVE_API_KEY`. ### Attack Path 1. An attacker compromises the upstream repository, a maintainer account, or the dependency-delivery path. 2. The attacker changes or recreates the `v0.4.0` tag, or otherwise causes dependency resolution to return altered content. 3. A user runs `scripts/start-mcp-server.sh`. 4. `uvx` retrieves the remotely referenced project and resolves its dependencies. 5. The altered package or one of its installation or runtime components executes locally. 6. The payload runs with the invoking user's privileges and can access the exported `MASSIVE_API_KEY` and other resources available to that user. ### Impact Assessment A compromised remote payload could execute arbitrary code with the privileges of the user launching the MCP server. It could read accessible files, access inherited credentials, make network requests, alter user-owned data, and impersonate the legitimate MCP server. The scrip ...[truncated 173 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the dependency to a reviewed, immutable Git commit rather than only a tag. 2. Prefer a verified release artifact from a trusted package repository and enforce an exact version plus cryptographic hashes in a lockfile. 3. Verify upstream release signatures or attestations where available. 4. Install dependencies during a controlled setup or build phase instead of retrieving code whenever the server starts. 5. Review and lock transitive dependencies as well as the top-level MCP package. 6. Run the MCP server in a restricted environment with minimal filesystem access, limited network access, and only the credential required for its operation. 7. Establish an explicit update process in which new commits and dependency changes are reviewed before the pin is changed. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill description claims broad capabilities including official MCP server startup, endpoint discovery, generic API access, and SQL-style querying, but the analyzed content does not substantiate those features. This mismatch is security-relevant because overstated capabilities can cause operators or agents to trust the skill with sensitive data, execution privileges, or workflows it was not actually designed or reviewed to handle.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
scripts/get-agg-day.sh AAPL 2026-03-05
```

## Output rules

- Return concise numeric result first (e.g., last trade price), then timestamp/exchange metadata.
- If Massive is unavailable, state failure explicitly and ask whether to use a fallback source.
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill advertises and invokes shell-based scripts but does not declare any explicit tool scope such as permissions or allowed-tools. That omission weakens sandboxing and review controls because an agent may execute local shell commands with broader access than users expect, especially in a skill that handles environment-based API credentials.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The script includes the API key directly in the request URL query string when calling the external Massive endpoint. Query-string credentials are commonly exposed through shell history, process listings, debugging output, proxy logs, and upstream server logs, so this creates unnecessary credential leakage risk even though the destination is the expected vendor API.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The script sources the user's ~/.zshrc before making a network request, which executes arbitrary shell code from a broad, unrelated startup file in the script's trust context. That expands the attack surface significantly: a malicious or unexpected .zshrc can run commands, alter PATH/functions, or tamper with the API key and curl behavior when the script is invoked.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The script sources the user's shell profile and reads MASSIVE_API_KEY, which is sensitive credential material. While it errors if the key is absent, there is no user-facing notice, comment, or documentation in this file explaining that the skill reads credentials from the environment.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The curl command sends the requested symbol and API key to api.massive.com, which is an outbound network operation involving user/system data. The file contains no prompt, warning, or explanatory comment disclosing that it will contact an external service.

External Transmission

Medium
Category
Data Exfiltration
Content
exit 1
fi

RESP=$(curl -sS "https://api.massive.com/v2/aggs/ticker/${SYMBOL}/prev?adjusted=true&apiKey=${KEY}")
python3 - <<'PY' "$RESP"
import json,sys
r=json.loads(sys.argv[1])
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
exit 1
fi

RESP=$(curl -sS "https://api.massive.com/v2/aggs/ticker/${SYMBOL}/prev?adjusted=true&apiKey=${KEY}")
python3 - <<'PY' "$RESP"
import json,sys
r=json.loads(sys.argv[1])
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
exit 1
fi

RESP=$(curl -sS "https://api.massive.com/v2/aggs/ticker/${SYMBOL}/prev?adjusted=true&apiKey=${KEY}")
python3 - <<'PY' "$RESP"
import json,sys
r=json.loads(sys.argv[1])
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The API key is placed directly in the request URL, which increases exposure through shell history, process listings, debugging output, proxy logs, monitoring systems, and any tooling that records full URLs. Although the call uses HTTPS, URL query parameters are commonly logged more broadly than headers, so the secret may leak to local or intermediary observability layers.

Context-Inappropriate Capability

Low
Confidence
92% confidence
Finding
The script sources the user's ~/.zshrc to obtain environment state, which executes arbitrary shell code from a broad, user-controlled startup file. In a skill context, this expands the trust boundary unnecessarily: running a simple quote lookup can trigger unrelated commands, aliases, prompts, network calls, or secrets-handling logic embedded in that file.

Static analysis

No suspicious patterns detected.