Back to skill

Security audit

Apex Trading & Analysis

Security checks for vulnerabilities and agentic risk

Overview

This ApeX skill is mostly transparent about being a trading tool, but it can place or cancel live futures orders with high-impact credentials and too few enforced safeguards.

Install only if you are comfortable giving this skill ApeX trading credentials and an Omni seed. Use testnet first, keep credentials out of shared or synced folders, manually verify every order before allowing the agent to run it, and avoid cancel-all or production trading until the skill adds enforced confirmations, input validation, and safer dependency provenance.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/apex.mjs:179
Finding

Trading Orders Accept Unvalidated Size and Price Values Without Exposure Controls

Content
View full analysis
`); } const side = command === 'market-buy' ? 'BUY' : 'SELL'; const symbolInfo = apexClient.symbols?.[symbol]; if (!symbolInfo?.l2PairId) { throw new Error(`Unknown symbol: ${symbol}`); } let price = ''; try { const worst = await apexClient.privateApi.getWorstPrice(symbol, size, side); price = worst?.worstPrice || ''; } catch (err) { const ticker = await getTickerPrice(apexClient, symbol); price = ticker?.lastPrice || ''; } if (!price) throw new Error(`Unable to determine price for ${symbol}`); const makerFeeRate = apexClient.account?.contractAccount?.makerFeeRate || '0'; const takerFeeRate = apexClient.account?.contractAccount?.takerFeeRate || '0'; const limitFee = calculateLimitFee(price, size, takerFeeRate, symbolInfo.baseCoinRealPrecision); const order = { pairId: symbolInfo.l2PairId, makerFeeRate, takerFeeRate, symbol, side, type: 'MARKET', size: String(size), price: String(price), limitFee, reduceOnly: false, timeInForce: 'IMMEDIATE_OR_CANCEL', expiration: Math.floor(Date.now() / 1000 + 30 * 24 * 60 * 60), }; const result = await apexClient.privateApi.createOrder(order); ``` The limit-order path has the same weakness: ```js const size = args[2]; const price = args[3]; if (!symbol || !size || !price) { throw new Error(`Usage: apex ${command} `); } const side = command === 'limit-buy' ? 'BUY' : 'SELL'; const symbolInfo = apexClient.symbols?.[symbol]; if (!symbolInfo?.l2PairId) { throw new Error(`Unknown symbol: ${symbol}`); } const makerFeeRate = apexClient.account?.contractAccount?.makerFeeRate || '0'; const takerFeeRate = apexClient.account?.contractAccount?.takerFeeRate || '0'; const limitFee = calcul ...[truncated 2557 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/check-positions.mjs:137
Finding

Portfolio and Account State Is Persisted in Plaintext Without Restrictive File Permissions

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/package-lock.json:712
Finding

Mixed Package Registry Provenance Expands the Supply-Chain Trust Boundary

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (45)

Known Vulnerable Dependency: elliptic==6.5.4 — 7 advisory(ies): CVE-2024-48949 (Elliptic's verify function omits uniqueness validation); CVE-2024-42461 (Elliptic allows BER-encoded signatures); CVE-2025-14505 (Elliptic Uses a Cryptographic Primitive with a Risky Implementation) +4 more

Critical
Category
Supply Chain
Confidence
90% confidence
Finding

elliptic 6.6.1 is separately flagged for a lower-severity cryptographic implementation issue. Even though the advisory severity is lower than 6.5.4's set, this is still undesirable in a trading and wallet-related skill where cryptographic correctness is security-critical.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

Or use .env file (recommended for security):

bash
cd apex
cp .env.example .env
# Edit .env with your credentials
nano .env

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

bash
cd apex
cp .env.example .env
# Edit .env with your credentials
nano .env

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

bash
cd apex
cp .env.example .env
# Edit .env with your credentials
nano .env

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/apex.mjs price BTC

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/apex.mjs price BTC

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/apex.mjs price BTC

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/apex.mjs price BTC

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/apex.mjs price BTC

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/apex.mjs price BTC

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/apex.mjs price BTC

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/apex.mjs price BTC

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/apex.mjs price BTC

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/apex.mjs price BTC

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/apex.mjs price BTC

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/apex.mjs price BTC

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/apex.mjs price BTC

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/apex.mjs price BTC

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

This script adds an external market-scanning and signal-generation capability that is materially broader than the stated ApeX skill purpose of trading, monitoring balances, positions, and related account activity. In a trading skill context, hidden or undocumented strategy logic is dangerous because it can steer downstream trade execution based on unaudited third-party data, creating unauthorized financial decision support and expanding the attack surface beyond account operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The market-buy, market-sell, limit-buy, and limit-sell commands directly submit authenticated live orders as soon as the command is invoked, with no confirmation gate, dry-run mode, or explicit acknowledgement of risk. In a skill specifically designed for trading perpetual futures, this is especially dangerous because accidental invocation, argument misparsing, prompt injection via upstream agent workflows, or user misunderstanding can immediately create real financial exposure and losses.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The cancel-all command performs an irreversible destructive trading action immediately against either all open orders or all orders for a symbol, without any warning or confirmation. In the context of an ApeX trading skill, this can disrupt active strategies, remove protective exits, and expose positions to unmanaged market risk if triggered accidentally or through an unsafe agent chain.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: ws==3.3.3 — 2 advisory(ies): CVE-2024-37890 (ws affected by a DoS when handling a request with many HTTP headers); CVE-2026-48779 (ws: Memory exhaustion DoS from tiny fragments and data chunks)

High
Category
Supply Chain
Confidence
90% confidence
Finding

ws 3.3.3 has known denial-of-service issues involving header handling and fragmented frames. Trading connectors often maintain long-lived WebSocket connections for market data and order events, making this more operationally dangerous because a remote peer or intermediary could exhaust memory or crash the process.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: axios==1.13.5 — 16 advisory(ies): CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more

High
Category
Supply Chain
Confidence
88% confidence
Finding

axios 1.13.5 is flagged with multiple advisories including SSRF- and redirect/proxy-related issues. This trading skill is network-heavy and likely communicates with exchange and blockchain endpoints, so an HTTP client weakness can expose credentials, reroute requests, or enable internal network access if attacker-influenced URLs or proxy settings are used.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: bigint-buffer==1.1.5 — 1 advisory(ies): CVE-2025-3194 (bigint-buffer Vulnerable to Buffer Overflow via toBigIntLE() Function)

High
Category
Supply Chain
Confidence
80% confidence
Finding

bigint-buffer 1.1.5 is reported vulnerable to a buffer overflow in toBigIntLE(). In a crypto/trading connector that handles binary encodings and large integer conversions, memory corruption or process crashes from malformed input are more concerning than in a non-crypto app.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: lodash==4.17.23 — 2 advisory(ies): CVE-2025-13465 (lodash vulnerable to Prototype Pollution via array path bypass in `_.unset` and ); CVE-2021-23337 (lodash vulnerable to Code Injection via `_.template` imports key names)

High
Category
Supply Chain
Confidence
87% confidence
Finding

lodash 4.17.23 has known prototype-pollution and template-related risks. In a service that processes API responses, configs, or user-supplied objects, prototype pollution can lead to logic compromise, unsafe property resolution, or enable exploitation of other libraries.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.