Back to skill

Security audit

Weex Trading

Security checks for vulnerabilities and agentic risk

Overview

This skill is a live crypto-trading integration that asks users to send exchange API credentials to a third-party Telegram bot and enables real automated trades, so it needs careful review before use.

Install only if you intentionally want this specific Weex Telegram bot to custody trading API credentials and place live trades for you. Use a dedicated API key with withdrawals disabled, revoke it immediately if anything seems wrong, start with very small limits, and do not rely on the artifact alone to verify the bot's deletion, encryption, or operational security claims.

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:27
Finding
Plaintext Exchange API Credentials Disclosed to an Unverifiable Third-Party Telegram Bot## Vulnerability Details **File Location**: `SKILL.md`, lines 27-32 **Vulnerability Type**: Plaintext transmission of reusable trading credentials to an external service **Risk Level**: High The skill explicitly instructs users to send their API key, API secret, and passphrase in a Telegram message to an external bot: ```text ### 3. Connect via Telegram Open [@WEEXonTONbot](https://t.me/WEEXonTONbot) and send: ``` /connect YOUR_API_KEY YOUR_API_SECRET YOUR_PASSPHRASE ``` The bot deletes your message immediately for security. Keys are encrypted at rest. ``` ### Technical Analysis The API secret and passphrase are reusable authentication secrets that authorize signed requests to the user's exchange account. Sending all credential components through a chat message gives the receiving bot and its supporting infrastructure access to the complete credential set. The project contains only documentation and does not include the Telegram bot implementation, encryption implementation, storage controls, logging configuration, deletion logic, deployment configuration, or cryptographic key-management procedures. Consequently, the claims that messages are immediately deleted and credentials are encrypted at rest cannot be independently verified from the audited artifact. Deleting a Telegram message after receipt does not guarantee that its contents were not retained in application logs, exception reports, telemetry, database backups, message queues, process memory, or operator-controlled storage. Encryption at rest also does not protect credentials while the bot is actively using them or if the bot application or encryption keys are compromised. The recommendation to restrict the key to Spot Trading and disable withdrawals reduces the potential impact but does not eliminate it. A trading-enabled credential can still be used to inspect account information, place unauthorized orders, cancel legitimate orders, execute unfavorable trades, ...[truncated 1937 chars]
Remediation
## Remediation Suggestions 1. **Do not collect secrets through Telegram messages.** Replace the `/connect KEY SECRET PASS` workflow with a dedicated authenticated enrollment interface that does not place secrets in chat history or bot-update payloads. 2. **Prefer delegated authorization.** Use an exchange-hosted OAuth or equivalent authorization flow if Weex supports one. Tokens should be narrowly scoped, revocable, and short-lived. 3. **Prefer local credential custody.** Where delegated authorization is unavailable, provide an auditable local client that signs exchange requests on the user's device so the API secret is never disclosed to the bot. 4. **Apply least privilege.** Require keys restricted to Spot Trading only, explicitly prohibit withdrawal permissions, apply exchange-supported IP allowlists, and use a dedicated key that is not shared with other applications. 5. **Implement secure secret handling if server-side custody is unavoidable.** - Use a reviewed secrets-management service or hardware-backed key-management system. - Encrypt each credential with authenticated encryption and per-record key material. - Keep decryption keys separate from credential storage. - Prevent secrets from entering application, proxy, audit, exception, or telemetry logs. - Redact Telegram updates and command arguments before logging. - Define automatic expiration, revocation, and secure deletion procedures. - Restrict production access and record all administrative access to secrets. 6. **Provide verifiable security evidence.** Include or publish the relevant bot source code, deletion logic, storage implementation, deployment model, and key-management design for independent review. Do not make unqualified claims about deletion or encryption without verifiable controls. 7. **Add user-facing risk disclosure.** Clearly state that the bot is a third-party custodian of trading credentials and that a trading-enabled key can caus ...[truncated 273 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

YARA rule 'ransomware_behavior': Ransomware-like patterns (mass encryption, ransom notes) [malware]

Critical
Category
YARA Match
Content
0 2500 10 500` creates 10 grid levels between $2000-$2500 with $500 total.

## For Agents (Programmatic Use)

OpenClaw agents can interact with the bot by sending Telegram messages to @WEEXonTONbot. The typical agent workflow:

1. **Setup (once):** Guide your human to sign up at `https://www.weex.com/en/register?vipCode=gjcr`, create API keys, then send `/connect` to the bot.
2. **Price checks:** Send `/price BTC` (or any symbol) to get current market data before making decisions.
3. **Execute trades:** Use `/dca` for recurring buys or direct market orders via the Weex API.
4. **Monitor:** Send `/status` to check strategy performance.

### Direct API Access

The bot runs a REST API on port 8960 for programmatic access. Agents on the same host can call:

- `GET /api/health` — Health check
- `GET /api/price/:symbol` — Get price data
- `GET /api/strategies/:telegramId` — List strategies

### Weex API (Binance-Compatible)

Weex uses a Binance-compatible REST API at `https://api-spot.
Confidence
80% confidence
Finding
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Missing User Warnings

High
Confidence
97% confidence
Finding
The skill describes automated DCA and grid trading commands that can place recurring or multi-order trades without prominent warnings about loss of funds, market volatility, slippage, strategy failure, or the consequences of unattended execution. In a trading skill, missing risk disclosures and confirmation requirements materially increase the chance of unintended financial harm, especially when agents may translate natural-language requests into live orders.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
### GET /api/v3/order
Get specific order. `?symbol=BTCUSDT&orderId=123`

### DELETE /api/v3/order
Cancel order. `?symbol=BTCUSDT&orderId=123`

### GET /api/v3/openOrders
Confidence
91% confidence
Finding
The documented DELETE /api/v3/order endpoint enables cancellation of a specific live order using user-controlled parameters. In an agent-driven trading skill, insufficient validation or confirmation around this action could let a prompt, misparsed instruction, or malicious input cancel active orders and materially disrupt trading strategies or cause financial loss.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
### GET /api/v3/openOrders
Get open orders. Optional: `?symbol=BTCUSDT`

### DELETE /api/v3/openOrders
Cancel all open orders for a symbol. `?symbol=BTCUSDT`

### GET /api/v3/allOrders
Confidence
95% confidence
Finding
The DELETE /api/v3/openOrders endpoint can cancel all open orders for a symbol, making it a bulk destructive operation with significant financial impact. Within a Telegram-triggered autonomous trading context, ambiguous symbol resolution, prompt injection, or parameter abuse could wipe out an entire strategy position for an asset with a single request.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger list is broad enough to activate on common user intents such as checking prices, buying bitcoin, portfolio management, or automated trading, which can cause this skill to be selected in situations where the user did not explicitly intend to use this specific third-party exchange bot. In this context, over-triggering is risky because the skill can lead users or agents into financial actions, account linking, and automated strategy setup on an external service.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The reference explicitly documents authenticated balance, order placement, and cancellation endpoints for a live exchange, but provides no safety guidance around irreversible financial actions, least-privilege API keys, or confirmation requirements. In the context of an agent skill that can act on user requests via Telegram, this omission increases the risk that an agent integrates these endpoints in a way that exposes portfolio data or executes unintended trades.

Static analysis

No suspicious patterns detected.