Tainted flow: 'V2_RUNTIME_DIR' from os.environ.get (line 24, credential/environment) → subprocess.run (code execution)
Medium
- Category
- Data Flow
- Content
# cli.py 走 process_message → 8 步 pipeline → 写 V2 SQLite → 返 result["reply"] # V2 的 dedup 走 trace_id, 单进程内 random hex 已足够 try: result = subprocess.run( ["python3", "cli.py", message], cwd=V2_RUNTIME_DIR, capture_output=True,- Confidence
- 93% confidence
- Finding
- The subprocess working directory is derived from KIDS_POINTS_RUNTIME_DIR, which is taken directly from the environment and can point to an arbitrary location. Because the command executed is python3 cli.py with that cwd, an attacker who can influence the service environment can cause execution of a different cli.py, leading to arbitrary code execution under the skill's privileges.
