T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:33- Finding
Overbroad Access to Other Agents' Session Histories
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 33-35
Vulnerability Type:T05: Unauthorized Access and Privilege Escalation
Risk Level: MediumVulnerable Code Snippet:
markdown ### 3. 备用验证 如果 `sessions_send` 返回超时,使用 `sessions_history` 检查目标 Agent 的会话历史,确认消息是否已送达。English translation: If
sessions_sendtimes out, usesessions_historyto inspect the target Agent's session history and confirm whether the message was delivered.Technical Analysis
The Skill instructs the monitoring Agent to read another Agent's session history whenever a communication test times out. This exceeds the minimum permissions needed to determine message-delivery status. Session histories can contain unrelated user conversations, task data, credentials, or other sensitive context.
The instruction does not require explicit user consent, restrict the query to messages generated during the current test, require a unique test identifier, or prohibit the monitoring Agent from processing or disclosing unrelated records. A delivery-status API or narrowly scoped acknowledgment mechanism would satisfy the stated purpose without exposing historical conversation content.
Attack Path
- A user invokes the Agent communication-monitoring Skill.
- The Skill sends a test message to a predefined target Agent through
sessions_send. - The request times out, whether because of an actual delay, an unavailable Agent, or intentionally induced nonresponse.
- The timeout activates the documented fallback to
sessions_history. - The monitoring Agent gains access to the target Agent's session records.
- Unrelated sensitive records may enter the monitoring Agent's context and could subsequently influence its behavior, appear in a report, or be persisted in diagnostic records.
Impact Assessment
Successful exploitation can expose cross-Agent conversation data beyond the communication test's legitimate scope. The ...[truncated 462 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the
sessions_historyfallback and use a dedicated delivery-receipt or message-status API that returns only delivery metadata. - If session-history access is unavoidable, require explicit user authorization before accessing another Agent's records.
- Generate a unique random identifier for each test and retrieve only messages matching that identifier.
- Restrict queries to the target session and a narrow time window beginning at the test timestamp.
- Process only sender, timestamp, delivery status, and matching acknowledgment metadata; do not retrieve or report unrelated message bodies.
- Enforce access controls so the monitoring Agent cannot inspect sessions outside an approved allowlist.
- Ensure reports,
MEMORY.md, andHEARTBEAT.mdcontain only Agent identifiers, timestamps, response times, and status codes—not conversation content. - Add audit logging for every cross-Agent history query, including the requesting identity, authorization basis, target session, time range, and fields accessed.
- Remove the
