subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def download_video(video_url): log("2/4 下载视频 (curl) ...") r = subprocess.run(["curl", "-s", "-L", video_url, "-o", "xhs_temp.mp4"], check=True) if not os.path.exists("xhs_temp.mp4") or os.path.getsize("xhs_temp.mp4") < 1024: raise RuntimeError("视频下载失败或文件过小")- Confidence
- 88% confidence
- Finding
- The script downloads a URL derived from remote metadata using curl without validating the scheme, host, or destination. If yt-dlp or the upstream page yields a crafted stream URL, this can trigger server-side request forgery behavior or unexpected local/protocol access from the machine running the skill.
