Back to skill

Security audit

solscan-market-by-solscan

Security checks for vulnerabilities and agentic risk

Overview

This is a read-only Solscan API helper whose API-key and network use are disclosed and aligned with its blockchain lookup purpose, with privacy and reliability caveats.

Before installing, expect wallet addresses, token identifiers, filters, and your Solscan API key to be sent to Solscan Pro for lookups. Use it only for wallets or investigations where you have a legitimate purpose, protect the API key, and be aware that some documented commands may be inaccurate or unsupported.

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

Note
Location
scripts/solscan.py:27
Finding

Missing HTTP Request Timeout Can Indefinitely Block Skill Execution

Content
View full analysis

Vulnerability Details

File Location: scripts/solscan.py:27
Vulnerability Type: Unbounded network request duration
Risk Level: Low

Vulnerable Code

python
try:
    response = requests.get(url, headers=headers, params=params)
    response.raise_for_status()
    return response.json()
except requests.exceptions.RequestException as e:
    print(f"API Request Error: {e}", file=sys.stderr)

Technical Analysis

The call to requests.get() does not specify a connection or read timeout. The Requests library therefore permits the operation to wait indefinitely if the connection establishment or response transfer stalls.

Although the destination is a fixed HTTPS Solscan API endpoint, an API outage, network failure, dropped response, or an attacker capable of disrupting the network path could leave the process blocked. Repeated invocations could accumulate waiting processes or consume the Agent host's execution capacity.

The API key is sent only to the fixed Solscan HTTPS origin and is not exposed by this issue. The network access itself is necessary for the Skill's declared functionality and does not exceed minimum privilege.

Attack Path

  1. A user or Agent invokes any supported account, token, or market query.
  2. The script calls the fixed Solscan API endpoint through requests.get().
  3. The API or network path accepts the connection but fails to complete the response, or otherwise stalls the request.
  4. Because no timeout is configured, the script remains blocked without an application-enforced deadline.
  5. Repeated concurrent calls can consume worker slots and degrade the availability of the Agent environment.

Impact Assessment

The issue affects availability only. It does not grant an attacker additional system privileges, expose the API key, enable arbitrary code execution, or permit access to unrelated local data. Its scope is limited to the running process and, if many blo ...[truncated 93 chars]

Remediation
View remediation

Remediation Suggestions

Configure explicit connection and read timeouts:

python
try:
    response = requests.get(
        url,
        headers=headers,
        params=params,
        timeout=(5, 30),
    )
    response.raise_for_status()
    return response.json()
except requests.exceptions.Timeout:
    print("API Request Error: request timed out.", file=sys.stderr)
    sys.exit(1)
except requests.exceptions.RequestException as e:
    print(f"API Request Error: {e}", file=sys.stderr)
    if e.response is not None:
        print(f"Response Body: {e.response.text}", file=sys.stderr)
    sys.exit(1)

If automatic retries are required, use a requests.Session with bounded retry counts and exponential backoff. Retry only transient failures, such as timeouts, HTTP 429 responses, and selected 5xx responses. Enforce a total retry deadline to prevent retries from recreating an unbounded wait.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Tainted flow: 'headers' from os.environ.get (line 18, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/solscan.py (reported line 28)May include surrounding context.

python
params = {k: v for k, v in params.items() if v is not None}
        
    try:
        response = requests.get(url, headers=headers, params=params)
        response.raise_for_status()
        return response.json()
    except requests.exceptions.RequestException as e:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 46)May include surrounding context.

md
**Syntax**: `python3 scripts/solscan.py <resource> <action> [--param value]`

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill documents executable capabilities that use environment secrets and outbound network access, but it does not declare any explicit tool scope or permissions boundary. In an agent environment, this can lead to overbroad execution rights, making it easier for the skill to access API keys or perform unintended external requests without clear policy enforcement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill facilitates wallet profiling through metadata, portfolio, transfer history, and DeFi activity lookups, yet provides no privacy warning or usage constraints. In practice, this can normalize bulk inspection of user or third-party financial activity and increase the risk of privacy-invasive or policy-noncompliant use, especially in agentic workflows that automate enrichment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code sends request parameters such as addresses, transaction filters, and token identifiers to the Solscan Pro API via HTTP, but the function provides no confirmation prompt, visible user-facing notice, or explanatory comment/docstring about that external data transmission. Because the tool processes user-supplied blockchain/account query data and sends it to a third-party service, it should clearly disclose that behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation's Token Analysis Workflow says token price --address <MINT> will 'get current price', and the evaluation similarly says token price returns the current BONK price. Elsewhere in the same file, token price is explicitly marked deprecated and described as single-token price history, while token price-latest is the endpoint for latest price data.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The evaluation says transaction actions --signature XYZ, but the documented command syntax for transaction actions requires --tx, not --signature. This is an active contradiction in the skill's own documentation about how the tool should be invoked.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.