T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:37- Finding
Unnecessary Command-Execution Capability Violates Least Privilege
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 37–40
Vulnerability Type: Excessive tool permissions
Risk Level: MediumVulnerable Code
yaml tools: - read - write - execTechnical Analysis
The Skill declares access to the
exectool even though its documented purpose is limited to reviewing or generating basic Java code. The documented workflow requires reading Java input and may justify writing generated output, but it does not describe compiling code, running tests, invoking system utilities, or performing any other operation that requires command execution.This unnecessary capability violates the principle of least privilege. If untrusted Java source code or user-controlled content is interpreted as instructions by the hosting Agent, that content could attempt to induce the Agent to invoke
exec. Whether exploitation succeeds depends on the hosting platform's tool-call controls and confirmation policies, but the declared permission unnecessarily exposes a command-execution channel.No malicious command, executable script, remote payload, persistence mechanism, or credential-access behavior was found in the audited project. The finding concerns excessive authorization rather than evidence that commands are currently executed.
Attack Path
- An attacker supplies Java source code or related review input containing adversarial instructions.
- The Skill processes that untrusted content in the Agent's instruction context.
- The adversarial content attempts to persuade the Agent to invoke the declared
exectool. - If the hosting platform does not enforce sufficient confirmation, sandboxing, or command restrictions, the Agent executes a local command with its available process privileges.
- The command may access or modify resources available to the Agent process, subject to operating-system and sandbox restrictions.
Impact Assessment
Successful exploitat ...[truncated 538 chars]
- Remediation
View remediation
Remediation Suggestions
-
Remove
execfrom the declared tool list because it is not required by the documented static-review workflow:yaml tools: - read - write -
Remove
writeas well if the Skill only needs to return review results through the Agent response and does not need to modify project files. -
If compilation or test execution is added later, expose it through a narrowly scoped operation rather than unrestricted shell execution.
-
Run any required Java compiler or test process inside an isolated sandbox with:
- A fixed allowlist of executables and arguments.
- No shell interpolation.
- Restricted filesystem mounts.
- Disabled or restricted network access.
- Resource and execution-time limits.
- Explicit user approval before execution.
-
Treat reviewed source code and file contents as untrusted data. Ensure the hosting Agent does not interpret instructions embedded in source files as authorization to invoke tools.
-
