Inference Engines Explained: TensorRT, TensorRT-LLM, vLLM and SGLang
For executives
An inference engine is the software that actually runs a model on GPUs: it loads the weights, schedules requests, manages GPU memory for the attention cache and launches the GPU kernels that compute each answer. TensorRT and TensorRT-LLM are NVIDIA's engines; vLLM and SGLang are the leading open-source ones. Inference servers and platforms such as Dynamo-Triton, Dynamo and NIM sit on top of them. Engines are where model files get loaded and untrusted requests get parsed, which makes them where many inference vulnerabilities live: NVIDIA's 2026 index lists 28 CVEs across TensorRT and TensorRT-LLM, vLLM and SGLang each fixed several remote code execution flaws, and in November 2026 an SGLang flaw was exploited against a production service.
What an inference engine does
- Loads the model: reads weights, configuration, tokenizer and templates, and for TensorRT compiles an optimized engine for the specific GPU.
- Schedules requests: batches many users' requests together, continuously, to keep the GPU busy.
- Manages the KV cache: stores each request's attention state in GPU memory, often in fixed-size pages, and decides what to keep, share or evict.
- Runs the kernels: launches optimized CUDA kernels for attention, matrix multiplication and sampling.
- Exposes an API: most engines include an OpenAI-compatible HTTP server, plus internal channels between processes and nodes.
The engines
| Engine | Maintainer | What it is |
|---|---|---|
| TensorRT | NVIDIA | A compiler and runtime that turns a trained model into an optimized engine file for a specific GPU |
| TensorRT-LLM | NVIDIA | An open-source library for serving large language models on top of TensorRT, with its own scheduler, KV cache and API server |
| vLLM | vLLM project (open source) | A high-throughput serving engine built around PagedAttention, a paged KV cache |
| SGLang | SGLang project (open source) | A serving engine with a structured generation language and RadixAttention for cache reuse across requests |
NVIDIA's NIM containers package TensorRT-LLM, vLLM and SGLang, and Dynamo runs them as its workers.
Where engines are exposed
Loading model artifacts
Engines load files from outside: checkpoints, tokenizers, chat templates, configuration and sometimes repository code. Seven of the 28 TensorRT and TensorRT-LLM CVEs in 2026 are deserialization of untrusted data, including CVE-2026-24233 (8.4) in TensorRT-LLM's restricted unpickler for model weights. CVE-2026-65119 (8.4, October 2026) let TensorRT-LLM's cache-aware router load tokenizer code from an untrusted source. The precedent is older: CVE-2025-23254 (8.8, April 2025) was a TensorRT-LLM deserialization flaw fixed in 0.18.2. vLLM fixed three ways a model could run code with trust_remote_code off (CVE-2026-22807, CVE-2026-4944, CVE-2026-41523), and SGLang's CVE-2026-5760 (9.8) turned a malicious chat template into code execution.
Internal channels
Engines split work across processes and nodes and often pass objects between them with pickle. vLLM's Mooncake integration (CVE-2025-32444, rated 10.0 in its GitHub advisory) and PyNcclPipe (CVE-2025-47277, 9.8), and SGLang's ZeroMQ broker (CVE-2026-3059, 9.8), all deserialized pickle from network sockets. Oligo Security traced the pattern, which it calls ShadowMQ, through Meta's Llama Stack, vLLM, TensorRT-LLM (CVE-2025-23254), SGLang and Modular Max, sometimes in code copied from one project to the next (Oligo Security).
Parsing requests and media
Requests carry long prompts, images, video and URLs. TensorRT-LLM's 2026 CVEs include three server-side request forgery flaws (CVE-2026-24234, CVE-2026-24269, CVE-2026-65120) and two missing authentication checks (CVE-2026-24229, CVE-2026-24259); vLLM's CVE-2026-22778 chained a heap address leak from an invalid image with a decoder overflow to remote code execution.
Parsing engine files
TensorRT's eight 2026 CVEs are mostly memory-safety flaws: heap overflows rated 7.8, an out-of-bounds write (CVE-2026-24188, 8.2) and an integer overflow (CVE-2026-100963, 8.1).
Exploitation in the wild
On November 9, 2026, NEAR AI reported that an attacker exploited a remote code execution vulnerability in SGLang to run code on one of its inference servers, then reached an internal system (The Block). It is the clearest public case so far of an inference engine flaw used against production.
Detection
An engine process should load a model, serve requests and launch GPU kernels. The signals that it is doing something else: shells or unexpected child processes; module imports, exec or eval during model, tokenizer or template loading; outbound connections to hosts no model needs; internal transport ports reached from outside the serving cluster; and GPU modules loaded that no model requires. Tying each to the engine process, model and container makes the alert actionable.
Choosing and running engines safely
- Track engine versions inside every image and NIM; engines patch often.
- Load models from repositories you control, pinned by hash, with trust_remote_code off.
- Keep internal transports (ZeroMQ, NCCL, KV transfer) on isolated networks.
- Put an authenticating gateway in front of every engine's API.
Related articles
- Inference server exploitation: Dynamo-Triton, Dynamo, TensorRT-LLM, vLLM and SGLang
- TensorRT-LLM vulnerabilities in 2026: 20 CVEs, a restricted unpickler bypass and the ShadowMQ pattern
- What NVIDIA NIM is
- What NVIDIA Dynamo is
- Model file formats: which ones can run code
- AI Infrastructure Under Attack: Why the Breaches Keep Happening at Runtime (Stealthium research)