Back to skill

Security audit

mt5-httpapi

Security checks for vulnerabilities and agentic risk

Overview

The verdict is benign because the findings appear consistent with a skill that documents calls to a user-deployed MT5 API, but confidence is medium and the scan was partial.

Install only if you intend to use an MT5 API server you trust and understand that the documented capabilities can affect live trades, deployments, terminal settings, and files. Skillspector's scan is partial: although it reports 100% component coverage, reference resolution was incomplete, so the verdict is not a guarantee that every behavior or dependency was verified.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (16)

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 · SKILL.md (reported line 16)May include surrounding context.

md
permissions:
  network: "HTTP(S) requests to the user-provided MT5_API_URL only. They carry the bearer token, account and market queries, trade and terminal instructions, and uploaded files (experts, set files, library archives, MQL5 source). The server forwards technical-analysis requests to its own wickworks container. Use https:// for any non-loopback URL and only self-hosted servers."
  shell: "curl (and optionally jq) against MT5_API_URL."
  filesystem: "Reads local files the user names for upload (.ex5, .set, library zips, backtest .ini) and writes only to output paths the user names (screenshots, tester.ini, backtest reports and logs, compiled .ex5). It never reads config/config.yaml, .env or other repository files for credentials."
user-invocable: true
---

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
**Mutations.** These change a real account or terminal:

- Trading: `POST /orders`, `PUT /orders/<id>`, `DELETE /orders/<id>`, `PUT /positions/<id>`, `DELETE /positions/<id>` and their MCP tools open, modify, cancel and close orders and positions.
- Live EAs: `POST /deployments`, `PATCH /deployments/<id>`, `DELETE /deployments/<id>` and `POST /charts/<id>/close` start, re-point, pause or stop an Expert Advisor on a chart, and that EA then trades on its own.
- Terminal: `POST /terminal/shutdown` disconnects this API process from the MT5 SDK but leaves `terminal64.exe` running. `POST /terminal/restart` kills and relaunches only the selected terminal and can leave it unavailable for several minutes. `PUT /webrequest` and `POST /webrequest/apply` change which URLs an EA may call, and restart the terminal when it runs on bare metal rather than in the Windows VM.
- Files: `PUT` and `DELETE` on `/files/...` and `/compile/files/...` change the terminal's files, and `DELETE /experts/<name>` an

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
**Mutations.** These change a real account or terminal:

- Trading: `POST /orders`, `PUT /orders/<id>`, `DELETE /orders/<id>`, `PUT /positions/<id>`, `DELETE /positions/<id>` and their MCP tools open, modify, cancel and close orders and positions.
- Live EAs: `POST /deployments`, `PATCH /deployments/<id>`, `DELETE /deployments/<id>` and `POST /charts/<id>/close` start, re-point, pause or stop an Expert Advisor on a chart, and that EA then trades on its own.
- Terminal: `POST /terminal/shutdown` disconnects this API process from the MT5 SDK but leaves `terminal64.exe` running. `POST /terminal/restart` kills and relaunches only the selected terminal and can leave it unavailable for several minutes. `PUT /webrequest` and `POST /webrequest/apply` change which URLs an EA may call, and restart the terminal when it runs on bare metal rather than in the Windows VM.
- Files: `PUT` and `DELETE` on `/files/...` and `/compile/files/...` change the terminal's files, and `DELETE /experts/<name>` an

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

Positions

PUT /positions/<id> changes the SL/TP of a live position and DELETE /positions/<id> closes it, fully or partly. Follow the confirmation guardrail in Security & safety, and show the symbol, ticket, current price and the change.

bash
curl -H "Authorization: Bearer $MT5_API_TOKEN" $MT5_API_URL/positions

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
- Always check `retcode`: 10009 = good, anything else = bad
- Use `GET /error` to debug failed trades
- `deviation` = max slippage in points. `POST /orders` has no default (send one for market orders); `DELETE /positions/<id>` defaults to 20
- Leave `type_filling` out unless the user wants a specific policy; the API already picks one the symbol accepts
- Candle `time` is the open time, not close time
- `trade_stops_level` = minimum SL/TP distance from current price in points

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
**Mutations.** These change a real account or terminal:

- Trading: `POST /orders`, `PUT /orders/<id>`, `DELETE /orders/<id>`, `PUT /positions/<id>`, `DELETE /positions/<id>` and their MCP tools open, modify, cancel and close orders and positions.
- Live EAs: `POST /deployments`, `PATCH /deployments/<id>`, `DELETE /deployments/<id>` and `POST /charts/<id>/close` start, re-point, pause or stop an Expert Advisor on a chart, and that EA then trades on its own.
- Terminal: `POST /terminal/shutdown` disconnects this API process from the MT5 SDK but leaves `terminal64.exe` running. `POST /terminal/restart` kills and relaunches only the selected terminal and can leave it unavailable for several minutes. `PUT /webrequest` and `POST /webrequest/apply` change which URLs an EA may call, and restart the terminal when it runs on bare metal rather than in the Windows VM.
- Files: `PUT` and `DELETE` on `/files/...` and `/compile/files/...` change the terminal's files, and `DELETE /experts/<name>` and

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
`POST /terminal/shutdown` disconnects this API process from the MT5 SDK but leaves `terminal64.exe` running. `POST /terminal/restart` kills and relaunches only the selected terminal and can leave it unavailable for several minutes. `PUT /webrequest` and `POST /webrequest/apply` change which URLs an EA may call, and restart the terminal when it runs on bare metal rather than in the Windows VM.
- Files: `PUT` and `DELETE` on `/files/...` and `/compile/files/...` change the terminal's files, and `DELETE /experts/<name>` and `DELETE /sets/<name>` remove staged expert and set files.

**One guardrail for all of them.** Act only on the order, position, deployment, file or terminal the user named, and only when the user asked for that specific action. Before each call, show the resolved details and wait for an explicit yes: for a trade, the symbol, side, volume, price, SL, TP, ticket, account login and the broker URL prefix; for a deployment, the expert, set file, symbol, timeframe and accoun

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
`POST /terminal/shutdown` disconnects this API process from the MT5 SDK but leaves `terminal64.exe` running. `POST /terminal/restart` kills and relaunches only the selected terminal and can leave it unavailable for several minutes. `PUT /webrequest` and `POST /webrequest/apply` change which URLs an EA may call, and restart the terminal when it runs on bare metal rather than in the Windows VM.
- Files: `PUT` and `DELETE` on `/files/...` and `/compile/files/...` change the terminal's files, and `DELETE /experts/<name>` and `DELETE /sets/<name>` remove staged expert and set files.

**One guardrail for all of them.** Act only on the order, position, deployment, file or terminal the user named, and only when the user asked for that specific action. Before each call, show the resolved details and wait for an explicit yes: for a trade, the symbol, side, volume, price, SL, TP, ticket, account login and the broker URL prefix; for a deployment, the expert, set file, symbol, timeframe and accoun

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

Orders

POST /orders, PUT /orders/<id> and DELETE /orders/<id> open, modify and cancel real orders. Follow the confirmation guardrail in Security & safety.

bash
# Place a market order, only after the user confirmed this exact order.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
### Files

**Off unless the operator enabled it** for the terminal. Without it these routes answer `404`. `GET /files/<path>` lists a directory or downloads a file in the terminal's install directory (the directory with `terminal64.exe`), `PUT /files/<path>` uploads one (raw body or a multipart `file` field), `PUT /files/<dir>?extract` unpacks a zip into that directory, and `DELETE /files/<path>` (`?recursive` for a non-empty directory) removes it. `/compile/files/...` does the same on the MQL5 tree `POST /compile` builds against, which is where a shared `.mqh` library goes. The MCP tools are `list_files`, `get_file`, `put_file` and `delete_file`, with `tree` set to `terminal` or `compile`.

The broker credentials (`mt5start.ini`, `Config/accounts.dat`) are never served, and the terminal's executables and Chart Deployments' own files are read-only here. Writes and deletes follow the guardrail in Security & safety: confirm the terminal and the exact path first. Reading files and logs i

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
de technical analysis, history and backtest reports. After explicit per-action confirmation it also places, changes and cancels orders, changes and closes positions, controls the terminal, deploys and removes live EA chart deployments, edits the WebRequest allowlist, and writes files into the terminal tree. It also compiles MQL5 source and runs backtests. Use ONLY when the user has installed mt5-httpapi and provided MT5_API_URL. Never mutate on inferred intent. Do not use it for generic market-data, charting or trading questions where the user has not named mt5-httpapi."
compatibility: "Requires curl and a user-deployed mt5-httpapi instance (jq is optional, used by some examples). MT5_API_URL env var must be set by the user. MT5_API_TOKEN is required whenever the server has auth configured; the agent must obtain it from the MT5_API_TOKEN env var or by asking the user, never by reading repository config files."
metadata:
  author: psyb0t
  homepage: https://github.com/psyb0t/mt5-httpapi

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% 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 45)May include surrounding context.

md
the order twice, and a `"duplicate": true` answer shows the order that already exists.
4. Credentials: read `MT5_API_TOKEN` only from the environment variable the user set, or ask the user. Never read tokens, passwords, server names or login numbers from `config/config.yaml`, `.env` or any other file in the workspace, and never print the token.
5. Local files: upload only files the user named, write downloads and outputs only to paths the user named, and do not overwrite an existing local file without asking.
6. Overwriting an expert a deployment already uses (`?overwrite=true`) replaces the file that deployment loads, so confirm it like a deployment change. Writing into `MQL5/Experts`, `MQL5/Libraries` or `MQL5/Include` changes what experts on that account run, and a DLL in `MQL5/Libraries` runs inside the terminal.

**No auth when `MT5_API_TOKEN`/`api_token` is unset.** Auth is optional server-side (see Setup). With an empty `api_token` the HTTP surface is unauthenticated and anyone

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
`from` and `to` accept three formats (all real UTC): unix seconds (`1700000000`), full datetime `YYYY_MM_DD_HH_MM_SS` (`2024_01_15_14_30_00`), or date-only `YYYY_MM_DD` (midnight UTC).

Capped at `terminal_info().maxbars` rows per request (default 100k, see `GET /terminal`). Symbols auto-select into MarketWatch on first access. Responses are gzipped if the client requests it (`curl --compressed`).

Tick `flags` param: `ALL` (default), `INFO` (bid/ask only, ~10× smaller), `TRADE` (trades only).

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
# "navigator_refresh" must be "ok" before a deployment of a NEW expert can
# attach: on "failed" upload the same file again, on "unavailable" (bare metal)
# the terminal needs a restart first.
curl -H "Authorization: Bearer $MT5_API_TOKEN" \
  -F "expert=@HappyGoldScalp.ex5" "$MT5_API_URL/experts"
curl -H "Authorization: Bearer $MT5_API_TOKEN" \
  -F "set=@gold-m5.set" "$MT5_API_URL/sets"   # returns the parsed inputs

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

bash
# 1. Build INI: NZDJPY M15, last 5 years, open prices only, 5 ms latency.
curl -sS -X POST -H "Authorization: Bearer $MT5_API_TOKEN" \
  -H "Content-Type: application/json" \
  $MT5_API_URL/backtest/build-ini \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

file.

bash
curl -sS -X POST -H "Authorization: Bearer $MT5_API_TOKEN" \
  -H "Content-Type: application/json" \
  $MT5_API_URL/backtest/build-set \
  -d '{