T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- SKILL.md:4
- Finding
- Overbroad Agent Tool Permissions Violate Least Privilege<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:1-5` **Vulnerability Type**: Excessive agent capabilities **Risk Level**: Medium ### Vulnerable Code ```yaml --- name: cross-disciplinary-bridge-finder description: Use when identifying collaboration opportunities across fields, finding experts in complementary disciplines, translating methodologies between scientific domains, or building interdisciplinary research teams. Identifies synergies between scientific disciplines, matches researchers with complementary expertise, and facilitates cross-domain collaborations. Supports interdisciplinary grant applications and innovative research team formation. allowed-tools: "Read Write Bash Edit" license: MIT ``` ### Technical Analysis The skill requests unrestricted `Read`, `Write`, `Bash`, and `Edit` capabilities. The implemented functionality is an offline knowledge-graph analysis CLI that generates output and optionally writes it to a user-selected file. It does not require general-purpose source editing or unrestricted shell and filesystem access. Granting capabilities beyond those necessary for the task violates the principle of least privilege. In an agent environment, `Bash` may permit arbitrary process execution with the operating-system privileges of the agent, while `Read`, `Write`, and `Edit` may expose or modify files outside the skill directory if the host does not enforce additional sandboxing. No malicious instruction in the audited package currently attempts to abuse these permissions. The risk arises because the broad permission declaration unnecessarily expands the effect of any future compromised skill content, injected contextual instruction, or downstream agent-control failure. ### Attack Path A conditional exploitation path is: 1. A user activates the skill, making the declared tools available to the agent. 2. Attacker-controlled content is introduced through conversation context, external task data, or a future modificati ...[truncated 1027 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove `Edit` because the skill does not need to modify source files. 2. Remove unrestricted `Read` if all required data is embedded in the executable. 3. Replace general-purpose `Bash` with a narrowly scoped execution capability that can invoke only `scripts/main.py`. 4. Restrict output writes to an explicit, user-approved output directory. 5. Require confirmation before overwriting an existing file. 6. Enforce host-level command allowlisting, path canonicalization, filesystem sandboxing, and network isolation rather than relying solely on prompt instructions. 7. If the platform supports granular declarations, use a minimal configuration equivalent to: - Execute the designated CLI only. - Write newly generated reports only. - Deny arbitrary source edits and unrelated file access. ]]>
