T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:1- Finding
Unnecessary Shell Access Violates Least-Privilege Requirements
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 1-5
Vulnerability Type: Excessive tool permissions
Risk Level: MediumVulnerable Code
yaml --- name: cca-quiz description: CCA 模拟测验,12道场景题覆盖全部5个领域。当用户说"CCA测验"、"模拟考试"、"cca quiz"、"测试CCA水平"时使用。 allowed-tools: Read, Bash ---Technical Analysis
The skill grants access to both
ReadandBash, although its documented function is limited to presenting a static 12-question quiz, evaluating answers, and reporting scores. All quiz questions, answers, and scoring instructions are embedded directly inSKILL.md; no shell execution or additional filesystem reads are required.Bashprovides a general-purpose command-execution channel. Depending on the host sandbox and process privileges, it can execute programs, inspect local files, modify accessible resources, and initiate network requests through installed command-line utilities. Granting this capability without a functional requirement violates the principle of least privilege and unnecessarily expands the consequences of prompt injection or future unsafe modifications to the skill.The file does not instruct the agent to invoke Bash, and the audited package contains no scripts or payloads. Therefore, this finding identifies an exposed capability rather than evidence that commands are currently being executed maliciously.
Attack Path
- A user invokes the quiz skill, causing it to operate with the declared
Bashpermission. - Attacker-controlled conversational content or a future modification introduces instructions that induce an unintended tool call.
- Because Bash is already authorized, the agent may execute a shell command rather than being blocked by the tool allowlist.
- The command can act with the filesystem, process, and network access available to the hosting agent.
- Accessible local information could be read or altered, or additional commands could be launched, subject to the host's sandbox and operatin ...[truncated 773 chars]
- A user invokes the quiz skill, causing it to operate with the declared
- Remediation
View remediation
Remediation Suggestions
- Remove
Bashfrom the skill'sallowed-toolsdeclaration. - Remove
Readas well if the platform does not require it to load the skill definition; the complete quiz content is already embedded in the skill. - Prefer an empty tool allowlist for this purely conversational workflow. For example:
yaml --- name: cca-quiz description: CCA 模拟测验,12道场景题覆盖全部5个领域。当用户说"CCA测验"、"模拟考试"、"cca quiz"、"测试CCA水平"时使用。 allowed-tools: [] ---- If the platform requires
Read, authorize only that tool and restrict it to the skill's own static resources where path-level controls are supported. - Add a review requirement for future permission changes so that each newly authorized tool must have a documented functional justification.
- Enforce host-level sandboxing independently of the skill configuration, including restricted filesystem access, disabled outbound networking where unnecessary, and execution under a minimally privileged operating-system account.
- Remove
