Skip to content
CryptoDecentral

Note

An API Key Is Not a Perimeter: What a vLLM Server Exposes Beyond /v1

vLLM listens on every network interface by default, and its API key guards only a few path prefixes. Other routes on the same port, shared caches, outbound usage stats and model downloads sit outside that key.

2026-12-02 · local-ai, vllm, inference-server, bind-address, authentication, telemetry, hugging-face, multi-tenant, threat-model

Listen · 10 min · AI voice

Dark CryptoDecentral hex mesh: one glowing teal hexagonal node set inside a single bronze hexagonal rim at the centre, surrounded by a dim lattice of teal-lined hexagons with a few softly lit vertices; no text.

vLLM is an open-source inference server built to serve one model to many callers. That purpose changes the privacy question from the one a home runner raises. A home runner mostly has to answer "who else on my network can reach this?" A shared server has to answer "who can reach which paths, which caches do callers share, and what does the software send out on its own?" The project's own security documentation answers these frankly, and the answers are narrower than the phrase "set an API key" suggests. The key guards a fixed set of path prefixes on a server that, by default, listens on every network interface.

This note reads the project's primary sources as fetched on 2 December 2026. The documentation is from the main branch, which can run ahead of any tagged release, so check the version you actually run.

The default bind is every interface

The OpenAI-compatible server takes a --host option. In the source, host defaults to nothing, and the launcher builds its listening socket from args.host or "" plus the port, which defaults to 8000. An empty host string means "all addresses", and the code that prints the start-up address falls back to 0.0.0.0 when no host was given. In plain terms: start the server without --host and it accepts connections on every IPv4 interface the machine has, not only loopbackThe network address a server listens on. Loopback, 127.0.0.1, accepts connections only from the same machine; 0.0.0.0 listens on every interface, so without authentication anyone who can reach the port can use the server. Open the glossary for more..

Compare the two runners most people try first. The llama.cppAn open-source C/C++ project for running language models locally on CPUs and GPUs with minimal setup. It loads GGUF files and includes a local HTTP server, llama-server, that binds to loopback by default. Open the glossary for more. server README lists --host with a default of 127.0.0.1. The Ollama FAQ states that Ollama binds 127.0.0.1 by default and that the OLLAMA_HOST variable changes it. Those runners start closed and need a setting to open. vLLM's default is the other way around, which matches the guide's stated design: the unsafe network services are meant to be isolated on private networks, not exposed to whoever is nearby. The earlier note on bind addresses explains why the address decides who can knock; here the point is only that the starting position differs.

What the API key covers, and what it does not

vLLM offers --api-key (or the VLLM_API_KEY environment variable). The authentication middleware compares a Bearer token, and it applies only to paths that start with /v1, /v2, /inference or /cohere. The middleware source also skips requests using the HTTP OPTIONS method. Everything else on the same port is outside the check. Separately, the frontend arguments say cross-origin browser access is disabled by default, which is a different question from who can send requests directly.

The security guide lists the consequences. With a key set, these still answer without one:

  • Inference routes outside the guarded prefixes, including /invocations, a SageMaker-compatible route the docs say reaches the same inference functions as /v1, plus /pooling, /classify, /score and /rerank.
  • Operational controls, including /pause, /abort_requests, /scale_elastic_ep and /update_weights. The guide describes the first as a denial-of-service lever and the last as able to change model behaviour.
  • Utility routes, including /health, /version, /load and a Prometheus metrics route that the guide describes as covering model, throughput, queue and cache statistics.

Both the OpenAI-compatible server page and the --api-key help text carry a warning in the project's own words: do not rely on the key alone. The recommended pattern is a reverse proxy that allowlists the specific paths you intend to expose and blocks the rest.

Some surfaces exist only when switched on, and the guide treats them as dangerous in shared settings. VLLM_SERVER_DEV_MODE=1 adds routes including /collective_rpc, which the guide calls extremely dangerous and says never to enable in production. --enable-tokenizer-info-endpoint exposes chat templates. --grpc-port starts a separate gRPC listener on the same host address, which the guide calls insecure by default: no authentication, authorisation or encryption. None is on unless an operator turns it on.

Beyond the HTTP port, the guide warns about internal traffic. vLLM uses torch.distributed, which the guide says may open a TCPStore listening on all interfaces, and PyTorch treats distributed features as insecure by default: no authorisation, no encryption. The guide's advice is a firewall that blocks everything except the API port.

One server, one shared cache

A shared server is also a shared process. The guide states that vLLM does not isolate tenants that use the same server process: requests are scheduled together and share caches. One consequence it documents is a timing side channel in prefix caching, tracked as CVE-2025-46570. When two requests share a prompt prefix, the second is served faster, so a caller who can guess a prefix may be able to tell from response time whether someone else already sent it. The guide cites research showing the signal is distinguishable at very short prefix lengths.

The mitigation is an optional cache_salt request parameter, mixed into the prefix-cache hash so only requests with the same salt share blocks. It is opt-in, and the docs say it reduces specific cross-tenant risks but is not an isolation boundary. For callers who must be separated, the guide's answer is architectural: a dedicated instance per tenant, or a gateway that authenticates callers and scopes those identifiers.

Even a single-user setup has a trust edge on disk. The guide says vLLM assumes its cache directories (~/.cache/vllm by default) are private and trusted, and loads their contents without cryptographic integrity checks, in formats that can carry code. Anyone who can write there can potentially run code as the server.

What the software sends out

vLLM collects anonymous usage statistics by default. The documentation describes the data as hardware and configuration: cloud provider, CPU and memory, GPU count and type, the model's architecture name, vLLM version, and a handful of engine settings. In the code, the report carries a random per-run identifier and is posted to https://stats.vllm.ai, then repeats a small heartbeat every ten minutes. A local copy is appended to ~/.config/vllm/usage_stats.json, so you can read what would be sent. The report class defines fields for the machine and the configuration, not for prompt or response text. Extra key-value pairs that calling code may attach were not traced here.

Opt-out is documented three ways: set VLLM_NO_USAGE_STATS=1, set DO_NOT_TRACK=1, or create the file ~/.config/vllm/do_not_track. The source also recognises VLLM_DO_NOT_TRACK, which the docs page does not list. For an air-gapped or residency-sensitive deployment the point is not that this data is sensitive; it is that a "self-hosted" server still makes an outbound call you did not request, which is exactly what a network audit should find and a written policy should record.

Weights arrive from somewhere

By default, vLLM loads models from the Hugging Face Hub. HF_HOME moves the download location, VLLM_USE_MODELSCOPE=True switches to ModelScope, and HF_ENDPOINT can point at a mirror that serves a Hugging Face-compatible API inside your own network. Passing a local directory path loads the model from that directory instead. The docs also describe --trust-remote-code, which lets a model repository supply code that runs at load time. Treat that as a separate trust decision from trusting the weights. Whatever the source, a name is not a digest, a point the note on model pinning covers.

What this is not

This note does not rank inference servers, and it does not say any runner is safe or unsafe. It does not claim a particular vLLM release has a particular flaw, and it does not review the project's code beyond the files cited. The documents describe the main branch on the day they were read; the behaviour of an older or newer release was not verified, and nothing was run or scanned. It says nothing about hosted services that run vLLM for others. The licence is Apache-2.0, which is separate from the licences of any model you load with it. This is education about where a server's boundary sits, not a hardening procedure for a specific deployment.

Related on CryptoDecentral

Further reading (primary)

Do this next · Read

A Privacy Mode Is Not a Proof: Venice's Ladder from Policy to Enclave

Read the next note →

More on this topic

Ask your AI assistant about this note: connect it to our free, read-only MCP server and it can quote this note with citations. How to connect →

All notes · Get the Monday radar by email