T09 · Insecure Skill Coding Practices
- Location
scripts/github_download.py:51- Finding
Command Injection Through an Unvalidated Download URL
- Content
View full analysis
`, `<`, and command-grouping syntax can alter the intended command. For example, a URL argument containing a valid-looking URL followed by `& calc.exe` would cause CMD to treat the second portion as another command. The use of GUI keystroke automation does not mitigate command injection. Once the generated string is typed into Windows Run and submitted, it is interpreted with the same semantics as a manually entered CMD command. ### Attack Path 1. An attacker persuades a user or agent to run the `github_download` task with a crafted `--url`. 2. `operations.py` passes the value to `github_download.execute()`. 3. The value is inserted into `cmd.exe /c start "" {github_url}` without validation or quoting. 4. `pyautogui` types the resulting string into Windows Run. 5. Windows invokes `cmd.exe`, which interprets embedded metacharacters. 6. The attacker-supplied additional command executes with the privileges of the user running the Skill. ### Impact Assessment Successful exploitation permits arbitrary command execution under the current desktop user's account. Depending on that user's permissions, an attacker could read or modify user-accessible ...[truncated 248 chars]- Remediation
View remediation
