T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:16- Finding
Unnecessary Arbitrary Command-Execution Permission
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 16-23
Vulnerability Type: Excessive tool permissions and ambiguous duplicate configuration
Risk Level: Mediumyaml tools: - - read - exec homepage: https://skillhub.cn pricing_tier: L3 pricing_model: per_use suggested_price: 29.9 tools: ["read", "write", "exec"]Technical Analysis
The skill declares unrestricted
execaccess even though its documented purpose is limited to reading, writing, and validating JSON Canvas files. These operations do not inherently require arbitrary operating-system command execution.Granting
execviolates the principle of least privilege by exposing a general command-execution channel that is substantially more powerful than the skill's legitimate functionality. The file also defines thetoolskey twice. YAML parsers may retain the first value, retain the last value, or reject duplicate keys, making the effective permissions ambiguous across platforms. Under either listed configuration,execremains available.The document contains no executable implementation or direct malicious command. Exploitation therefore depends on the hosting agent granting the declared capability and subsequently processing an unsafe instruction or attacker-controlled input.
Attack Path
- An agent platform loads
SKILL.mdand interprets one of the duplicatedtoolsdeclarations. - The platform grants the skill access to the
exectool. - The skill processes user-controlled or otherwise untrusted content during a Canvas operation.
- Malicious or unsafe instructions induce the agent to invoke
execrather than limiting activity to structured file operations. - The resulting command executes with the operating-system privileges and environmental access available to the hosting agent.
Impact Assessment
Successful exploitation could permit command execution with the privileges of the agent process. Dep ...[truncated 501 chars]
- An agent platform loads
- Remediation
View remediation
Remediation Suggestions
- Remove
execfrom the declared tool set and retain only the minimum capabilities needed:yaml tools: - read - write - Consolidate the duplicate
toolsentries into one canonical YAML key so permission handling is deterministic. - Restrict read and write access to explicit user-selected
.canvasfiles or a dedicated workspace directory. - Validate file extensions, normalize paths, and reject traversal outside the approved workspace.
- If command execution becomes necessary for a future feature, expose a narrowly scoped operation with a fixed executable and fixed argument schema rather than unrestricted shell access.
- Require explicit user approval for any future command or network operation and run it in a sandbox with minimal filesystem, environment, and network access.
- Add automated metadata validation that rejects duplicate YAML keys and flags tools not justified by the skill's declared functionality.
- Remove
