Back to skill

Security audit

Data 912 Market Data

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a public market-data lookup helper, but it bundles an unrelated contact endpoint and gives shell-based query instructions without clear input validation.

Review before installing. The market-data behavior itself is coherent and read-only, but the publisher should remove or isolate the /contact operation from the reference spec and add strict ticker validation or non-shell HTTP usage guidance before this is treated as a low-risk skill.

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
SKILL.md:52
Finding

Insufficient validation of user-controlled ticker values may enable shell command injection

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 52–54 and 112–121
Vulnerability Type: Shell command injection through unsafe interpolation of a user-controlled path parameter
Risk Level: High

Vulnerable Code

markdown
Example:

```bash
curl -s "https://data912.com/historical/stocks/GGAL" | jq '.[0:10]'
text

```markdown
2. **Validate required input**:
   - For historical/EOD endpoints, require a ticker symbol.
   - If ticker is missing, ask for it before querying.
3. **Fetch data with `curl -s`** and parse with `jq`.

Technical Analysis

The skill instructs the agent to accept a ticker supplied by the user, place it in an endpoint path, and retrieve that endpoint using a shell-based curl command. The documented validation only verifies that a ticker is present. It does not impose a strict character allowlist, enforce a maximum length, or require URL encoding.

If an implementation follows the documented example by directly interpolating the supplied ticker into a shell command, shell syntax embedded in the ticker can be evaluated locally. Double-quoting the URL is not sufficient protection because command substitution constructs such as $(...) and backticks remain active inside double quotes.

For example, an attacker could provide a ticker conceptually shaped like:

text
$(ATTACKER_CONTROLLED_COMMAND)

A vulnerable interpolation would produce:

bash
curl -s "https://data912.com/historical/stocks/$(ATTACKER_CONTROLLED_COMMAND)" | jq '.[0:10]'

The shell would execute the substituted command before invoking curl. The project does not contain an implementation script proving that interpolation occurs automatically, so exploitation depends on the invoking agent or integration constructing commands from the instructions in this unsafe manner. Nevertheless, the documented workflow establishes an unsafe command-construction pattern without the necessary ...[truncated 1436 chars]

Remediation
View remediation

Remediation Suggestions

  1. Enforce a strict ticker allowlist before constructing any request. For example:

    text
    ^[A-Za-z0-9.-]{1,20}$
    

    Reject values containing whitespace, shell metacharacters, slashes, quotes, backticks, dollar signs, control characters, or encoded path separators.

  2. Normalize accepted symbols to the expected case and, where practical, verify them against the ticker lists published by the API specification.

  3. Avoid constructing shell command strings. Use an HTTP client or tool interface that accepts the URL and path components as structured arguments without shell evaluation.

  4. URL-encode the validated ticker as an individual path segment. URL encoding should supplement, not replace, strict allowlist validation.

  5. If shell execution is unavoidable, pass arguments as a fixed argument array rather than evaluating a dynamically assembled command. Do not use eval, sh -c, or equivalent command-string execution.

  6. Update the workflow documentation to explicitly require validation before any network call. A safer instruction would be:

    markdown
    Accept tickers only when they match `^[A-Za-z0-9.-]{1,20}$`.
    Reject all other values. URL-encode the validated ticker as one path
    segment and invoke the HTTP client without a shell-interpreted command.
    
  7. Add negative tests covering command substitutions, quotes, semicolons, pipes, redirects, newlines, traversal sequences, and oversized ticker values.

Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (3)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This skill can send arbitrary email/message content to an external party via /contact even though the skill is supposed to only retrieve market data. In an agent setting, that creates a clear data-exfiltration and unauthorized third-party communication path: prompts or tool misuse could cause user data, conversation content, or crafted messages to be transmitted off-platform.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The OpenAPI spec includes a POST /contact capability that is outside the stated purpose of a market-data lookup skill. Unrelated outbound messaging expands the agent’s action surface and could be invoked to transmit user-supplied content to a third party without a legitimate business need for the skill’s function.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The contact endpoint collects an email address and free-form message text but provides no privacy notice, retention policy, or explanation of how submitted data is handled. Free-form PII collection with undisclosed processing is risky because users may unknowingly disclose personal or sensitive information to an unvetted third party.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.