T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:4- Finding
Excessive Shell and Filesystem Permissions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 4
Vulnerability Type: Excessive tool permissions that violate the principle of least privilege
Risk Level: MediumVulnerable Code
yaml allowed-tools: Bash, ReadTechnical Analysis
The skill declares unrestricted
BashandReadtool access even though its stated purpose is to generate Facebook advertising copy and image variations. Its documented workflow only requires clarifying campaign requirements, generating content, creating supporting assets, and refining the result. The explicitly listed APIs arechatandimage_generation.Bashcan provide local command-execution capabilities, whileReadcan expose files available to the agent's runtime identity. Neither permission is shown to be necessary for the documented content-generation workflow. Granting these tools therefore expands the skill's authority beyond its legitimate operational requirements and violates the principle of least privilege.No malicious command, file-reading instruction, or active exploitation payload is present in the audited file. Exploitation would require additional untrusted or unsafe instructions to influence the tool-enabled agent.
Attack Path
- The skill is loaded with the declared
BashandReadpermissions. - The agent processes attacker-controlled campaign text, retrieved content, or another untrusted contextual instruction.
- That content attempts to redirect the agent into invoking one of the unnecessary tools.
- If the agent follows the malicious instruction,
Readcould access files available to the process, orBashcould execute commands under the agent's operating-system identity. - The resulting data could be disclosed through the agent's response, or local resources could be modified within the runtime's permission boundary.
Impact Assessment
Successful exploitation could permit:
- Reading files accessible to the agent process, potentially includin ...[truncated 594 chars]
- The skill is loaded with the declared
- Remediation
View remediation
Remediation Suggestions
- Remove
BashandReadfromallowed-toolsbecause they are not required by the documented advertising-content workflow. - Permit only the capabilities necessary for the skill's stated operation, specifically the approved chat and image-generation interfaces.
- If user-provided assets must be read, grant access only to explicitly selected files or a dedicated sandbox directory rather than exposing general filesystem-reading capability.
- If command execution becomes necessary in a future version, replace unrestricted shell access with a narrowly scoped tool that validates arguments, uses an allowlist of operations, and runs in a sandbox with minimal filesystem and network privileges.
- Add automated validation that compares declared tools with documented workflow requirements and rejects unnecessary high-impact permissions during review.
- Remove
