subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# ---------------- 浏览器交互 ---------------- def _run(args, timeout=300): p = subprocess.run([CLI] + args, capture_output=True, text=True, encoding="utf-8", errors="replace", cwd=HERE, timeout=timeout) return (p.stdout or "") + (p.stderr or "")- Confidence
- 98% confidence
- Finding
- This subprocess invocation executes an external binary chosen from the QQB_CLI environment variable. Although shell injection is avoided by passing an argument list, an attacker who can influence the environment or deployment can replace the intended helper with a malicious executable and gain arbitrary code execution in the user's context.
