Back to skill

Security audit

megaethss-developer

Security checks for vulnerabilities and agentic risk

Overview

This MegaETH skill includes an unrelated, undisclosed X/Twitter search script that sends user queries to xAI, and its blockchain guidance lacks clear safety guardrails for fund-moving actions.

Review this package before installing. The MegaETH guidance may be useful, but do not treat it as scoped or complete safety guidance for real funds. Avoid invoking the bundled search script unless you intend to send the query, handle filters, date filters, and media options to xAI using XAI_API_KEY. Remove or isolate that script if you only want a MegaETH development skill.

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)

other

Warning
Location
scripts/search.py:20
Finding

Undisclosed External Transmission of User Search Queries

Content
View full analysis

Vulnerability Details

File Location: scripts/search.py:20, 211-239
Vulnerability Type: Undisclosed External Data Transmission
Risk Level: Medium

Vulnerable Code

python
API_URL = "https://api.x.ai/v1/responses"
python
api_key = os.environ.get("XAI_API_KEY", "").strip()
if not api_key:
    die("XAI_API_KEY environment variable is not set.")

query = " ".join(w for w in options["query"] if w).strip()
if not query:
    print("Error: No search query provided.", file=sys.stderr)
    print(
        'Usage: python3 search.py [--handles h1,h2] [--exclude h1,h2] [--from YYYY-MM-DD] [--to YYYY-MM-DD] [--images] [--video] "<query>"',
        file=sys.stderr,
    )
    sys.exit(1)

body = json.dumps({
    "model": MODEL,
    "input": [{"role": "user", "content": query}],
    "tools": [build_tool_config(options)],
}).encode()

req = Request(
    API_URL,
    data=body,
    headers={
        "Content-Type": "application/json",
        "Authorization": f"Bearer {api_key}",
        "User-Agent": "OpenClaw/x-search",
    },
    method="POST",
)

opener = build_opener(_NoRedirect)
try:
    with opener.open(req, timeout=TIMEOUT_S) as resp:
        data = json.loads(resp.read())

Technical Analysis

The skill is declared in SKILL.md as a MegaETH development playbook, but the package also contains an X/Twitter search client that sends user-provided query text and search filters to the external xAI endpoint at https://api.x.ai/v1/responses.

The declared skill description does not disclose this X-search capability, its use of xAI, the XAI_API_KEY requirement, or the transfer of user input to an external service. Consequently, a user or agent relying on the declared scope may invoke behavior that transmits potentially sensitive text outside the local environment without informed consent.

The API key is placed in the HTTPS authorization header and ...[truncated 1616 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove scripts/search.py and its tests from this package if X/Twitter search is not required for the declared MegaETH functionality.
  2. If the feature is intentional, move it into a separately declared and independently reviewed skill with a narrowly defined purpose.
  3. Clearly document:
    • The destination service and endpoint.
    • Every category of data transmitted, including query text, handles, date filters, and media-understanding options.
    • The requirement for XAI_API_KEY.
    • Relevant privacy, retention, and third-party processing implications.
  4. Require explicit user confirmation immediately before transmitting query data to xAI, showing the destination and a summary of the data being sent.
  5. Warn users not to submit credentials, private keys, seed phrases, internal source code, personal data, or other confidential content.
  6. Preserve the existing HTTPS-only endpoint and redirect-blocking behavior.
  7. Add tests verifying that no request occurs without explicit authorization and that credentials cannot be forwarded through redirects.
  8. Ensure the package manifest and documentation accurately describe every executable capability included in the distribution.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This second mismatch finding reinforces that the apparent MegaETH/blockchain skill may actually parse social-media search arguments, construct x_search tool requests, and post-process results with citations and token accounting. Hidden alternate behavior expands the attack surface and can be used to exfiltrate data, consume external APIs, or bypass policy review under a false label.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This second mismatch finding reinforces that the apparent MegaETH/blockchain skill may actually parse social-media search arguments, construct x_search tool requests, and post-process results with citations and token accounting. Hidden alternate behavior expands the attack surface and can be used to exfiltrate data, consume external APIs, or bypass policy review under a false label.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
85% confidence
Finding

The skill advertises substantial network- and environment-dependent capabilities but does not declare an explicit tool scope such as allowed-tools or permissions. That creates ambiguity about what external access the skill may exercise and weakens containment, review, and user consent around network calls and secret use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly covers wallet management, token swaps, bridging, transaction sending, and headless signing, yet provides no prominent warning that these are irreversible, can move funds, and may expose users to loss if misconfigured. In this context, omission of safety guardrails is dangerous because users may follow automation guidance and authorize real on-chain actions without adequate confirmation or risk awareness.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This file implements an X/Twitter search client against the xAI API, which is unrelated to the declared MegaETH development purpose of the skill. Capability drift like this is dangerous because it introduces an unexpected remote data-access feature that users may not anticipate, increasing the chance of covert data exfiltration or misuse under a misleading skill description.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The script is hardwired to send requests to an external service at api.x.ai, which creates an external transmission channel from the host environment. External network access is not inherently unsafe, but in this skill context it is more concerning because the capability is unrelated to the advertised MegaETH purpose and can move user-provided data off-system.

Content

Scanner excerpt · scripts/search.py (reported line 18)May include surrounding context.

python
def redirect_request(self, req, fp, code, msg, headers, newurl):
        raise HTTPError(newurl, code, f"Redirect to {newurl} blocked (auth safety)", headers, fp)

API_URL = "https://api.x.ai/v1/responses"
MODEL = "grok-4.20-reasoning"
TIMEOUT_S = 120
MAX_HANDLES = 10

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The search() path sends user-supplied queries and filters to a third-party API even though this capability is not justified by the stated skill purpose. In a security review, unjustified capabilities are risky because they expand the trust boundary and can be abused to process or leak sensitive operator input under the guise of an unrelated development tool.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script transmits the full query and selected filters to a remote API without any runtime disclosure beyond requiring an API key. This is dangerous because users may include sensitive investigation terms, account lists, or internal context in the query, not realizing that all of it leaves the local environment and is processed by a third party.

Content

No source excerpt is available for this finding.