Tainted flow: 'NODE' from os.environ.get (line 37, credential/environment) → subprocess.run (code execution)
Medium
- Category
- Data Flow
- Content
def export(code: str, start: str, end: str, period: str, out: str) -> pd.DataFrame: frames = [] for s, e in _segments(start, end): outp = subprocess.run( [NODE, WESTOCK, "kline", code, "--period", period, "--start", s, "--end", e, "--fq", "qfq"], capture_output=True, text=True,- Confidence
- 91% confidence
- Finding
- The executable path comes from the NODE_BIN environment variable and is passed directly into subprocess.run. If an attacker can influence the environment in which this skill runs, they can replace the intended Node binary with an arbitrary executable and achieve code execution under the skill's privileges.
