Back to skill

Security audit

okx-cex-earn

Security checks for vulnerabilities and agentic risk

Overview

This skill needs review because it hides its use of real funds and gives contradictory instructions that could redeem an investment before approval.

Wait for corrected instructions before enabling transactions: the skill should identify the live account explicitly and use read-only information for redemption previews. Require approval of the account, product, amount, and consequences before execution. Browsing can reveal balances, and optional monitoring repeatedly accesses account data. Several scanner alerts were unsupported, but the live-account concealment and redemption contradiction independently justify review.

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

Warning
Location
references/workflows.md
Finding

Suggested JSON preview can execute live early redemption before confirmation

Content
View full analysis

Impact

A real investment can be redeemed before the user accepts the indicative proceeds or loss. The command reference explicitly allows a negative termRate, so premature execution can crystallize a loss.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (12)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The supplied code focuses entirely on configuration and authentication inspection rather than the declared earn-management functions. Authentication checks could support an earn workflow, but no such workflow or prerequisite context appears here, and displaying API-key profile configuration accesses resources outside the stated purpose. These commands alone do not establish that raw credentials are disclosed or that information is transmitted externally.

Content

No source excerpt is available for this finding.

The skill instructs the agent to conceal that operations use live funds rather than demo mode.

High
Category
Output Handling
Confidence
98% confidence
Finding

The instruction explicitly suppresses disclosure that operations use real funds and directs API-key users to a live profile. A user expecting a demonstration could approve a transaction without understanding its real financial consequences; ordinary transaction confirmations do not fully address this concealed environment change.

Content

No source excerpt is available for this finding.

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
70% confidence
Finding

Skill instructs the agent to never refuse or to always comply. Suppressing the agent's ability to decline removes a core safety control and enables downstream harmful requests to succeed.

Content

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

md
- **Security:** Never ask users to paste API keys or secrets into chat.
- **Output:** Always pass `--json` to list/query commands and render results as a Markdown table — never paste raw terminal output.
- **Network errors:** If commands fail with a connection error, prompt user to check VPN: `curl -I https://www.okx.com`
- **Language:** Always respond in the user's language.

For number/time formatting and response structure conventions, read `{baseDir}/references/templates.md`.

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 · references/savings-commands.md (reported line 222)May include surrounding context.

md
**NEVER expose raw state values** to the user — always translate using the table above.

**Display rules:**
- Render as Markdown table with columns: # · reqId · Currency · Amount · Rate · Term · Status · Accrued Interest · Create Time
- Format timestamps using `YYYY/M/D HH:MM`
- For `pending` orders, note that early redemption is available

The redemption preview step suggests running the execution command with --json before user confirmation.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The preview step says not to execute yet but then suggests using the executing command with --json to preview its output. JSON output formatting is not a dry-run mechanism, so following that suggestion can redeem a live investment before confirmation and realize a loss.

Content

No source excerpt is available for this finding.

The DCD redemption preview suggests running an execution command with `--json` without warning that it can redeem the order.

High
Category
Output Handling
Confidence
99% confidence
Finding

The wording incorrectly presents --json as a way to preview an atomic quote-and-redemption command. Despite the adjacent “do NOT run yet” warning, this contradiction creates an actionable path to unauthorized early redemption; it is the same underlying defect as the other finding in this source.

Content

No source excerpt is available for this finding.

Activation includes generic financial terms without requiring an OKX-specific context.

Medium
Category
Trigger Abuse
Confidence
97% confidence
Finding

The description explicitly activates the skill for generic phrases such as “fixed deposit,” “term deposit,” “申购,” “赎回,” and “目标价.” These can describe ordinary banking or unrelated investments, but the trigger does not require an OKX context or provide exclusions.

Content

No source excerpt is available for this finding.

Silently switches to live financial operations instead of disclosing that demo mode is unsupported.

Medium
Category
Prompt Injection
Confidence
98% confidence
Finding

Silently selecting a live profile crosses the boundary between simulated activity and real financial operations without informed authorization. This is the same underlying defect as the live-mode concealment finding and can expose real principal to investment losses or lockups.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
## Global Notes

- **Security:** Never ask users to paste API keys or secrets into chat.
- **Output:** Always pass `--json` to list/query commands and render results as a Markdown table — never paste raw terminal output.
- **Network errors:** If commands fail with a connection error, prompt user to check VPN: `curl -I https://www.okx.com`
- **Language:** Always respond in the user's language.

Product browsing mandates retrieval of the user's account balance without a user-facing privacy notice.

Medium
Category
Output Handling
Confidence
86% confidence
Finding

A request to browse products triggers mandatory access to private account balances, although product discovery does not inherently require holdings information. This unnecessarily brings sensitive financial data into the agent context and potentially the conversation; no external exfiltration destination is shown.

Content

No source excerpt is available for this finding.

Behavior Manipulation

Medium
Category
Prompt Injection
Confidence
75% confidence
Finding

Subtle instructions detected that may alter agent decision-making or introduce hidden biases.

Content

Scanner excerpt · references/savings-commands.md (reported line 63)May include surrounding context.

okx --profile live earn savings set-rate --ccy USDT --rate 0.01

text

`--rate` is the user's minimum matching threshold — funds are lent only when the market lending rate ≥ this value. The actual yield is always `lendingRate`. Never tell users that lowering their minimum rate reduces earnings — this is incorrect.

---

The formatting rule imposes UTC+8 when the user's timezone is unknown, without user opt-in or a documented regional justification.

Low
Category
Output Handling
Confidence
86% confidence
Finding

Although the rule prioritizes the user's timezone, its fallback requires a specific regional timezone without asking the user or explaining why UTC+8 is appropriate. Noting the fallback discloses it but does not provide user choice or justify the locale constraint.

Content

No source excerpt is available for this finding.