subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
""" try: result = subprocess.run( [self._get_venv_python(), "-c", code], capture_output=True, text=True, timeout=300, cwd=AI_MODEL_TEAM_DIR- Confidence
- 95% confidence
- Finding
- This subprocess executes dynamically generated Python code that interpolates user-influenced values such as `symbol` and `bar` directly into a `python -c` source string. An attacker who can control those values can break out of the quoted literals and inject arbitrary Python code in the child process, leading to arbitrary code execution with the privileges of the running agent.
