T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:38- Finding
Unnecessary Filesystem Write and Command Execution Permissions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 38–45
Vulnerability Type: Excessive tool permissions and ambiguous duplicate permission declarations
Risk Level: MediumVulnerable Code
yaml tools: - - read - exec homepage: https://skillhub.cn pricing_tier: "L1-入门级" pricing_model: per_use suggested_price: "9.9 CNY/per_use" tools: ["read", "write", "exec"]Technical Analysis
The Skill declares
read,write, andexeccapabilities even though it identifies itself elsewhere as a pure Markdown instruction guide that does not require command-line execution. JSON formatting and design guidance do not inherently require unrestricted filesystem modification or command execution.The
toolsproperty is also declared twice. Duplicate YAML keys have parser-dependent behavior: some parsers retain the first value, others retain the last, and strict parsers may reject the document. A parser retaining the final declaration would expose all three tools, includingwriteandexec.This violates least-privilege principles. Although the reviewed file contains no malicious executable payload, granting these unnecessary capabilities increases the impact of malicious or untrusted instructions encountered while the Skill is active.
Attack Path
- An agent loads the Skill metadata.
- Its YAML parser resolves the duplicate
toolskeys, potentially selecting the final declaration. - The platform grants the Skill access to filesystem reads, filesystem writes, and command execution.
- Untrusted task content or later injected instructions direct the agent to invoke those tools.
- The agent may read accessible local information, modify files, or execute commands under the privileges of the hosting process.
This path depends on the host platform using the metadata to authorize tools and on attacker-controlled instructions reaching the agent; the audited Skill does not itself contai ...[truncated 603 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the duplicate
toolsdeclarations and define the property only once. - Remove
writeandexec, because the documented functionality is a Markdown-based JSON guidance resource and does not require them. - If platform metadata requires a tool declaration, specify only the narrowest capability genuinely needed, such as read-only access to explicitly approved input.
- Enforce tool permissions independently at the platform level rather than trusting Skill metadata alone.
- Validate the front matter with a strict YAML parser or schema that rejects duplicate keys.
- Remove the unrelated recommendation to run
pingatSKILL.md:262, because the Skill has no documented network operation and does not need command execution. - Add automated checks that reject Markdown-only Skills requesting filesystem-write or command-execution capabilities without a documented and reviewed justification.
- Remove the duplicate
