Back to skill

Security audit

Weex

Security checks for vulnerabilities and agentic risk

Overview

This is a real WEEX trading helper, but it needs Review because it exposes broad live financial actions, partner-data endpoints, and unvalidated credential-bearing API destinations.

Install only if you are comfortable granting an agent live WEEX trading authority. Use least-privilege API keys, avoid withdrawal or affiliate permissions unless absolutely needed, avoid storing production keys in broad shell profiles, keep base URLs pinned to official WEEX HTTPS hosts, and require your own explicit dry-run plus confirmation before any trade, cancellation, margin/leverage change, position close, or transfer-like action.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/weex_spot_api.py:160
Finding

Spot API credentials can be transmitted to an arbitrary host through an unrestricted base URL

Content
View full analysis
Dict[str, Any]: req = request.Request( url=prepared["url"], method=prepared["method"], data=prepared["data"], headers=prepared["headers"], ) try: with request.urlopen(req, timeout=self.timeout) as resp: ``` The destination is supplied without validation: ```python parser.add_argument("--base-url", default=os.getenv("WEEX_SPOT_API_BASE", DEFAULT_BASE_URL)) ``` ### Technical Analysis The Spot client accepts its base URL from either the `--base-url` command-line option or the `WEEX_SPOT_API_BASE` environment variable. It does not validate the URL scheme, hostname, port, user-information component, or path. For authenticated endpoints, the client then attaches the following sensitive headers to a request targeting that unrestricted URL: - `ACCESS-KEY` - `ACCESS-PASSPHRASE` - `ACCESS-TIMESTAMP` - `ACCESS-SIGN` The HMAC-SHA256 signature is Base64-encoded as required by the WEEX authentication protocol. That encoding is legitimate and is not, by itself, a covert exfiltration mechanism. The security f ...[truncated 2551 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/weex_contract_api.py:159
Finding

Contract API credentials can be transmitted to an arbitrary host through an unrestricted base URL

Content
View full analysis
Dict[str, Any]: req = request.Request( url=prepared["url"], method=prepared["method"], data=prepared["data"], headers=prepared["headers"], ) try: with request.urlopen(req, timeout=self.timeout) as resp: ``` The destination is supplied without validation: ```python parser.add_argument("--base-url", default=os.getenv("WEEX_API_BASE", DEFAULT_BASE_URL)) ``` ### Technical Analysis The Contract client accepts an arbitrary base URL from `--base-url` or `WEEX_API_BASE`. No restriction ensures that authenticated requests are sent only to the official `api-contract.weex.com` origin. When an endpoint is marked as authenticated, the client creates an HMAC-SHA256 signature and attaches the API key, passphrase, timestamp, and signature. It then combines the unvalidated base URL with the endpoint path and sends the resulting request through `urlopen()`. Base64 encoding of the HMAC digest is required by the documented WEEX signing protocol and is not evidence of hidden payload encodi ...[truncated 2193 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (25)

Description-Behavior Mismatch

Critical
Category
Not specified by scanner
Confidence
100% confidence
Finding

The file exposes an authenticated internal withdrawal endpoint that can transfer funds to another user, yet this capability is not disclosed in the skill description. Undocumented fund-transfer functionality in an AI-driven trading tool is especially dangerous because it enables direct asset movement beyond normal trading actions, creating severe theft or misdirection risk if the endpoint is ever reachable.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented purpose is a trading assistant, but the skill also includes documentation scraping and local file generation workflows unrelated to normal trade execution. This mismatch is dangerous because users and orchestrators may grant high-trust financial permissions while the skill also performs broader network retrieval and file-writing behaviors that were not clearly disclosed.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The documented purpose is a trading assistant, but the skill also includes documentation scraping and local file generation workflows unrelated to normal trade execution. This mismatch is dangerous because users and orchestrators may grant high-trust financial permissions while the skill also performs broader network retrieval and file-writing behaviors that were not clearly disclosed.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The documented purpose is a trading assistant, but the skill also includes documentation scraping and local file generation workflows unrelated to normal trade execution. This mismatch is dangerous because users and orchestrators may grant high-trust financial permissions while the skill also performs broader network retrieval and file-writing behaviors that were not clearly disclosed.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `references/spot-api-definitions.md` (human-readable local spot interface definitions)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `references/contract-api-definitions.md` (human-readable local interface definitions)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The definitions expose a bulk close-positions endpoint that can close all open positions when no symbol is supplied, which is significantly more destructive than routine order placement or query behavior. In an automated trading skill, this creates a high-risk footgun: a prompt misunderstanding, malicious instruction, or tool misuse could liquidate a user's trading strategy across the whole account in one action.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill metadata describes a trading assistant for spot/futures order placement, cancellation, market data, and account retrieval, but the referenced API surface also includes affiliate intelligence and money-movement features. This creates an undocumented expansion of privilege and purpose, increasing the chance that a user or downstream agent could invoke sensitive partner-only functions without informed consent or appropriate guardrails.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The affiliate/referral endpoints expose sensitive business intelligence and third-party user data such as invited-user UIDs, KYC status, deposits, trades, commissions, and asset balances. In the context of a trading assistant, these capabilities are unrelated to the stated purpose and broaden access to non-user financial and identity data, raising privacy, insider-data, and misuse concerns.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The internal withdrawal endpoint enables authenticated transfer of funds between users/accounts, which is materially more dangerous than ordinary trading operations and is not justified by the stated skill purpose. In an agent setting, a misunderstood natural-language instruction, prompt injection, or over-broad tool access could trigger unauthorized asset movement with immediate financial loss.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The internal withdrawal endpoint moves funds between users/accounts, yet the documentation lacks strong warnings about irreversible financial consequences and cross-user transfer risk. In the context of an agent-accessible skill, this omission is especially dangerous because users may not realize that a natural-language request could initiate direct asset transfer rather than merely retrieve data or manage orders.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
Access to private endpoints (such as account and trading APIs) requires a Weex API Key.Public market data endpoints are available without authentication.

### Create an API Key

1. Go to [API Management](https://www.weex.com/account/newapi/)
2. Create a new API key

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README encourages natural-language order placement and cancellation for live trading actions without clearly requiring an explicit confirmation step or prominently warning about financial loss risk. In an agent-driven environment, this increases the chance of unintended or ambiguous prompts causing real account-affecting trades.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill exposes capabilities involving environment variables, file access, and network access but does not declare any explicit tool scope or permission boundaries. In a trading skill, this increases the chance that an agent can access secrets, write local files, or make outbound requests beyond what a user would reasonably expect, which weakens containment and auditability.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The safety policy states that direct live execution is the default flow and only requires --confirm-live, without an explicit warning about financial loss, irreversible execution, or the need for a safer dry-run/review path. In a trading context, this materially raises the risk of accidental or manipulated order placement causing immediate financial harm.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documented contract API surface includes authenticated state-changing account actions such as changing margin mode, updating leverage, adjusting isolated margin, and toggling auto-append margin. These capabilities exceed a narrow interpretation of simple order placement/cancellation/query and increase the blast radius of prompt mistakes or misuse, because they can materially alter risk settings and account exposure without directly placing an order.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The transaction section documents multiple destructive authenticated endpoints—order cancellation, batch cancellation, cancel-all, conditional-order cancellation, and position closure—without any embedded warning, approval flow, or confirmation guidance. In a natural-language trading agent, absence of explicit safety interlocks makes these operations more dangerous because ambiguous or adversarial prompts can directly trigger irreversible account actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This documentation exposes numerous authenticated, account-impacting trading actions such as place order, close positions, and cancel all orders, including especially dangerous variants where omitting a symbol affects all positions or all open orders. In an agent skill advertised for natural-language trading, documenting destructive operations without explicit confirmation/warning requirements materially increases the risk that an LLM-driven workflow could execute irreversible or financially harmful actions from ambiguous, mistaken, or injected prompts.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documented spot skill includes affiliate and rebate endpoints, including fund-movement and referral-data features, that exceed the stated purpose of natural-language trading, cancellation, market data, and account retrieval. This scope expansion increases the attack surface and may let an agent invoke sensitive capabilities users would not reasonably expect from a trading-focused skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation presents destructive financial operations such as order placement, cancellation, and transfer-like capabilities without emphasizing that they can cause immediate monetary impact or be difficult to reverse. In a natural-language agent workflow, missing warnings materially increases the chance of accidental execution from ambiguous or manipulated prompts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The cancel-all-by-symbol operation can cancel multiple active orders, but the documentation does not clearly warn about the breadth of impact. In an automated trading skill, users may interpret a request as affecting one order while the endpoint actually removes an entire symbol's open book, causing unintended trading disruption or opportunity loss.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Referral verification and affiliate user-data retrieval expose third-party financial and identity-related information that is unrelated to the skill's declared trading purpose. This creates unnecessary privacy and data-minimization risk, especially if an agent can query affiliate UIDs, KYC status, deposits, trades, or related referral metadata without users understanding that such data access exists.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The setup instructions specify export WEEX_LOCALE="en-US" as a fixed configuration value. This may violate language/locale policy because it directs users to use a specific locale without offering a choice or explaining why that locale is required.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation instructs users to export WEEX_LOCALE="en-US" as part of the standard setup. This imposes a specific language/locale choice without opt-in or explanation, which is a natural-language policy concern under the locale policy rule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file sets DEFAULT_LOCALE to "en-US", and request headers use that locale unless the caller explicitly overrides it. This creates a default language/locale preference baked into the skill without any documented user opt-in or region-specific justification.

Content

No source excerpt is available for this finding.