subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if test_input: # 带输入执行 result = subprocess.run( ['python', temp_file], input=test_input, capture_output=True,- Confidence
- 97% confidence
- Finding
- This code executes attacker-controlled Python source via subprocess.run using the host interpreter, with only a timeout as protection. Because there is no OS/container isolation, privilege dropping, filesystem restriction, or syscall/network control, tested code can read files, spawn processes, exfiltrate data, or interfere with the host environment.
