Deploying vLLM in Production: Security Hardening for Self-Hosted LLM Inference
A concrete hardening procedure for teams standing up vLLM's OpenAI-compatible server, not a general LLM security overview

Proactive Security for the AI Era
NodeZero continuously and autonomously pentests infrastructure, identity, cloud, and now web applications, chaining weaknesses across every domain the way real attackers do. Every finding ships with replayable proof showing exploitable business impact, not theoretical risk.
vLLM is a fast, widely adopted engine for serving large language models on GPUs, and its built-in OpenAI-compatible HTTP server is the default way most teams put a self-hosted model behind an API. That server was designed for throughput and compatibility first. Its own documentation is explicit that several of the defaults which make it easy to stand up in a lab are not safe to expose as-is in production: authentication that covers only part of the HTTP surface, a gRPC listener with no authentication or encryption at all, and a distributed backend (Ray, PyTorch Distributed) that treats the whole cluster as one trust domain.
This guide is not a general introduction to LLM security, prompt injection, or model risk. It is a concrete procedure for a platform or ML engineer who already has vLLM running and needs to harden it before, or instead of, exposing it to real traffic. For the broader LLM security picture, see our enterprise LLM security guide. For the prompt-injection attack surface specifically, which sits one layer above the inference server and is not solved by anything in this guide, see our prompt injection defense guide. Everything below is grounded in vLLM's published security documentation and public CVE records current as of this writing; where we could not verify a specific behavior against vLLM's own docs or an advisory, we say so rather than guessing.
The problem: vLLM's defaults assume a trusted network, not a public one
vLLM's HTTP server, gRPC listener, and distributed communication layer were built to run fast inside a cluster you already control. That assumption is stated directly in vLLM's own security documentation: internal communications between nodes in a multi-node deployment are insecure by default and must be protected by placing the nodes on an isolated network, PyTorch Distributed features are intended for internal communication only and are not built for use in untrusted environments, and the gRPC listener binds to the same host address as the HTTP server with no authentication or encryption. None of that is a defect. It is a deliberate tradeoff for performance, and it becomes a real exposure only when a team assumes that the same server is safe to bind to a public interface, expose behind a load balancer without a proxy in front of it, or share across tenants without additional isolation.
The most common real-world version of this problem is simple: an engineer follows a quickstart, runs vllm serve <model>, opens the port to make the API reachable from another service or from the internet, and never revisits the question of what exactly is reachable on that port. The answer, on an unhardened deployment, is more than the chat completions endpoint.
Reference: what is and is not protected by vLLM's --api-key
The --api-key flag (or the VLLM_API_KEY environment variable) is vLLM's built-in authentication mechanism for the OpenAI-compatible server, and it is easy to assume it covers the whole HTTP surface. According to vLLM's own documentation, it does not. It authenticates only requests to endpoints under the /v1, /v2, and /inference path prefixes. Several other endpoints on the same server, reachable on the same port, are not covered:
| Endpoint or prefix | Protected by --api-key | Why it matters |
|---|---|---|
/v1/*, /v2/*, /inference/* | Yes | Standard OpenAI-compatible chat, completion, and embedding routes |
/invocations | No | Exposes the same inference capability as the protected /v1 routes, unauthenticated |
/generative_scoring, /pooling, /classify, /score, /rerank | No | Inference-adjacent endpoints not covered by the auth prefix check |
/pause, /abort_requests, /scale_elastic_ep | No | Operational controls; an unauthenticated caller can disrupt serving directly |
/collective_rpc (only when VLLM_SERVER_DEV_MODE=1) | No | Arbitrary RPC execution; a development-only endpoint that must never reach production |
| gRPC listener | No (insecure by default) | Same host as the HTTP server, no authentication or encryption at all |
PyTorch TCPStore (multi-node) | No | Listens on all interfaces by default when using TCP initialization |
The practical conclusion, stated plainly in vLLM's own guidance: do not rely on --api-key alone to secure a vLLM deployment. It is one control among several, not a perimeter.
Briefings like this, every morning before 9am.
Threat intel, active CVEs, and campaign alerts, distilled for practitioners. 50,000+ subscribers. No noise.
Prerequisites before you harden anything
Confirm these before starting the procedure below. Skipping this inventory step is the most common reason a hardening pass misses something.
First, know your vLLM version and check it against current advisories, since several of the CVEs covered later in this guide are fixed only in specific version ranges and an outdated deployment may already be exploitable regardless of any configuration change. Second, know your deployment topology: a single-node, single-tenant deployment behind an internal load balancer has a materially smaller attack surface than a multi-node deployment using Ray or PyTorch Distributed, or one serving multiple models or tenants from a shared instance. Third, know whether trust_remote_code is set anywhere in your serving configuration, and if so, whether the model repository it applies to is one your organization controls or merely trusts. Fourth, know where your model weights actually came from: a named, verifiable source (a vendor's official Hugging Face org, an internal artifact registry) versus a community mirror with no provenance chain changes the answer to several steps below. Fifth, know what already sits in front of vLLM on the network path: nothing, a plain load balancer, or a reverse proxy capable of enforcing its own auth and routing rules. That last fact determines how much of this procedure vLLM itself has to do versus how much a proxy layer can do for it.
Hardening procedure, part 1: network posture and authentication
Work through these in order. Each step assumes the previous one is done; skipping the reverse proxy step and going straight to API keys, for example, leaves the unauthenticated endpoints in the reference table above fully exposed regardless of how well the key is managed.
Subscribe to unlock Remediation & Mitigation steps
Free subscribers unlock full IOC lists, Sigma detection rules, remediation steps, and every daily briefing.
Hardening procedure, part 2: isolation, resource limits, and model provenance
The network and authentication steps above close the perimeter. These steps address what happens once a request is already inside it, whether from a legitimate but noisy tenant, a malicious prompt, or a compromised model artifact.
Subscribe to unlock Remediation & Mitigation steps
Free subscribers unlock full IOC lists, Sigma detection rules, remediation steps, and every daily briefing.
Validation: confirm the hardening actually took effect
Do not consider this procedure done until each control has been checked from outside the deployment, not just configured. Run these checks from a network position equivalent to a real attacker, meaning outside your own trusted subnet where possible.
Confirm the unauthenticated endpoints are unreachable, not merely unauthenticated: attempt a request to /invocations, /pause, and /abort_requests directly against the vLLM host's port (bypassing the proxy if you can reach it) and confirm the request is refused at the network layer, not just returned a 401 by vLLM itself, since a 401 means the request reached vLLM at all, which the proxy allowlist in Step 1 should have prevented. Confirm a request to a protected /v1 endpoint without a valid key is rejected, and separately confirm a request with a spoofed Host header does not bypass that rejection, directly testing the failure mode behind CVE-2026-48746. Confirm the gRPC port and any PyTorch Distributed or KV-cache-transfer ports are not reachable from outside the isolated cluster network established in Step 6, using a port scan from a host outside that segment. Confirm VLLM_SERVER_DEV_MODE is unset by checking the running container or process environment directly, not just the deployment manifest, since a manifest can be correct while a manually patched running instance drifts from it. Finally, confirm the vLLM version running in production matches a version you have checked against current advisories, not the version that was current when the deployment was first built.
Failure cases: what a hardening pass still tends to miss
A configuration-only pass, even a thorough one, does not close everything. Known public vulnerabilities against vLLM show up in categories that hardening steps mitigate but do not always fully eliminate on their own.
CVE-2025-62164 is an unsafe deserialization vulnerability that can be abused to cause denial of service and potentially remote code execution in the vLLM server process, affecting deployments that deserialize untrusted or model-provided payloads; this is a code-level fix, not a configuration workaround, so the only real mitigation is running a patched version. CVE-2026-22778 is a remote code execution vulnerability reachable by sending a malicious video link to a vLLM API, combining an information-disclosure flaw in error handling with a heap buffer overflow in a bundled video-decoding dependency, affecting versions 0.8.3 through 0.14.0; a reverse proxy and firewall reduce exposure but do not patch the underlying decoder bug. CVE-2025-48956 allowed denial-of-service attacks via unlimited HTTP header sizes and is fixed in vLLM 0.10.1.1. CVE-2025-66448 is a remote code execution path via an auto_map entry in a model's configuration, affecting all versions before 0.11.1, which is really a specific, dangerous instance of the trust_remote_code and model-provenance risk covered in Step 10, arriving through the model's own config file rather than through a CLI flag.
The pattern across all four: version currency is not optional. A perfectly configured reverse proxy, a correctly scoped API key, and a fully isolated network segment do not protect against a code-level vulnerability in a version you have not upgraded past. Treat vLLM version tracking as an ongoing operational task, not a one-time step in this procedure.
Security tradeoffs to weigh, not just apply
Every control above has a cost, and a team should decide these deliberately rather than discover them after the fact. A reverse proxy with a strict allowlist adds a network hop and a piece of infrastructure to operate and patch in its own right, and an overly narrow allowlist can silently break a legitimate endpoint your application actually needs, which is why Step 1 has to be validated against real traffic, not just a guess at which routes matter. Disabling VLLM_SERVER_DEV_MODE removes a genuinely useful debugging surface for engineers troubleshooting a production issue, which is the correct tradeoff for a production instance but means teams need a separate, explicitly non-production environment where that mode is intentionally left on for diagnosis. Per-tenant cache segmentation (Step 8) and per-tenant network isolation both improve on the security of a shared instance but move a deployment toward the operational and GPU-utilization cost profile of dedicated instances per tenant, which is a real capacity-planning tradeoff, not a free win. Tight resource ceilings on n and media size (Step 7) reduce DoS exposure but can also reject a legitimate high-volume batch workload if the limits are copied from a general guideline instead of sized against your own actual traffic. And avoiding trust_remote_code and pickle-format weights (Step 10) sometimes means you cannot use a specific community model at all until its maintainers or your own team package it in a safer form, which is a real capability tradeoff a team should make with eyes open rather than discover by working around the restriction under deadline pressure.
The bottom line
vLLM's OpenAI-compatible server is built for throughput inside a trusted environment, not for the assumption that a public-facing security perimeter comes for free. Its own documentation says as much: the --api-key flag protects only part of the HTTP surface, the gRPC listener is insecure by default, and multi-node communication is insecure by default and requires network isolation the operator has to build. The procedure that closes that gap is concrete and ordered: a reverse proxy with an explicit endpoint allowlist first, since it closes the largest number of gaps in one step, followed by correctly scoped API key handling, network isolation for distributed and gRPC traffic, explicit resource ceilings, tenant-level cache and UUID isolation where an instance is shared, and verified provenance for model weights and any use of trust_remote_code. None of that substitutes for keeping vLLM itself current against known CVEs; CVE-2025-62164, CVE-2026-22778, CVE-2025-48956, and CVE-2025-66448 are all fixed in code, not configuration. Validate every control from outside the deployment, not just in the config file, and weigh the operational and capability tradeoffs of each step deliberately rather than applying every recommendation at maximum strictness by default.
Frequently asked questions
Does vLLM bind to 0.0.0.0 by default, and is that safe in production?
Many vLLM quickstart guides and deployment examples have operators bind the server broadly for convenience, and vLLM's own security documentation is explicit that this is not safe without additional controls. The server's authentication only covers a subset of endpoints, so binding it to a public or unrestricted interface without a reverse proxy and firewall in front of it exposes unauthenticated endpoints like /invocations, /pause, and /abort_requests alongside the protected /v1 routes.
Is vLLM's --api-key flag enough to secure a production deployment on its own?
No. vLLM's documentation states directly that operators should not rely on --api-key alone. It authenticates only requests under the /v1, /v2, and /inference path prefixes, leaving endpoints such as /invocations, /pause, /abort_requests, and the gRPC listener unauthenticated by default. A reverse proxy that allowlists exposed endpoints is described by vLLM as the most effective additional control.
What is CVE-2026-48746 and does it affect vLLM deployments behind a reverse proxy?
CVE-2026-48746 is a critical authentication bypass (CVSS 9.1) in vLLM's OpenAI API authentication middleware, caused by the middleware trusting an attacker-controlled Host header when reconstructing the request path, which could let an attacker's crafted header bypass the /v1 prefix authentication check entirely. Deployments sitting behind an RFC-conforming reverse proxy such as nginx were not affected, because the proxy normalizes the Host header before the request reaches vLLM. The underlying issue is fixed in vLLM 0.22.0.
How do you isolate multiple tenants or models on a single shared vLLM instance?
vLLM documents two specific multi-tenant gaps that require explicit mitigation rather than being isolated by default: prefix caching can leak a timing side channel that lets one tenant infer another tenant's cached prompt content, mitigated with the cache_salt option, and multimodal media cache entries keyed by a client-supplied UUID can collide across tenants if UUIDs are not assigned uniquely per tenant. Absent both mitigations, a shared vLLM instance is not tenant-isolated.
Should trust_remote_code ever be enabled in a production vLLM deployment?
Only for model repositories your organization has actually reviewed and trusts, because the setting executes arbitrary Python code from the model repository at load time, and a malicious or compromised repository can use it to run code on the inference host. Safetensors-format weights avoid code execution on load entirely, while older pickle-based checkpoints loaded through certain code paths can execute arbitrary code during unpickling if the file is malicious, which is the mechanism behind CVE-2025-66448.
What GPU resource-exhaustion controls does vLLM provide against denial-of-service requests?
vLLM enforces a configurable ceiling on the n parameter, the number of completions a single request can generate, through the VLLM_MAX_N_SEQUENCES environment variable, and enforces configurable limits on media inputs through VLLM_MAX_MEDIA_DOWNLOAD_SIZE_MB, VLLM_MAX_IMAGE_PIXELS, and VLLM_MAX_AUDIO_CLIP_FILESIZE_MB. Operators should size these to actual expected traffic rather than leave general-purpose defaults in place, since GPU capacity is expensive and slow to autoscale compared to a stateless web tier.
Sources & references
- vLLM Documentation - Security Guidance
- vLLM Documentation - OpenAI-Compatible Server
- Uganda National CERT - vLLM OpenAI-Compatible API Server Authentication Bypass (CVE-2026-48746)
- GitHub Advisory Database - vLLM deserialization vulnerability leading to DoS and potential RCE (CVE-2025-62164)
- GitHub Advisory Database - vLLM has RCE in video processing (CVE-2026-22778)
- GitHub Advisory Database - vLLM API endpoints vulnerable to Denial of Service attacks (CVE-2025-48956)
- ZeroPath - vLLM Remote Code Execution via Model Config Auto-Mapping (CVE-2025-66448)
Free resources
Critical CVE Reference Card 2025–2026
25 actively exploited vulnerabilities with CVSS scores, exploit status, and patch availability. Print it, pin it, share it with your SOC team.
Ransomware Incident Response Playbook
Step-by-step 24-hour IR checklist covering detection, containment, eradication, and recovery. Built for SOC teams, IR leads, and CISOs.
Get threat intel before your inbox does.
50,000+ security professionals read Decryption Digest for early warnings on zero-days, ransomware, and nation-state campaigns. Free, daily, no spam.
Unsubscribe anytime. We never sell your data.

Founder & Cybersecurity Evangelist, Decryption Digest
Cybersecurity professional with expertise in threat intelligence, vulnerability research, and enterprise security. Covers zero-days, ransomware, and nation-state operations for 50,000+ security professionals every morning.
