T05 · Unauthorized Access and Privilege Escalation
- Location
references/mcp-endpoints.md:5- Finding
Hard-Coded Unauthenticated MCP Trading Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a real broker-connected trading skill with disclosed trading behavior, but it publishes an unauthenticated trading endpoint and relies on weak procedural safety controls for potentially live orders.
Review this carefully before installing. Use only a demo or tightly limited broker account unless the MCP server has real authentication, per-operation authorization, and server-side confirmation for every trade. Rotate the published endpoint if it is live, avoid sourcing untrusted .env files, and do not rely on the included risk_manager.py as a hard financial safety control without fixing and testing its loss-limit logic.
references/mcp-endpoints.md:5Hard-Coded Unauthenticated MCP Trading Endpoint
scripts/risk_manager.py:169Documented Hard Position-Loss Limit Fails Open
scripts/risk_manager.py:149Daily-Loss Control Uses Current Equity Drawdown Instead of Daily P&L
scripts/setup.sh:28Arbitrary Shell Execution Through Sourced Environment File
scripts/setup.sh:33Unpinned Global Package Installation and Execution Guidance
The declared description presents a broad automated trading assistant with multiple operational capabilities, including execution and risk workflows. The supplied code chunk has a much narrower purpose: market analysis for a ticker using technical analysis and LSTM prediction, plus fetching account data as context. While this partially aligns with the 'market analysis' aspect of the description and does use an MCP-connected workflow, the code does not substantiate most of the described assistant functionality. This is a description-to-behavior mismatch because the actual implemented behavior is materially narrower than the declared purpose.
The declared description presents a full-featured automated trading assistant with analysis, risk controls, execution, monitoring, and journaling. The supplied code only implements one narrow function: trade journaling/logging. While trade journaling is mentioned in the description, the primary purpose and capabilities of the code chunk are far more limited than the declared skill. There is no evidence of market analysis, position management, portfolio monitoring, news handling, or broker-backed trade execution. The code accesses a Qdrant journaling endpoint through mcporter, which is materially different from the described n8n MCP-based automated hedge fund behavior.
The setup instructions explicitly direct creation and population of a .env file containing user keys. In a skill that also relies on shell access and broker-connected tooling, this increases the risk that secrets are stored locally in plaintext and later exposed through logs, shell commands, mis-scoped tools, or accidental repository inclusion.
cd skills/qstrader
cp .env.example .env # Заполнить свои ключи
bash scripts/setup.sh
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
echo "🔶 QStrader Setup"
echo "=================="
# 1. Проверка .env
if [ ! -f "$SKILL_DIR/.env" ]; then
if [ -f "$SKILL_DIR/.env.example" ]; then
cp "$SKILL_DIR/.env.example" "$SKILL_DIR/.env"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
echo "🔶 QStrader Setup"
echo "=================="
# 1. Проверка .env
if [ ! -f "$SKILL_DIR/.env" ]; then
if [ -f "$SKILL_DIR/.env.example" ]; then
cp "$SKILL_DIR/.env.example" "$SKILL_DIR/.env"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
echo "🔶 QStrader Setup"
echo "=================="
# 1. Проверка .env
if [ ! -f "$SKILL_DIR/.env" ]; then
if [ -f "$SKILL_DIR/.env.example" ]; then
cp "$SKILL_DIR/.env.example" "$SKILL_DIR/.env"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
echo "=================="
# 1. Проверка .env
if [ ! -f "$SKILL_DIR/.env" ]; then
if [ -f "$SKILL_DIR/.env.example" ]; then
cp "$SKILL_DIR/.env.example" "$SKILL_DIR/.env"
echo "✅ Создан .env из шаблона. Заполните свои ключи:"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
echo "=================="
# 1. Проверка .env
if [ ! -f "$SKILL_DIR/.env" ]; then
if [ -f "$SKILL_DIR/.env.example" ]; then
cp "$SKILL_DIR/.env.example" "$SKILL_DIR/.env"
echo "✅ Создан .env из шаблона. Заполните свои ключи:"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
echo "=================="
# 1. Проверка .env
if [ ! -f "$SKILL_DIR/.env" ]; then
if [ -f "$SKILL_DIR/.env.example" ]; then
cp "$SKILL_DIR/.env.example" "$SKILL_DIR/.env"
echo "✅ Создан .env из шаблона. Заполните свои ключи:"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
echo "=================="
# 1. Проверка .env
if [ ! -f "$SKILL_DIR/.env" ]; then
if [ -f "$SKILL_DIR/.env.example" ]; then
cp "$SKILL_DIR/.env.example" "$SKILL_DIR/.env"
echo "✅ Создан .env из шаблона. Заполните свои ключи:"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
echo "=================="
# 1. Проверка .env
if [ ! -f "$SKILL_DIR/.env" ]; then
if [ -f "$SKILL_DIR/.env.example" ]; then
cp "$SKILL_DIR/.env.example" "$SKILL_DIR/.env"
echo "✅ Создан .env из шаблона. Заполните свои ключи:"
source "$SKILL_DIR/.env" executes the .env file as shell code, not just parses key-value pairs. If the .env file is maliciously modified or contains shell substitutions/commands, running setup will execute arbitrary code in the user's environment; in a trading skill with broker-connected infrastructure, that could enable credential theft, system compromise, or unauthorized trading actions.
exit 1
fi
fi
echo "✅ .env найден"
# Загрузить переменные
set -a; source "$SKILL_DIR/.env"; set +a
On failure, the script prints TEST_RESULT, which may include server responses, identifiers, or sensitive account-related error details returned by Get_account_data. In the context of a trading assistant wired to broker-accessible MCP infrastructure, verbose output can leak operational or financial metadata into terminal history, logs, CI output, or shared support captures.
TEST_RESULT=$(mcporter call my-n8n-mcp.Get_account_data 2>&1 || echo "FAILED")
if echo "$TEST_RESULT" | grep -q "error\|FAILED\|ECONNR"; then
echo "❌ Не удалось подключиться к n8n MCP"
echo " Проверьте N8N_MCP_URL в .env"
echo " Ответ: $TEST_RESULT" | head -5
else
echo "✅ Подключение успешно!"
Suspicious Unicode normalization or mixed-script content
The natural-language instructions and usage documentation are presented in Russian throughout the file, but the README does not indicate that the user can choose another language or that the locale restriction is intentional and justified. This can violate language/locale policy when a skill effectively forces one language without opt-in.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
# Если у тебя .skill файл:
mkdir -p ~/.openclaw/workspace/skills/qstrader
tar -xzf qstrader.skill -C ~/.openclaw/workspace/skills/
# Или скопировать папку qstrader/ в skills/
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
# Ecли y тe6я .skill фaйл:
mkdir -p ~/.openclaw/workspace/skills/qstrader
tar -xzf qstrader.skill -C ~/.openclaw/workspace/skills/
# Или cкoпиpoвaть пaпкy qstrader/ в skills/
The README says the agent will request human confirmation before placing orders, but this is described only as policy text and not as an enforced control. In a trading skill with direct broker write endpoints, a non-enforced confirmation step can be bypassed by agent behavior, prompt errors, or integration mistakes, leading to unauthorized live trades.
The skill is described as activating automatically and handling analysis, risk checks, confirmations, and logging based on broad natural-language requests. In the context of broker-connected automation, vague activation boundaries increase the chance of accidental invocation of sensitive workflows, including trade preparation or execution paths.
The README exposes register_new_user and get_access_token endpoints as part of a trading skill even though they are not necessary for the stated market-analysis and trade-execution workflow. Unrelated auth/account endpoints expand the accessible attack surface and may let an agent or operator invoke identity or token flows that were not intended for this skill.
The skill documents use of shell commands, environment files, and broker-connected MCP operations, but does not declare any tool restrictions such as allowed-tools or permissions. In a trading skill, missing scope boundaries is dangerous because an agent may be granted broader shell/env access than necessary and could reach credentials or execute unintended commands during setup or trade workflows.
This markdown file presents the skill title, workflows, and safety instructions entirely in Russian, which can force a specific language on users. The policy allows locale constraints only when they are explicitly justified or when users are given a language/locale choice, neither of which is stated here.
The skill states that any order requires user confirmation, yet later provides direct trade placement commands in the documented workflow. In the context of a broker-connected trading assistant, this inconsistency can lead an agent or operator to place real orders without a reliable confirmation control, creating immediate financial-loss risk.
Suspicious Unicode normalization or mixed-script content
The title and all operational instructions are presented in Russian, with no indication that another language is supported or that the user can opt into this locale. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless clearly justified as region-specific.