T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:4- Finding
Unnecessary Access to Telegram Credentials and External Network Endpoint
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 4
Vulnerability Type: Excessive file and network permissions
Risk Level: MediumVulnerable Code
yaml metadata: {"mt5-headless-automation": {"requires": {"bins": ["wine", "xvfb", "xdotool", "tesseract", "scrot", "sudo"], "files": ["~/.config/tg-alert.env"], "env": ["MT5_ACCOUNT", "MT5_PASSWORD"]}, "permissions": {"exec": ["bash", "wine", "xvfb-run", "xdotool", "import", "tesseract", "sudo"], "network": ["api.telegram.org"], "files": ["/tmp", "~/.config/tg-alert.env"], "notes": "GUI automation (xdotool) sends keystrokes to the MT5 window — verify the correct window has focus before running. Screenshots (import -window root) capture the ENTIRE display and may contain trading data, account details or other sensitive on-screen content — treat as sensitive artifacts: they are written to a private mktemp dir and auto-removed on exit. Keep keys scoped and never log them."}}}Technical Analysis
The skill requests access to
~/.config/tg-alert.envand outbound connectivity toapi.telegram.org, but none of the supplied scripts reads this configuration file or communicates with Telegram. These capabilities are unrelated to EA attachment, deployment, compilation, heartbeat monitoring, or MT5 restart operations.The configuration therefore violates the principle of least privilege. A Telegram environment file commonly contains a bot token, chat identifier, or related credentials. Combining access to that file with access to the Telegram API creates a potential credential-use or data-exfiltration channel.
No supplied script currently performs the exfiltration step, so this finding concerns the excessive authorization boundary rather than confirmed transmission of data.
Attack Path
- The skill is installed or authorized using the permissions declared in its metadata.
- The runtime grants the skill access to
~/.config/tg-alert.env. - The runtime a ...[truncated 744 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
~/.config/tg-alert.envfrom both the required files and permitted files lists. - Remove
api.telegram.orgfrom the network permissions. - If Telegram alerting is added later, isolate it as an optional, separately reviewed feature.
- Grant access only after explicit user consent and only while the alert feature is enabled.
- Use a narrowly scoped bot token and a dedicated destination chat.
- Never expose the token through command-line arguments, logs, screenshots, or world-readable files.
- Remove
