T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:21- Finding
Overprivileged Tool Access for an HTML Generation Skill
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 21–26
Vulnerability Type: Excessive tool permissions and failure to enforce least privilege
Risk Level: MediumComplete Code Snippet:
yaml tools: - read - exec - write - glob - grepTechnical Analysis
The skill is intended to generate HTML pages, forms, and interactive components, but it requests general command-execution and broad filesystem capabilities. In particular,
execcan allow arbitrary local command execution within the permissions of the hosting agent, whileread,write,glob, andgrepmay permit access to files unrelated to the HTML-generation task.The skill does not define workspace boundaries, permitted file patterns, a command allowlist, prohibited commands, or user-confirmation requirements for side effects. Although the document states that commands execute in a sandbox, it does not specify or enforce the sandbox's boundaries. Security therefore depends entirely on controls supplied by the external agent platform.
This is a least-privilege violation rather than evidence that malicious commands are currently embedded in the package. The package contains only
SKILL.md, and the audited content does not contain an executable payload, persistence mechanism, credential-theft command, or remote payload download instruction.Attack Path
- An attacker supplies a crafted page description or other HTML-generation input containing instructions to inspect local files or run a command.
- The skill is loaded with its declared
read,glob,grep,write, andexeccapabilities. - If the host agent follows the injected request and lacks independent path or command restrictions, it searches or reads files outside the intended project workspace.
- The agent may then modify accessible files or execute attacker-selected commands under the host process's operating-system privileges.
- The resulting scope i ...[truncated 941 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
execunless command execution is essential to a clearly documented workflow. - Replace broad filesystem tools with APIs restricted to a dedicated project workspace or output directory.
- Limit reads and searches to explicit file extensions and paths required for HTML development.
- Limit writes to newly generated HTML, CSS, JavaScript, and approved asset files; reject path traversal and writes through symbolic links.
- If command execution must remain available, enforce a strict allowlist of commands and arguments rather than accepting shell command strings.
- Run permitted commands without a shell and reject metacharacters, command substitution, redirection, and pipelines.
- Require explicit user confirmation before executing commands, overwriting files, accessing files outside the active project, or making network requests.
- Execute the skill in a sandbox with a minimal environment, no unnecessary credentials, restricted network access, and an unprivileged operating-system account.
- Document concrete trust boundaries, including allowed paths, commands, network destinations, and maximum execution duration.
- Treat page descriptions and generated content as untrusted data, and explicitly instruct the agent not to interpret embedded content as authorization to use privileged tools.
- Remove
