T09 · Insecure Skill Coding Practices
Warning
- Location
SKILL.MD:40- Finding
Unsanitized Story Title Used as an Output Filename
- Content
View full analysis
.png ``` The unsafe data flow is repeated in the procedure at lines 72–89: ```markdown 5. Read latest TXT file from: E:\AI\openclaw-tpt\input\TXT\ - Extract TITLE (first line) - Extract STORY CONTEXT (remaining content) 6. Fill the TITLE field in the tool. 7. Fill STORY CONTEXT field. 8. Click "Generate Cover". 9. Wait for generated image preview to appear. 10. Download generated image. 11. Save image to: E:\AI\openclaw-tpt\output\COVER\ Filename: .png ``` ### Technical Analysis The skill treats the first line of the latest TXT file as an untrusted `TITLE` and directly reuses it as the downloaded image's filename. No instruction requires validation, basename extraction, canonicalization, length limits, reserved-name checks, or destination containment verification. On Windows, a crafted title may contain path separators, traversal components such as `..\`, drive or UNC path syntax, control characters, trailing dots or spaces, or reserved device names. Depending on how the browser automation implements the save operation, these values may cause the generated file to be written outside the intended `output\COVER` directory, overwrite an existing PNG, or make the workflow fail. Browser-level filename normalization may limit exploitation in some implementations, but the skill itself does not establish or verify that protection. ### Attack Path 1. An attacker or untrusted ...[truncated 1348 chars]- Remediation
View remediation
