T09 · Insecure Skill Coding Practices
- Location
SKILL.md:292- Finding
User-Controlled Output Paths Permit Arbitrary File Creation or Overwrite
- Content
View full analysis
config.json - **Microservice project**: The user may specify it in natural language. - **Frontend module generation path**: The user may specify it in natural language. - **Database type**: The user may specify it in natural language. - If the user does not specify these values, read the defaults from `src/config.json`. ``` Related output rules: ```markdown | Type | Path | |------|------| | Backend code | `{microservice.path}/` | | Frontend code | `{frontend.path}/` | | SQL file | Path calculated from `{microservice.path}` and written to `{microservice.name}/db/init.sql` | ``` ### Technical Analysis The Skill explicitly gives natural-language user input priority over configured backend and frontend output paths. It subsequently directs the Agent to create generated Java, React, XML, and SQL files at those destinations. No instruction requires the Agent to: - Restrict destinations to an approved workspace or project root. - Reject absolute user-supplied paths. - reject `..` traversal components. - Resolve and verify canonical paths before writing. - Detect symbolic-link escapes. - Prevent overwriting existing files. - Request confirmation before writing outside the current project. This creates a path-manipulation vulnerability at the instruction level. If an Agent has filesystem-writing tools, a crafted request can redirect generated content into any location writable by that Agent. The generated content could overwrite application source, build configuration, deployment files, or other security-sensitive project artifacts. ### Attack Path 1. An attacker submits an otherwise valid module-generation request. 2. The ...[truncated 1197 chars]- Remediation
View remediation
