subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
""" try: result = subprocess.run( [str(PYTHON_BIN), "-c", tts_script], capture_output=True, text=True, timeout=30 )- Confidence
- 93% confidence
- Finding
- The handler builds a Python script string containing user-controlled reply text and executes it via `python -c`. Although `repr(text)` reduces trivial code injection risk, this design still routes untrusted content into dynamically generated code execution, creating an unnecessary and dangerous execution boundary that could become exploitable through quoting, interpreter, or downstream library edge cases.
