subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
candidates = [[*shlex.split(command), "auth", "print-access-token"]] for cmd in candidates: try: token = subprocess.check_output( cmd, env=env, text=True,- Confidence
- 83% confidence
- Finding
- The code executes a command derived from the FULCRA_CLI_COMMAND environment variable using subprocess.check_output after shlex splitting. Although shell injection is avoided by not using shell=True, this still permits execution of an attacker-controlled binary or arguments if the environment is influenced, which can lead to arbitrary code execution in the agent context.
