Back to skill

Security audit

Dx Terminal Pro

Security checks for vulnerabilities and agentic risk

Overview

This skill is coherent for managing a DX Terminal trading vault, but it gives live financial transaction instructions with weak safety checks around the private key and vault address.

Install only if you trust DX Terminal and are comfortable giving this skill access to a wallet private key that can control real funds. Before using any write action, independently verify the vault address and contract, simulate the transaction, inspect the value and parameters, and avoid exposing a raw private key in shell commands where possible.

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:31
Finding
Unverified Remote Vault Address Used for Signed Mainnet Financial Transactions## Vulnerability Details **File Location**: `SKILL.md`, lines 31 and 115–160 **Vulnerability Type**: Untrusted remote address resolution and unsafe private-key handling **Risk Level**: High ### Vulnerable Code ```sh VAULT_ADDRESS=$(curl -s "https://api.terminal.markets/api/v1/vault?ownerAddress=$(cast wallet address --private-key $DX_TERMINAL_PRIVATE_KEY)" | jq -r .vaultAddress) ``` The remotely returned address is subsequently used as the destination for signed Base mainnet transactions: ```sh cast send "$VAULT_ADDRESS" "updateSettings((uint256,uint256,uint8,uint8,uint8,uint8,uint8))" "(5000,200,3,3,3,3,3)" --private-key "$DX_TERMINAL_PRIVATE_KEY" --rpc-url "https://mainnet.base.org" ``` ```sh cast send "$VAULT_ADDRESS" "addStrategy(string,uint64,uint8)" "Rotate into strongest relative volume while keeping 20% idle ETH for opportunities." "$(( $(date +%s) + 86400 ))" "2" --private-key "$DX_TERMINAL_PRIVATE_KEY" --rpc-url "https://mainnet.base.org" ``` ```sh cast send "$VAULT_ADDRESS" "disableStrategy(uint256)" "1" --private-key "$DX_TERMINAL_PRIVATE_KEY" --rpc-url "https://mainnet.base.org" ``` ```sh cast send "$VAULT_ADDRESS" "depositETH()" --value 0.05ether --private-key "$DX_TERMINAL_PRIVATE_KEY" --rpc-url "https://mainnet.base.org" ``` ```sh cast send "$VAULT_ADDRESS" "withdrawETH(uint256)" "50000000000000000" --private-key "$DX_TERMINAL_PRIVATE_KEY" --rpc-url "https://mainnet.base.org" ``` ### Technical Analysis The destination stored in `VAULT_ADDRESS` is obtained directly from `api.terminal.markets` and then trusted for every state-changing transaction. The documented workflow does not: - Validate that the response is a syntactically valid Ethereum address. - Independently derive the expected vault address. - Verify the address through an authenticated on-chain registry. - Confirm that the returned contract is owned by or associated with the expected wallet. - Check the deployed contract bytecode or implementation. - Confirm the Base chain ID ...[truncated 2543 chars]
Remediation
## Remediation Suggestions 1. **Verify the vault through an authoritative on-chain source** - Resolve the vault using a documented registry or factory contract on Base. - Confirm that the registry associates the vault with the address derived from the user’s wallet. - If deterministic deployment is used, independently calculate the expected vault address. 2. **Validate the remote API response** - Reject empty, null, malformed, zero, or non-checksummed addresses. - Treat the API result as an untrusted hint rather than the source of authority. - Fail closed when the API and on-chain registry disagree. 3. **Verify the target contract** - Confirm the Base chain ID before signing. - Require deployed bytecode at the destination. - Compare the runtime bytecode or implementation against an approved contract version. - Verify proxy implementations and upgrade administrators where proxy contracts are used. 4. **Add transaction safety controls** - Simulate each transaction before broadcasting it. - Display the chain, destination, decoded function, parameters, ETH value, gas estimate, and simulation result. - Require explicit user confirmation for settings changes, strategy changes, deposits, and withdrawals. - Apply configurable transaction-value and slippage limits. 5. **Use a secure signer** - Do not pass raw private keys through command-line arguments. - Use a hardware wallet, encrypted keystore, operating-system keychain, or isolated signing service. - Ensure the signer presents transaction details for approval. - Disable shell tracing and avoid recording commands containing secrets. 6. **Improve failure handling** - Use strict shell behavior and make `curl` fail on HTTP errors. - Validate JSON parsing before assigning `VAULT_ADDRESS`. - Abort transaction execution whenever address verification, contract verification, or simulation fails.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (13)

External Transmission

Medium
Category
Data Exfiltration
Content
## Get Vault Address

`VAULT_ADDRESS=$(curl -s "https://api.terminal.markets/api/v1/vault?ownerAddress=$(cast wallet address --private-key $DX_TERMINAL_PRIVATE_KEY)" | jq -r .vaultAddress)`

## API Reads
Confidence
89% confidence
Finding
This command derives the wallet address from the sensitive private key and transmits the resulting owner address to an external API. Although the private key itself is not directly sent, the skill creates a linkage between a locally held secret and a third-party service, exposing account metadata and trading identity to an external domain.

External Transmission

Medium
Category
Data Exfiltration
Content
### Get Vault Settings

`curl -s "https://api.terminal.markets/api/v1/vault?vaultAddress=$VAULT_ADDRESS"`

Vault settings include:
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### Get Vault Settings

`curl -s "https://api.terminal.markets/api/v1/vault?vaultAddress=$VAULT_ADDRESS"`

Vault settings include:
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### Get Vault Settings

`curl -s "https://api.terminal.markets/api/v1/vault?vaultAddress=$VAULT_ADDRESS"`

Vault settings include:
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### Get Vault Settings

`curl -s "https://api.terminal.markets/api/v1/vault?vaultAddress=$VAULT_ADDRESS"`

Vault settings include:
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### Get Vault Settings

`curl -s "https://api.terminal.markets/api/v1/vault?vaultAddress=$VAULT_ADDRESS"`

Vault settings include:
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### Get Vault Settings

`curl -s "https://api.terminal.markets/api/v1/vault?vaultAddress=$VAULT_ADDRESS"`

Vault settings include:
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### Get Vault Settings

`curl -s "https://api.terminal.markets/api/v1/vault?vaultAddress=$VAULT_ADDRESS"`

Vault settings include:
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### Get Vault Settings

`curl -s "https://api.terminal.markets/api/v1/vault?vaultAddress=$VAULT_ADDRESS"`

Vault settings include:
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### Get Vault Settings

`curl -s "https://api.terminal.markets/api/v1/vault?vaultAddress=$VAULT_ADDRESS"`

Vault settings include:
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### Get Vault Settings

`curl -s "https://api.terminal.markets/api/v1/vault?vaultAddress=$VAULT_ADDRESS"`

Vault settings include:
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### Get Inference Logs

`curl -s "https://api.terminal.markets/api/v1/logs/$VAULT_ADDRESS?limit=50&order=desc"`

Gets the reasoning returned by the trading agent's inference.
Confidence
86% confidence
Finding
This endpoint retrieves inference logs containing the trading agent's reasoning and sends the vault identifier to an external service. In context, these logs may reveal sensitive strategy rationale, behavioral patterns, and potentially proprietary prompts or decision signals, making the transmission more sensitive than ordinary public market-data lookups.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill includes live on-chain commands for deposits, withdrawals, and strategy/settings updates that can directly move funds or materially alter automated trading behavior, but it does not present strong warnings, confirmation requirements, or safety guidance around irreversible financial loss. In the context of a trading-agent skill controlled by a private key, this omission increases the chance that a user or downstream agent executes high-risk mainnet transactions without understanding the consequences.

Static analysis

No suspicious patterns detected.