Tainted flow: 'cmd' from os.environ.get (line 330, credential/environment) → subprocess.run (code execution)
Medium
- Category
- Data Flow
- Content
env.setdefault("PYTHONUTF8", "1") cmd = [*shlex.split(CLI_COMMAND, posix=(os.name != "nt")), *args] try: proc = subprocess.run(cmd, env=env, text=True, capture_output=True, timeout=120) except (FileNotFoundError, subprocess.TimeoutExpired) as exc: return 1, f"CLI invocation failed: {exc}" if proc.returncode != 0:- Confidence
- 93% confidence
- Finding
- The executable used for the CLI call is derived from FULCRA_CLI_COMMAND, an environment variable, then executed. In an agent context, environment variables are privileged configuration; if an attacker can influence them, they can cause arbitrary local command execution under the agent's permissions whenever context is fetched.
