LLMs could control their host machines by exploiting inference engines
TL;DR Highlight
A malicious LLM could emit tokens that exploit parser bugs in inference engines like vLLM.
Who Should Read
Infra or backend developers self-hosting open-weight models with vLLM or SGLang and running agents on them
Core Mechanics
- The target is the inference engine, not the sandbox
- Unlike the agent harness (the program that runs tools around an LLM), this is the software on the GPU host that generates and parses tokens.
- The GPU host is a high-value target with compute, access to weights, and privileged access to other datacentre machines.
- vLLM once used eval() on tool-call parameters
- CVE-2025-9141 was an arbitrary-code-execution bug where the Qwen3 Coder XML tool parser passed almost every argument to eval().
- Gemini flagged the introducing PR as critical, but vLLM's lead maintainer force-merged it.
- Complex parsers mean more bugs
- vLLM docs list more than 200 model architectures, and its examples hold about 35 Jinja chat templates.
- vLLM misparsed the plain string <mm:think> from MiniMax-M3 as the start of a reasoning block.
- Multimodal output isn't seen as a main route yet
- As far as the author can tell, current multimodal LLMs emit constrained media tokens that a model-specific decoder turns into pixels or waveforms.
- Higher bandwidth plus extra decoders, encoders, and native kernels still widen the attack surface.
Community Reactions
- Experience running vLLM in an isolated VM
- One commenter runs vLLM in a sandboxed VM on a firewalled VLAN.
- Updates and models are pushed from an external cache, with no DNS or AD/LDAP and only logs and telemetry going out.
- Counterpoint that large models are already split
- One commenter argued frontier-scale inference runs on multi-GPU clusters where the API gateway parsing tokens is likely already a different machine.
- Another criticized the article as handwavy about why and how an LLM would learn and use an exploit.
- Opinion that the harness should manage sandboxes
- A commenter said the agent shell shouldn't hold both the inference API key and network access to the server.
- Another noted extra HTTP features like llama.cpp's KV checkpoint save/restore API could be vulnerable.
- Objection that the engine executes nothing
- A commenter said only the agent loop executes commands, so the path to host takeover is unclear.
- Another said the engine handles untrusted input anyway and should be sandboxed.
How to Apply
- Check inference server binding and key exposure
- Today, check whether your vLLM or llama.cpp server listens on 0.0.0.0 and whether the agent shell can see the API key.
- Block unneeded extra HTTP endpoints and restrict external access by firewall.
- Isolate the inference host on its own VLAN
- Allow only essentials like logs and telemetry out of the GPU host.
- Treat its output as untrusted and process logs on separate VMs.
- Search tool-call parser code for eval
- Grep custom tool-call parsers or vLLM forks for eval() and exec() and remove them.
- Upgrade vLLM to a version that fixes CVE-2025-9141.
- Separate the agent shell network from the inference server
- Give the agent's command sandbox no network path or API key to the inference server.
- Let only the harness reach the inference server.
Try It
# Paste into Claude Code or ChatGPT (a simple audit prompt based on the article's defenses)
I self-host an LLM with {{vLLM/SGLang/llama.cpp}}. Below are my server launch command and network setup.
{{launch command, docker-compose, firewall rules}}
Audit it for the following.
1. Is the inference server needlessly exposed to the outside or to the agent's execution environment?
2. Can the agent shell reach both the API key and the inference server network?
3. Does the inference host have excessive privileges on other internal systems?
4. Does any tool-call parser use dangerous calls like eval/exec?
Summarize each item as a table of risk level and fix.
Next: pick the riskiest finding, fix it, and have it re-audit.Terminology
Related Papers
Same Simulation, Different Evidence: Where Retrieved Tool Output Costs LLM Agents Accuracy
Saving long tool output to files cut GPT-5.1 accuracy by 11.3 points; naming the authoritative file restored it.
Fake News, Real Crashes: Information Injection Attacks on LLM Financial Trading Agents
Fake headlines hijacked LLM trading agents 62% of the time versus 14% for prompt injection.
Harness Engineering 101: The LLM is the brain, the harness is the body
An agent is a loop managing a JSON array; 16 chapters build one from scratch
Harness2 by Google Research – Recursive Agent Harnessing
Recursively refining the harness with fixed model weights raised benchmark scores by up to 11.8 points.
Ousted Savannah police officer gave ICE agent husband access to Flock system
A police officer shared her Flock login with her ICE-agent husband; an audit found 983 searches and she was fired
Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling
Running Claude Code agents in tmux works well, but limits appear around four agents.