T05 · Unauthorized Access and Privilege Escalation
- Location
references/行业适配规则.md:582- Finding
Overbroad Access to Agent Memory and Workspace Documents
- Content
View full analysis
Vulnerability Details
File Location:
references/行业适配规则.md, lines 582 and 590
Vulnerability Type: Least-privilege violation through access to unrelated memory and workspace files
Risk Level: MediumVulnerable Snippet
markdown | **企迈数店** | 应用商店搜索或官网 | 已做深度调研(36功能入口,60+截图),参见 memory/2026-05-02.md |markdown 1. 优先查阅已有调研报告(workspace中的竞品分析文档)The first instruction directs the agent to consult a dated file in persistent memory. The second instructs it to search broadly for competitive-analysis documents in the workspace rather than limiting access to files explicitly supplied or approved by the user.
Technical Analysis
A PRD-review skill ordinarily needs access only to the PRD and related materials selected by the user. These instructions expand that scope to persistent agent memory and unspecified workspace content.
Because neither instruction establishes an approved root directory, an explicit allowlist, file sensitivity checks, or per-file user authorization, the skill may cause unrelated material to enter the model context. Persistent memory and workspace files can contain private conversation context, confidential business research, customer data, internal documents, or credentials.
This is an access-control and least-privilege issue. The audited text does not instruct the agent to modify memory, elevate operating-system permissions, or transmit retrieved information to an external party.
Attack Path
- A user invokes the skill to review a restaurant-system PRD.
- The competitive-analysis phase is activated.
- Following line 582, the agent attempts to read
memory/2026-05-02.md. - Following line 590, the agent may search the wider workspace for competitive-analysis documents.
- Unrelated or sensitive content from those sources enters the agent's context.
- That content may influence the review or be reproduced in an internal report, patch, or other generated output.
The path depends on the host exposing ...[truncated 854 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the direct reference to
memory/2026-05-02.md. - Replace broad workspace discovery with an explicit allowlist of user-approved files.
- Restrict reads to the current PRD project directory by resolving and validating canonical paths before access.
- Require explicit user confirmation before reading any file not supplied with the current request.
- Reject paths that escape the approved root through absolute paths, symbolic links, or
..traversal. - Record every supplementary source used, including its path and the user's authorization.
- Add a rule prohibiting access to persistent memory, conversation archives, credential files, environment files, and unrelated projects.
- Prefer wording such as: “Use only competitive-analysis documents explicitly attached or identified by the user for this review.”
- Remove the direct reference to
