T09 · Insecure Skill Coding Practices
- Location
SKILL.md:82- Finding
Unvalidated API download metadata enables server-side request forgery and arbitrary file writes
- Content
View full analysis
0) - Save to a new folder named after the first `## ` heading of the analysis report (strip `## `, replace illegal chars `/ \ : * ? " < > |` with `_`); filename `{id}.{ext}` (ext from download_url, else response Content-Type) ``` ```powershell $enc = [uri]::EscapeDataString($sessionId) $resp = Invoke-RestMethod -Uri "https://ai-chat-global.youcloud.com/aichat/sessions/$enc/materials" -Headers @{Authorization="Bearer $env:YOUCLOUD_API_KEY"} -TimeoutSec 120 foreach ($m in $resp) { Invoke-WebRequest -Uri $m.download_url -OutFile "$folder\$($m.id).mp4" -TimeoutSec 180 } ``` ### Technical Analysis The Skill treats `download_url` and `id` values returned by the remote API as trusted data. No validation restricts `download_url` to HTTPS or to the documented AppGrowing CDN. Consequently, a malicious or compromised API response can instruct the Agent to request an arbitrary address. Depending on network access available to the host, this can produce server-side request forgery against loopback addresses, link-lo ...[truncated 2420 chars]- Remediation
View remediation
