subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
print(f"[vbox] ⚠️ Xvfb not responding — restarting on {display}...") # Kill any existing Xvfb subprocess.run( ["pkill", "-9", "-f", f"Xvfb {display}"], capture_output=True )- Confidence
- 86% confidence
- Finding
- The code builds a pkill -f pattern using the untrusted DISPLAY environment value. Although subprocess is called without a shell, pkill interprets the supplied string as a process-match expression, so a crafted DISPLAY value could broaden matching and cause unintended Xvfb processes to be force-killed, creating a denial-of-service condition.
