T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:5- Finding
Overprivileged Shell Execution Capability for a Documentation-Only Skill
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 5; related execution guidance at lines 286 and 347
Vulnerability Type: Excessive tool permissions and unnecessary network diagnostics
Risk Level: MediumComplete Vulnerable Code Snippet (line 5):
yaml allowed-tools: read execRelated Guidance (English translation of line 286):
text If required input parameters are missing, ask the user to provide them, then execute a ping command to test network connectivity, inspect firewall and proxy settings, and rerun the command.Related Configuration Description (English translation of line 347):
text Classification: MD+EXEC — a Markdown-based instruction Skill for which some advanced functions require exec to run validation scripts.Technical Analysis
The Skill primarily performs text transformations: generating prompt templates, decomposing tasks, recommending Agent-loop patterns, and defining output schemas. These operations do not inherently require unrestricted operating-system command execution.
Declaring
execas an allowed tool violates the principle of least privilege by exposing a general-purpose command-execution channel to a documentation-oriented Skill. The missing-parameter error path compounds this issue by recommendingping, firewall inspection, and proxy inspection even though absent prompt parameters are not a network-connectivity problem.On an Agent platform that honors
allowed-tools, instructions derived from this Skill or attacker-controlled user input could cause commands to run with the permissions of the Agent process. The package does not contain an explicit malicious command, persistence mechanism, credential-stealing routine, or exfiltration endpoint; therefore, exploitation depends on the surrounding Agent accepting or generating an unsafe command.Attack Path
- An Agent loads
SKILL.mdand grants the Skill access to the declared ...[truncated 1263 chars]
- An Agent loads
- Remediation
View remediation
Remediation Suggestions
- Remove
execfromallowed-toolsand retain only the minimum tool access required for reading Skill documentation:yaml allowed-tools: read - Replace the missing-parameter error path with a non-executable response that only identifies and requests the absent fields.
- Do not run network diagnostics for input-validation failures. Network tests should be reserved for a distinct, explicit troubleshooting workflow initiated or approved by the user.
- If schema validation genuinely requires execution, expose a narrowly scoped validation tool rather than a general shell. The tool should accept structured JSON and a schema, prohibit arbitrary command arguments, and run without network access.
- Run any unavoidable validator in a sandbox with a read-only filesystem, no inherited secrets, no shell expansion, strict CPU and memory limits, and no outbound network access.
- Require explicit user confirmation before host or network diagnostics and maintain an allowlist of permitted diagnostic operations.
- Add automated policy checks that reject documentation-only Skills declaring general-purpose execution permissions without a documented and technically necessary use case.
- Remove
