T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- SKILL.md:165
- Finding
- Over-Privileged Isolated Agent Aggregates and Transmits Sensitive Cross-Session Data<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:165-184` **Additional Location**: `examples/morning-report-cron.json:12` **Vulnerability Type**: Excessive cross-session and personal-data access **Risk Level**: High ### Vulnerable Code ```javascript { schedule: { kind: "cron", expr: "0 8 * * *", tz: "America/Chicago" }, sessionTarget: "isolated", payload: { kind: "agentTurn", model: "haiku", message: `Generate morning report: 1. Query main session: sessions_history('agent:main:telegram:direct:8264585335', limit=50) 2. Read yesterday's memory: memory/YYYY-MM-DD.md 3. Get weather: Austin 78721 4. Check email (gog or himalaya) 5. Check calendar events for today Report format: 📍 WEATHER: [conditions] 🌙 OVERNIGHT: [from session history - what we worked on] 📝 PERSISTENT NOTES: [from memory file] 📧 EMAIL: [urgent only] 📅 CALENDAR: [today's events] 🔗 DASHBOARD: [mission control link] Send to Telegram using message tool. ``` The packaged JSON example contains the same aggregation pattern: ```json "message": "Generate morning report:\n\n1. Query main session history:\n sessions_history('agent:main:telegram:direct:YOUR_USER_ID', limit=50)\n\n2. Read yesterday's memory:\n memory_get('memory/YYYY-MM-DD.md')\n\n3. Get weather:\n Use weather skill for your ZIP code\n\n4. Check email:\n Use gog or himalaya skill\n\n5. Check calendar:\n Use gog skill for today's events\n\nReport format:\n📍 WEATHER: [current conditions + forecast]\n🌙 OVERNIGHT WORK: [highlights from session history]\n📝 NOTES: [from memory file]\n📧 EMAIL: [urgent only]\n📅 CALENDAR: [today's events]\n🔗 DASHBOARD: [your mission control link]\n\nSend to:\n- Telegram: message tool, target=YOUR_USER_ID\n- Email: message tool or direct SMTP" ``` ### Technical Analysis The documented workflow grants an isolated background agent access to several independent sensitive data sources: - Main-session conversation history - Persistent memory files - Email - Cal ...[truncated 2221 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Require explicit, per-source user consent before accessing session history, memory, email, or calendar data. 2. Use a strict tool allowlist for each scheduled task; do not give the isolated agent unrestricted access to every available source. 3. Minimize requested history by using the smallest practical message limit and selecting only relevant messages where supported. 4. Preprocess sensitive sources through deterministic filters rather than giving raw content directly to the reporting agent. 5. Redact credentials, authentication tokens, personal identifiers, financial information, private links, and unrelated message content before transmission. 6. Treat email, calendar entries, session messages, and memory files as untrusted input and prevent instructions found in them from changing tools, recipients, or task scope. 7. Require an explicit destination allowlist and verify recipient ownership before sending any report. 8. Separate data collection from delivery and require approval when a report contains sensitive information. 9. Record auditable logs identifying which sources were accessed and where the resulting report was sent. 10. Prefer locally generated, minimal summaries instead of passing complete raw history to a less-trusted model or isolated session. ]]>
