T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:47- Finding
Unrestricted Resource Discovery Outside the Active Workspace
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 47–53
Vulnerability Type:T05: Unauthorized Access and Privilege Escalation
Risk Level: MediumComplete Code Snippet
markdown ### 读取 plan_source.md 在当前工作空间或指定路径查找 `plan_source.md` 文件: ```text 查找路径优先级: 1. 当前工作空间根目录/plan_source.md 2. 上一级目录/plan_source.md 3. ~/.claude/resources/plan_source.mdtext The resource format may include sensitive environmental metadata: ```markdown ## 可用系统资源 - 当前工作目录路径 - 可访问的API端点Technical Analysis
The Skill explicitly directs the Agent to search for planning resources outside the active workspace. Its fallback locations include the workspace's parent directory and the Agent's home configuration directory at
~/.claude/resources/.This behavior violates least-privilege principles because ordinary task planning does not inherently require access to files belonging to neighboring projects or Agent-level configuration. The instructions do not require explicit user consent, constrain resolved paths to an approved boundary, validate ownership, or filter sensitive content before loading it into the Agent context.
The expected resource format can contain working-directory paths and accessible API endpoints. Consequently, loading an out-of-scope
plan_source.mdcan reveal operational metadata or allow instructions and resource descriptions controlled by another project or user to influence tool selection. No credential theft, network exfiltration, or code execution is explicitly instructed, so the finding is limited to unauthorized cross-boundary discovery and ingestion.Attack Path
- An attacker or another project places a crafted
plan_source.mdin the active workspace's parent directory or the shared Agent resource directory. - A user invokes the Skill for a routine complex task.
- The Agent fails to find
plan_source.mdin the active workspace and follows the documented fallba ...[truncated 1185 chars]
- An attacker or another project places a crafted
- Remediation
View remediation
Remediation Suggestions
- Restrict automatic discovery to
{workspace}/plan_source.md. - Require explicit, informed user approval before accessing a parent directory, home directory, or any path outside the active workspace.
- Resolve paths canonically and verify that they remain beneath an allowlisted workspace root before reading them.
- Reject symbolic links that resolve outside the approved root unless the user specifically authorizes the resolved destination.
- Remove API endpoints, credentials, tokens, and other sensitive operational details from
plan_source.md; store only non-sensitive resource identifiers. - Treat externally sourced resource descriptions as untrusted data rather than executable instructions.
- Record the exact external path to be accessed and present it to the user before requesting approval.
- Apply content filtering and size limits when loading resource files to reduce unintended disclosure and contextual influence.
- Restrict automatic discovery to
