T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:89- Finding
Cross-Session History Access and Forwarding Lacks Explicit Authorization Controls
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:89-95,SKILL.md:131-137,SKILL.md:169-176; equivalent workflows appear inREADME.md:41-47,README.md:51-57, andREADME.md:78-84
Vulnerability Type: Missing authorization and data-transfer safeguards for session history
Risk Level: MediumVulnerable Code Snippets
Session history, including tool-call information, can be retrieved directly:
bash sessions_history --sessionKey agent:main:main --limit 50 sessions_history --sessionKey agent:main:main --limit 30 --includeTools=trueThe documentation also instructs users to capture a transcript and pass the resulting history to another session:
bash history=$(sessions_history --sessionKey agent:main:main --limit 20) sessions_send --label <destination-label> --message <context-message> "$history"Technical Analysis
The skill is specifically designed to enumerate sessions, retrieve their transcripts, and send historical content to another session. The documented workflow does not require verification that the caller owns or is authorized to access the source session. It also does not define a destination allowlist, recipient validation, sensitivity classification, redaction step, content preview, or explicit confirmation before transmission.
The
--includeTools=trueoption increases the exposure risk because tool traces can contain internal paths, command output, operational metadata, credentials accidentally included in tool arguments, or other sensitive context not intended for another recipient.Retrieved transcripts must also be treated as untrusted data. Historical messages could contain prompt-injection instructions. Importing them into another agent session without clearly delimiting them as inert quoted material may cause the receiving agent to interpret historical instructions as current commands.
The issue is an access-control and least-privilege weakness in t ...[truncated 1782 chars]
- Remediation
View remediation
Remediation Suggestions
- Require the platform to verify that the caller is authorized to read the specified source session and send content to the selected destination.
- Restrict access by default to sessions owned by the current user or agent. Require an explicit policy grant for group, channel, subagent, cron, or other users' sessions.
- Require an explicit confirmation step that displays the source session, destination session, amount of history, and whether tool traces will be included.
- Default
includeToolstofalse. Permit tool-trace retrieval only when necessary and separately authorized. - Scan and redact credentials, authentication tokens, personal data, private keys, internal URLs, local paths, and other sensitive values before displaying or forwarding history.
- Use a preview-and-approve workflow rather than directly passing the complete output of
sessions_historyintosessions_send. - Apply destination allowlists and prevent label-based routing unless the label resolves unambiguously to an authorized destination.
- Mark imported transcripts as untrusted quoted data. Instruct receiving agents not to execute or follow instructions embedded in historical content.
- Limit retrieval by message count, time range, and content type according to the minimum information required for the task.
- Record source, destination, caller identity, retrieval options, redaction results, and confirmation state in tamper-resistant audit logs.
