Tainted flow: 'url' from os.environ.get (line 265, credential/environment) → subprocess.run (code execution)
Medium
- Category
- Data Flow
- Content
def probe_speed(url: str, timeout: int = 15) -> tuple[bool, float, int]: """测速:请求前 1MB。返回 (可用, 速度B/s, http状态码)。206=支持range(可续传)。""" try: r = subprocess.run( ["curl", "-sL", "-o", "/dev/null", "-r", "0-1048575", "-w", "%{http_code} %{speed_download}", url], capture_output=True, text=True, timeout=timeout)- Confidence
- 84% confidence
- Finding
- The effective URL can be influenced through GITHUB_PROXIES and is later passed to curl without a '--' separator. If a proxy prefix or URL begins with '-' or otherwise abuses curl's argument parsing behavior, the external tool may treat attacker-controlled input as flags rather than a URL, creating option injection and potentially unexpected network access or local file writes.
