T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:6- Finding
Excessive and Inconsistent Tool Permissions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 6–23
Vulnerability Type: Excessive tool permissions and ambiguous access-control configuration
Risk Level: MediumVulnerable Code
yaml allowed-tools: read exec compatibility: "Requires LLM with tool-use capability" metadata: displayName: "JavaScript规范工具(免费版)" version: "1.0.0" summary: "面向个人开发者的JavaScript代码风格指南,涵盖核心规则与基础代码审查能力。" tags: - "Development" - "Frontend" - "JavaScript" - "代码规范" source: "SkillHub" converted_at: "2026-07-22T17:58:36" tools: - exec - read - write - browserTechnical Analysis
The Skill is presented as a Markdown-based JavaScript style guide and basic code-review assistant. Its normal functionality primarily requires reading source code and returning recommendations. Nevertheless, the configuration declares command-execution, file-write, and browser capabilities.
The two permission declarations are also inconsistent:
allowed-toolsgrantsreadandexec, while the separatetoolslist additionally includeswriteandbrowser. Agent platforms may interpret these fields differently or select the broader declaration. This ambiguity can result in capabilities being exposed beyond those necessary for the stated task.No instructions in the audited file automatically exploit these permissions, and no malicious command or payload was found. The risk arises because the excessive capabilities increase the consequences of hostile user input, prompt injection embedded in reviewed content, or unsafe Agent behavior.
Attack Path
- The Skill is loaded by an Agent platform that honors the
toolslist or otherwise resolves the conflicting declarations in favor of the broader permission set. - An attacker supplies JavaScript, comments, documentation, or another prompt containing instructions intended to influence the Agent.
- The injected instructions req ...[truncated 1335 chars]
- The Skill is loaded by an Agent platform that honors the
- Remediation
View remediation
Remediation Suggestions
- Apply least privilege by retaining only
readfor source-review workflows. - Remove
exec,write, andbrowserunless a documented feature strictly requires each capability. - Consolidate permissions into one authoritative, platform-supported field to eliminate conflicting interpretations.
- If automated formatting is required, expose narrowly scoped formatting operations rather than unrestricted command execution.
- Require explicit user confirmation before any command execution, file modification, or network access.
- Restrict command execution to a fixed allowlist with constant arguments; never concatenate reviewed content or user input into shell commands.
- Limit write access to explicitly selected project files and prevent access outside the workspace.
- Run the Agent in a sandbox with minimal filesystem, process, environment-variable, and network permissions.
- Treat reviewed source code and comments as untrusted data and ensure they cannot override Skill or system instructions.
- Apply least privilege by retaining only
