Back to skill

Security audit

Apex

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real ApeX trading integration, but it can place and cancel live futures orders with weak enforced safeguards.

Only install this if you are comfortable giving the skill ApeX trading authority. Prefer testnet first, use tightly scoped API credentials with withdrawals disabled, avoid exposing a primary seed, review every order before execution, and be especially careful with cancel-all, close-position, and reward-enrollment requests.

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:190
Finding

Signed trading operations accept unvalidated order sizes and prices

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); console.log(JSON.stringify(result, null, 2)); break; } ``` The limit-order path uses the same insufficient validation pattern: ```js case 'limit-buy': case 'limit-sell': { const apexClient = await createPrivateClient(); const symbol = normalizeSymbol(args[1]); const size = args[2]; const price ...[truncated 3194 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/apex.mjs:220
Finding

Documented position-closing workflow can reverse or increase exposure

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/package.json:5
Finding

Sensitive signing operations depend on an alpha SDK and mixed package registries

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
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 also flagged, though with a lower-severity advisory than 6.5.4. Because this skill handles blockchain and cryptographic ecosystems, even lower-severity cryptographic library weaknesses deserve attention, especially where signing or verification is central to operation.

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 40)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 45)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 53)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 59)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 65)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 71)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 84)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 93)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 102)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 108)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 201)May include surrounding context.

md
node scripts/apex.mjs price BTC

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script exposes market-buy, market-sell, limit-buy, and limit-sell commands that immediately submit live orders using configured production credentials, but it provides no confirmation prompt, no explicit dry-run/simulation mode, and no risk acknowledgment before execution. In the context of an agent skill for trading, this is especially dangerous because an upstream agent, prompt injection, user misunderstanding, or malformed parameter could trigger real financial transactions and losses without a final human verification step.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The cancel-all command can cancel every open order, optionally across the entire account, with no confirmation step and no destructive-operation warning. In a trading skill, this can abruptly remove protective or strategic orders due to user error, agent misbehavior, or prompt injection, potentially exposing positions to unmanaged market risk.

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
86% confidence
Finding

ws 3.3.3 is an outdated WebSocket library version with known denial-of-service issues. Since exchange and blockchain tooling often rely on long-lived WebSocket feeds for balances, positions, or market data, an attacker or malicious endpoint could exhaust memory or processing and disrupt trading workflows.

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-related issues. In a trading integration that likely performs outbound API calls to exchanges and blockchain services, HTTP client weaknesses can expose credentials, bypass proxy restrictions, or enable request redirection to attacker-controlled targets.

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
81% confidence
Finding

bigint-buffer 1.1.5 is flagged for a buffer overflow issue in numeric conversion logic. In a crypto/web3-heavy skill, malformed binary or numeric data from external APIs, RPC responses, or encoded transaction material could trigger crashes or memory-safety issues in native-adjacent code paths.

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
85% confidence
Finding

lodash 4.17.23 is flagged for prototype pollution and code-injection-related issues in specific functions. In a skill that may process user parameters, market/order metadata, or API payloads, unsafe use of affected helpers could corrupt application state or, in some patterns, enable more severe exploitation chains.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: form-data==4.0.5 — 1 advisory(ies): CVE-2026-12143 (form-data: CRLF injection in form-data via unescaped multipart field names and f)

High
Category
Supply Chain
Confidence
83% confidence
Finding

form-data 4.0.5 is flagged for CRLF injection via multipart field names and filenames. If any part of the skill uploads files or constructs multipart requests using attacker-controlled field metadata, this can corrupt HTTP requests or smuggle unintended headers/content to downstream services.

Content

No source excerpt is available for this finding.

Possible Typosquatting: 'ext' resembles popular package 'next'

High
Category
Supply Chain
Confidence
70% confidence
Finding

Package name closely resembles a popular package, suggesting possible typosquatting. Attackers publish malicious packages with similar names to trick developers into installing them.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill performs credentialed trading actions and explicitly relies on environment secrets and network access, but it does not declare any tool scope or permission boundaries. In an agent environment, missing scope declarations can allow the skill to be invoked with broader-than-expected capabilities, increasing the risk of unauthorized account access, order placement, or secret exposure.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs the agent to default to reward ID 300001 when the user asks to enroll but does not provide an ID, which creates an implicit state-changing action based on incomplete user input. In a trading skill handling authenticated operations, this can lead to unintended enrollment in promotions or contests the user did not clearly authorize.

Content

No source excerpt is available for this finding.