T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:22- Finding
Excessive Tool Permissions and Privilege-Elevation Guidance
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 22–25; related behavior descriptions at lines 302 and 314
Vulnerability Type: T05: Unauthorized Access and Privilege Escalation
Risk Level: Mediumyaml tools: - read - exec - writeTechnical Analysis
The skill declares filesystem reading, filesystem writing, and command-execution capabilities even though its documented primary function is converting Markdown into Feishu Block structures. That conversion does not inherently require arbitrary system-command execution or unrestricted filesystem access.
The risk is reinforced by later documentation that advertises system-command execution and recommends elevated execution when permissions are insufficient. The project provides no executable implementation, command allowlist, argument validation rules, path restrictions, or enforceable sandbox policy demonstrating that these powerful capabilities are constrained.
This violates the principle of least privilege. In an agent environment that grants tools based on this declaration, untrusted document content or workflow parameters could reach unnecessarily powerful operations. No concrete malicious command, automatic elevation mechanism, or active exploit was found, so this is classified as a medium-risk permission-design issue rather than confirmed malicious execution.
Attack Path
- An agent loads the skill and grants the declared
read,write, andexeccapabilities. - An attacker supplies crafted Markdown, a malicious file path, or workflow parameters containing command-like or path-manipulation content.
- The agent uses the broadly declared tools while processing that attacker-controlled input.
- If command arguments or file paths are not strictly validated by the hosting agent, the input may influence command execution or filesystem operations.
- During troubleshooting, the documented privilege-elevation recommendation may lead a ...[truncated 968 chars]
- An agent loads the skill and grants the declared
- Remediation
View remediation
Remediation Suggestions
- Remove
execfrom the declared tools unless command execution is essential to a specifically documented feature. - Remove
writeif the skill only needs to return generated Feishu Block JSON to the caller. - If file access is necessary, restrict reads and writes to caller-approved input files and a dedicated output directory.
- Remove the recommendation to run the workflow as an administrator. Permission failures should instead be resolved by granting narrowly scoped access to the required file or directory.
- If command execution is retained, define an exact executable and subcommand allowlist rather than accepting arbitrary shell commands.
- Pass validated arguments directly to process APIs without invoking a shell, and prohibit command interpolation, redirection, pipelines, and user-controlled environment variables.
- Canonicalize and validate all paths, reject traversal outside approved directories, and prevent following untrusted symbolic links.
- Run the skill as a dedicated non-privileged account in an enforceable sandbox with network and filesystem restrictions.
- Require explicit user approval before every command execution or write outside the designated workspace.
- Add tests covering command injection, path traversal, symbolic-link attacks, unsafe overwrite behavior, and attempted access outside approved directories.
- Remove
