From d34ff172b113e53c3a9cb54318afe44f67fe738e Mon Sep 17 00:00:00 2001 From: Karthik Vanabhojana Date: Tue, 29 Sep 2026 21:45:34 -0500 Subject: [PATCH 1/2] fix(security): run model servers without a shell async_run_command joined the argv list into one string for create_subprocess_shell, so any shell metacharacter in a value reaching the command line - a model tag or a repository directory name, for example - was interpreted by the shell instead of being passed through as an argument. Use create_subprocess_exec with the argv list, matching what the synchronous run_command already does. No caller depends on shell features; every command in the codebase is built as a list. Fixes #1229 --- src/openllm/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openllm/common.py b/src/openllm/common.py index c3646ba69..a5a1fce62 100644 --- a/src/openllm/common.py +++ b/src/openllm/common.py @@ -422,8 +422,8 @@ async def async_run_command( proc = None try: - proc = await asyncio.create_subprocess_shell( - ' '.join(map(str, cmd)), + proc = await asyncio.create_subprocess_exec( + *cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, cwd=cwd, From 3f4cdd4f9b495e7e8164989b55bfb72a5716e355 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 30 Sep 2026 03:10:25 +0000 Subject: [PATCH 2/2] ci: auto fixes from pre-commit.ci For more information, see https://pre-commit.ci --- src/openllm/common.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/openllm/common.py b/src/openllm/common.py index a5a1fce62..399c94c6e 100644 --- a/src/openllm/common.py +++ b/src/openllm/common.py @@ -423,11 +423,7 @@ async def async_run_command( proc = None try: proc = await asyncio.create_subprocess_exec( - *cmd, - stdout=asyncio.subprocess.PIPE, - stderr=asyncio.subprocess.PIPE, - cwd=cwd, - env=env, + *cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, cwd=cwd, env=env ) yield proc except subprocess.CalledProcessError: