T09 · Insecure Skill Coding Practices
- Location
SKILL.md:128- Finding
Command Injection Through an Unvalidated Application Launch Path
- Content
View full analysis
"` - report success or the exact launcher error ``` The same unsafe launcher pattern is reiterated in `SKILL.md`, lines 273–275: ```text - if access is allowed, prefer a stable Windows launcher shape such as: - `cmd.exe /c start "" ""` - report success or the exact launcher error ``` ### Technical Analysis The skill directs the Agent to interpolate the registry-controlled `launch_path` into a command interpreted by `cmd.exe`. The add and edit workflows permit users to supply or replace this value, but the instructions do not require canonicalization, character validation, shell escaping, or verification that the value refers to a legitimate executable or shortcut. Quoting the value does not provide a sufficient security boundary when the value itself may contain quote characters and Windows command operators. A crafted value can terminate the intended quoted argument and introduce operators such as `&`, causing `cmd.exe` to interpret additional commands. The policy check only determines whether the selected registry entry may be launched. It does not make the command text safe after access has been granted. ### Attack Path 1. An attacker obtains the ability to add or edit an application registry entry. 2. The attacker supplies a crafted `launch_path` containing quote termination and Windows shell metacharacters followed by an additional command. 3. The malicious path is displayed and saved through the registry workflow. 4. An Agent authorized to launch the entry selects it or issues a matching natural-language launch request. 5. The skill constructs `cmd.exe /c start "" ""`. 6. `cmd.exe` parses the injected shell syntax and runs the ap ...[truncated 650 chars]- Remediation
View remediation
`, `%`, `^`, parentheses, and line breaks. ]]>
