T09 · Insecure Skill Coding Practices
- Location
SKILL.md:55- Finding
Command Injection Through Untrusted URL, Video Metadata, and Subtitle Content
- Content
View full analysis
" ``` ```powershell # SKILL.md:108-126 # Original node "~/.agents/skills/video-transcript/scripts/make_docx.js" "$tmp\transcript_original.docx" " - Original" "" # Chinese translation node "~/.agents/skills/video-transcript/scripts/make_docx.js" "$tmp\transcript_zh.docx" " - 中文译稿" "" ``` The alternative workflow still interpolates an untrusted title: ```powershell $plain | Out-File -Encoding utf8 "$tmp\content.txt" Get-Content "$tmp\content.txt" -Raw | node "~/.agents/skills/video-transcript/scripts/make_docx.js" "$tmp\transcript_original.docx" "" ``` ### Technical Analysis The documented workflow places user-controlled or remotely controlled values directly into PowerShell command text: - The video URL comes from the user. - The title may come from remote video metadata. - The original transcript can come from remotely hosted subtitles. - The translated transcript is derived from that untrusted subtitle content. Surrounding a substituted value with double quotes is not sufficient when the value itself can contain quotation marks, PowerShell statement separators, subexpressions, or other shell metacharacters. If the agent constructs a textual command by replacing placeholders such as `<URL>`, `<VideoTitle>`, or `<plain_text>`, a malicious value can terminate its quoted argument and introduce additional PowerShell syntax. The stdin-based variant avoids placing the transcript body in an argument, but it continues to place the video title directly into the command. It therefo ...[truncated 1349 chars]- Remediation
View remediation
