Back to skill

Security audit

BNBCHAIN Protocol & Matrices Analysis — Powered by ClipX

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed BNB Chain analytics API client, with notable output-handling and privacy caveats but no evidence of malicious behavior.

Before installing, be comfortable with the skill sending analytics selections and any public BNB address you enter to the private ClipX API. Treat returned rankings and announcements as external financial/market content, not trusted agent guidance, especially because the skill asks the agent to reproduce some API output exactly.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:10
Finding

Untrusted API Content Is Reproduced Verbatim in Agent Responses

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:10-14; api_client_cli.py:136-137,145-147
Vulnerability Type: Untrusted remote content propagation and skill instruction hijacking
Risk Level: Medium

Vulnerable Code

SKILL.md:10-14:

markdown
**Rule 2 — Table format:** Always wrap the table output inside a markdown code block (triple backticks). Start with a line containing only three backticks, then the table lines, then a line containing only three backticks. This is required so the table displays in monospace with aligned columns. The API returns tables formatted at **40 chars per line** (mobile-friendly); do not reformat or truncate — pass through exactly. **Exception:** For option 11 (Binance Announcements), do NOT wrap in code block — pass through the API output as-is (plain markdown with **📢 Binance Announcements** header, 🔸 bullets, and blank line after each item).

**Rule 3 — Response ends with the output.** After the table (or Binance list for option 11), your message is complete. Write nothing else.

api_client_cli.py:136-137:

python
if result.get("ok") and result.get("formatted_table") and args.formatted:
    print(result["formatted_table"], end="")

api_client_cli.py:145-147:

python
if result.get("ok") and result.get("formatted_table") and args.formatted:
    print(result["formatted_table"], end="")
    return 0

Technical Analysis

The client obtains formatted_table from the externally hosted ClipX API and prints it without validating its structure, content, length, or characters. The Skill instructions then require the agent to reproduce that remote output exactly and prohibit adding any text after it.

Although contacting the ClipX API is necessary for the declared analytics functionality, allowing the remote service to control final response text without validation exceeds the minimum privilege required. The service only needs to supply structured analytics data; it does not need unrestric ...[truncated 2399 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove instructions requiring unconditional verbatim reproduction of remote output. Explicitly define API responses as untrusted data.
  2. Return structured analytics fields from the API and construct all user-facing tables locally rather than accepting a server-generated formatted_table.
  3. Validate responses against a strict schema:
    • Allowlist supported analysis types and field names.
    • Enforce expected data types and reasonable length limits.
    • Reject unknown top-level fields where practical.
    • Limit item counts and per-field sizes.
  4. Strip or reject terminal control characters, ANSI escape sequences, bidirectional text controls, and other non-display characters before printing.
  5. Escape or neutralize active Markdown, links, HTML, and instruction-like content when values originate from the remote service.
  6. Permit the agent to refuse suspicious output and provide security warnings instead of requiring the response to end with API-controlled content.
  7. Restrict CLIPX_API_BASE to HTTPS URLs and, in managed deployments, allowlist trusted hosts. Consider certificate pinning only if the associated certificate-rotation and operational risks are acceptable.
  8. Add tests using malicious API responses containing Markdown links, prompt-like instructions, oversized fields, embedded code fences, ANSI escapes, and Unicode control characters.
  9. For address queries, disclose that the supplied blockchain address is sent to the configured API so users can make an informed privacy decision.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (15)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · README.md (reported line 108)May include surrounding context.

md
| File | Purpose |
|------|---------|
| `SKILL.md` | OpenClaw metadata, menu format, table display rules, command mapping |
| `api_client_cli.py` | HTTP client — calls ClipX API, prints JSON or formatted table |
| `format_box.py` | Local helper — fetches or reads JSON, prints box-style table |
| `requirements.txt` | Dependencies (`requests` only) |

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The code generally matches the core claim that it is a thin client with no scraping logic and no embedded API keys, and it does call hosted API endpoints for BNB/ClipX data. However, the declared description says it returns text-only JSON metrics and rankings, while the code also supports rendering a server-supplied formatted table and a live-refresh terminal dashboard experience using screen clearing. Those are user-visible capabilities beyond a JSON-only client. The environment-variable-configurable base URL also makes it a more generic HTTP client than the description implies, though this is a smaller issue. Overall, the primary purpose is close, but the description is materially incomplete about output mode and live terminal behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description emphasizes a thin client for the ClipX BNBChain API that returns JSON metrics/rankings. This code does not primarily act as a raw JSON-returning client; its main function is formatting already-produced JSON into boxed tables and markdown for terminal display. It can optionally call api_client_cli.py to fetch the JSON first, but even then its purpose is fetch-and-format, not exposing a text-only JSON API client. There is no evidence of scraping code or API key handling, so those parts are consistent. However, the core behavior is materially different from the declared purpose, making this a mismatch.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
92% confidence
Finding

The instruction to output API stdout exactly as received creates a prompt-injection and untrusted-content pass-through risk. If the upstream service returns adversarial markdown or embedded instructions, the agent may relay them verbatim to the user, laundering untrusted content as trusted assistant output and potentially triggering downstream actions or social engineering.

Content

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

md
Uses API `binance_announcements` — Top 10 newest announcements.

**Display rules:** Run the command, take the stdout output, and output it exactly as received. Do NOT wrap in a code block. The API returns plain markdown with:
- Bold header: **📢 Binance Announcements**
- 🔸 diamond bullet before each announcement
- Blank line after each item

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
85% confidence
Finding

os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.

Content

Scanner excerpt · api_client_cli.py (reported line 23)May include surrounding context.

python
def _clear_screen() -> None:
    os.system("cls" if os.name == "nt" else "clear")


def get_api_base() -> str:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README repeatedly describes calls to a private remote API but does not clearly warn that user-selected queries and parameters will be transmitted off-platform. In an agent setting, this can create a privacy and trust issue because users may assume the skill is local-only or not realize their requests are sent to third-party infrastructure.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README instructs users to invoke the skill with very broad trigger phrases such as "clipx" or especially "bnbchain." In an agent environment, a generic blockchain term can accidentally activate the skill during ordinary conversation, causing unintended external API calls or tool use without clear user intent.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill instructs the agent to execute a local Python CLI, use environment variables, and contact an external API, yet it declares no tool restrictions or allowed-tool scope. That increases the blast radius if the skill is invoked in a broader runtime, because shell, network, and env access are available without explicit policy boundaries.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation phrases are broad enough that ordinary user requests about BNB Chain could trigger the skill unexpectedly, causing unsolicited shell execution and external API calls. In an agent environment, ambiguous auto-invocation increases the chance of unintended data flow, network access, and confusing or policy-bypassing behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes a thin client that calls a hosted API and returns text-only JSON metrics/rankings. Invoking os.system to run 'cls' or 'clear' adds command-execution capability unrelated to fetching or printing API responses, making it an unnecessary capability for the stated purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest describes the skill as a thin client that returns text-only JSON metrics and rankings, implying JSON retrieval rather than presentation formatting. This file explicitly supports a fetch-and-format mode and outputs human-formatted tables/markdown instead of JSON, which exceeds the stated behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Instead of directly formatting provided JSON, the script launches another Python program using subprocess.run. Spawning subprocesses is not an obvious requirement for a thin private API client returning JSON metrics, and introduces execution capability beyond the stated scope.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · format_box.py (reported line 52)May include surrounding context.

python
"--timezone", timezone,
        "--no-formatted",
    ]
    result = subprocess.run(
        cmd,
        capture_output=True,
        text=True,

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest and earlier display rules frame the skill as a thin client that returns API output directly, emphasizing exact pass-through formatting. However, the option 8 section explicitly tells the agent to transform the returned JSON into a natural-language summary, which contradicts the stated pass-through behavior in the documentation.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is only range-pinned (>=2.31.0,<3.0.0) rather than fixed to a known-safe version, so installs are not reproducible and may resolve to a release affected by known Requests advisories. In a client that makes network calls to a private BNBChain API, dependency-level flaws can directly affect credential handling, TLS behavior, redirect handling, or request safety, increasing the chance of data exposure or unsafe outbound requests.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.