T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- SKILL.md:27
- Finding
- Overbroad Persistent Context Access and External Telegram Disclosure<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 27-31, 35-38, and 64-68 **Vulnerability Type**: T05: Unauthorized Access and Privilege Escalation **Risk Level**: Medium ### Complete Code Snippet ```markdown ## What It Does 1. Reads your TASKS.md for pending items 2. Reads any memory files (MEMORY.md, projects.md, recent notes) 3. Checks for any urgent blockers or time-sensitive items 4. Synthesizes the top 3 priorities for today 5. Sends a punchy Telegram message you can act on immediately ``` ```markdown ### Step 1: Load Context Read all context files in parallel: - `$TASKS_FILE_PATH` — pending tasks - `{MEMORY_DIR}/MEMORY.md` — long-term context - `{MEMORY_DIR}/projects.md` — active projects (if exists) ``` ```bash curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ -H "Content-Type: application/json" \ -d "{\"chat_id\": \"${TELEGRAM_CHAT_ID}\", \"text\": \"[MESSAGE]\"}" ``` ### Technical Analysis The skill instructs the agent to read complete long-term memory and project files in addition to the task file. This is broader than the minimum access needed to create a daily task briefing. The resulting summary is then transmitted to the Telegram Bot API. No content allowlist, secret-redaction stage, data-classification check, or user confirmation step is specified. Consequently, credentials, private notes, client information, personal data, or unrelated persistent context could be selected as a priority, blocker, or pipeline status and included in the outgoing message. The Telegram delivery feature is declared, so the external communication itself is not hidden. The security issue is the combination of broad persistent-context access and insufficient controls over which portions may leave the local environment. ### Attack Path 1. Sensitive or attacker-influenced information is placed in `MEMORY.md`, `projects.md`, recent notes, or the configured task file. 2. The skill reads the complete contex ...[truncated 1098 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Default to reading only the configured `TASKS_FILE_PATH`. 2. Require explicit configuration and user approval before reading `MEMORY.md`, `projects.md`, or recent notes. 3. Permit only specific approved sections or fields rather than processing complete files. 4. Add a mandatory redaction stage for API keys, tokens, passwords, personal data, client information, and other sensitive values. 5. Generate a local preview and require confirmation before the first transmission or whenever the destination changes. 6. Validate `TELEGRAM_CHAT_ID` against an administrator-approved value rather than accepting an unrestricted environment variable. 7. Document exactly which data categories may be sent to Telegram and exclude unrelated persistent context. 8. Store and process the bot token through an appropriate secret-management mechanism, with restrictive process and environment access. ]]>
