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
- 85% confidence
- Finding
- The code executes a command taken from the environment variable FULCRA_CLI_COMMAND after parsing it with shlex.split. Although it avoids shell=True, an attacker who can influence the process environment can redirect execution to an arbitrary binary and cause token theft or unexpected code execution in the agent context.
