Skip to content

fix: sanitize subprocess call in launch_all_serve.py#3865

Open
orbisai0security wants to merge 1 commit into
lm-sys:mainfrom
orbisai0security:fix-v-001-command-injection-launch-serve
Open

fix: sanitize subprocess call in launch_all_serve.py#3865
orbisai0security wants to merge 1 commit into
lm-sys:mainfrom
orbisai0security:fix-v-001-command-injection-launch-serve

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix critical severity security issue in fastchat/serve/launch_all_serve.py.

Vulnerability

Field Value
ID V-001
Severity CRITICAL
Scanner multi_agent_ai
Rule V-001
File fastchat/serve/launch_all_serve.py:252
CWE CWE-78

Description: Six subprocess.run() calls in launch_all_serve.py use shell=True with string arguments constructed from configuration values, environment variables, or command-line arguments. When shell=True is used, the entire string is passed to /bin/sh for interpretation, meaning any shell metacharacters (;, |, &&, $(), backticks) in the input strings will be executed as separate OS commands. If any portion of worker_sh, controller_sh, or server_sh is derived from user-supplied or externally-controlled input, an attacker can inject arbitrary operating system commands.

Changes

  • fastchat/serve/launch_all_serve.py

Verification

  • Build passes
  • Scanner re-scan confirms fix
  • LLM code review passed

Automated security fix by OrbisAI Security

Automated security fix generated by Orbis Security AI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant