LLMs could control their host machines by exploiting inference engines A LessWrong essay warns that malicious large language models (LLMs) could exploit vulnerabilities in inference engines like vLLM or SGLang to execute arbitrary code on the host machines where their weights are loaded, gaining control of high-value GPU servers. The essay cites CVE-2025-9141, an arbitrary-code execution bug in vLLM's XML-based tool parser for Qwen3 Coder, which was introduced via a pull request that was force-merged by the lead maintainer despite a critical security warning from Gemini. It also notes that vLLM supports over 200 model architectures and about 35 Jinja chat templates, increasing the attack surface for parser bugs. | Read on LessWrong https://www.lesswrong.com/posts/CjeobBGnhxg8xvden/llms-could-control-their-host-machines-by-exploiting | Large language models often take actions running on one computer via an agentic harness such as Claude Code or Codex , however the LLMs’ responses to prompts are computed on a different computer with GPU access. Could a malicious LLM gain control of the host machine where its weights are loaded? Such a machine is a high-value target: it has sufficient compute to run a frontier LLM, offers easy access to the LLM’s weights, and has privileged access to other computers in the datacentre compared with a generic computer on the internet. This essay explores how easily a malicious LLM could take control of the host machine. The primary attack considered here involves the LLM emitting a token sequence whose semantic meaning is irrelevant but that exploits a vulnerability in the software that loads an LLM onto GPUs, runs the LLM to generate output tokens, and parses those tokens into responses. . How could an LLM execute code on the host machine? Like any program, inference engines like vLLM https://github.com/vllm-project/vllm or SGLang https://github.com/sgl-project/sglang may contain exploitable bugs. Because the LLM controls the tokens passed to the inference engine, a malicious LLM could therefore emit a sequence of tokens that a poorly written inference engine mistakes for code or instructions to execute rather than data to return to the user. But surely all inference engines are robust pieces of software and this would never happen, right? vLLM previously used eval on tool-call parameters CVE-2025-9141 https://github.com/vllm-project/vllm/security/advisories/GHSA-79j6-g2m3-jgfw was an arbitrary-code execution bug in vLLM’s XML-based tool parser for Qwen3 Coder. The parser passed almost every tool-call argument to eval , allowing the LLM to execute arbitrary code on the host machine. Gemini automatically analysed the PR https://github.com/vllm-project/vllm/pull/21396 that introduced this bug and correctly flagged it as a critical security vulnerability. Despite that warning, the lead maintainer of vLLM force-merged the PR, writing: Unfortunately, parsing an arbitrary token sequence into a fully fledged chat with user turns, assistant responses, tool calls, and so on is not trivial, and the exact process often differs between LLMs. This complexity creates more opportunities for bugs that could permit arbitrary code execution on the host machine. vLLM and SGLang are complex, and bugs are common Modern inference engines do more than map token sequences to strings. vLLM’s documentation lists support for more than 200 model architectures https://docs.vllm.ai/en/stable/ , and its examples directory contains about 35 Jinja chat templates https://github.com/vllm-project/vllm/tree/main/examples . Modern inference engines parse many chat formats, and slightly misspecified parsing logic result in an LLM’s output being interpreted as code to execute. In this vLLM issue https://github.com/vllm-project/vllm/issues/48663 , a user was discussing how LLMs reason with MiniMax-M3, and the LLM emitted the string