subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
cmd = [asr_bin, model_dir, str(wav_path)] print(f" 转录: {wav_path.name}...") try: result = subprocess.run(cmd, capture_output=True, text=True, timeout=900) except subprocess.TimeoutExpired: raise TranscriptionError(f"转录超时 (900s): {wav_path.name}") if result.returncode != 0:- Confidence
- 81% confidence
- Finding
- The ASR binary path is influenced by CLI arguments or environment/config and then executed as a subprocess. If an attacker can control QWEN3_ASR_BIN, config, or invocation parameters in the agent environment, they can cause execution of an arbitrary local program under the agent's privileges.
