CVE-2026-34756: vLLM: Unauthenticated OOM Denial of Service via Unbounded `n` Parameter in OpenAI API Server
vLLM before 0.19.0 has no upper bound on the n parameter of its OpenAI-compatible API. One request with an enormous n freezes the server's event loop and drives memory up until the OOM killer ends the process. Anyone who can call the chat or completions endpoint can do it. Upgrade to vLLM 0.19.0.
Published Apr 3, 2026 · Updated Jul 17, 2026 · Analysis Oct 30, 2026
What an attacker can do
The n field in ChatCompletionRequest and CompletionRequest is a plain integer. In SamplingParams._verify_args() only the lower bound is checked (n must be at least 1). When the request reaches vllm/v1/engine/async_llm.py, the engine fans it out into n child requests inside one for loop, calling copy(request) for each. Python's asyncio runs on one thread, so the loop blocks everything else, including liveness probes, while memory climbs by gigabytes per second until the kernel kills the process.
The attacker sends a single HTTP request to the chat completions or completions route with n set to a huge number. The advisory calls this unauthenticated, though the CVSS vector lists low privileges, so an API key may be required in your setup. The damage lands before the request ever reaches the scheduler, so GPU capacity planning and bandwidth limits do not help. The result is a crashed inference host and lost in-flight requests. The advisory describes no code execution or data exposure. Public-facing vLLM servers and reverse-proxy services in front of vLLM without body validation or rate limits are the most exposed.
Who is affected
vLLM from 0.1.0 up to but not including 0.19.0 (pip package vllm), when running the OpenAI-compatible server, vllm.entrypoints.openai.api_server.
Check your version:
pip show vllmFor containers, check the image tag and the vllm version inside it. Red Hat ships its own builds with separate errata, listed in the references.
vllm
- Ecosystem
- PyPI
- Affected
- >= 0.1.0, < 0.19.0
- Fixed in
- 0.19.0
- Check
pip show vllm
How to fix it
Upgrade to vLLM 0.19.0.
pip install -U "vllm>=0.19.0"The fix, pull request 37952, adds the environment variable VLLM_MAX_N_SEQUENCES. SamplingParams raises an error when a request's n exceeds it. The page I read does not state the default value, so check the 0.19.0 documentation and set it to a value that suits your workload. The sources give no workaround for earlier versions. A reverse proxy that rejects or rewrites requests with a large n is a possible stopgap of your own making, not vendor guidance.
How to tell if you were hit
Search access or gateway logs for completions and chat completions requests whose JSON body has an n far above what your clients normally send. Other signs: the vLLM process killed by the OOM killer (dmesg, journalctl), failing health checks while one request is in flight, and RSS that grows quickly right after a single request. Container restarts with exit code 137 fit this pattern. Match the crash time to the source address or API key of the request in flight.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
A Denial of Service vulnerability exists in the vLLM OpenAI-compatible API server. Due to the lack of an upper bound validation on the n parameter in the ChatCompletionRequest and CompletionRequest Pydantic models, an unauthenticated attacker can send a single HTTP request with an astronomically large n value. This completely blocks the Python asyncio event loop and causes immediate Out-Of-Memory crashes by allocating millions of request object copies in the heap before the request even reaches the scheduling queue.
Details
The root cause of this vulnerability lies in the missing upper bound checks across the request parsing and asynchronous scheduling layers:
- Protocol Layer: In
vllm/entrypoints/openai/chat_completion/protocol.py, thenparameter is defined simply as an integer without anypydantic.Fieldconstraints for an upper bound.
class ChatCompletionRequest(OpenAIBaseModel):
# Ordered by official OpenAI API documentation
# https://platform.openai.com/docs/api/reference/chat/create
messages: list[ChatCompletionMessageParam]
model: str | None = None
frequency_penalty: float | None = 0.0
logit_bias: dict[str, float] | None = None
logprobs: bool | None = False
top_logprobs: int | None = 0
max_tokens: int | None = Field(
default=None,
deprecated="max_tokens is deprecated in favor of "
"the max_completion_tokens field",
)
max_completion_tokens: int | None = None
n: int | None = 1
presence_penalty: float | None = 0.0- SamplingParams Layer (Incomplete Validation): When the API request is converted to internal
SamplingParamsinvllm/sampling_params.py, the_verify_argsmethod only checks the lower bound (self.n < 1), entirely omitting an upper bounds check.
def _verify_args(self) -> None:
if not isinstance(self.n, int):
raise ValueError(f"n must be an int, but is of type {type(self.n)}")
if self.n < 1:
raise ValueError(f"n must be at least 1, got {self.n}.")- Engine Layer (The OOM Trigger): When the malicious request reaches the core engine (
vllm/v1/engine/async_llm.py), the engine attempts to fan out the requestntimes to generate identical independent sequences within a synchronous loop.
# Fan out child requests (for n>1).
parent_request = ParentRequest(request)
for idx in range(parent_params.n):
request_id, child_params = parent_request.get_child_info(idx)
child_request = request if idx == parent_params.n - 1 else copy(request)
child_request.request_id = request_id
child_request.sampling_params = child_params
await self._add_request(
child_request, prompt_text, parent_request, idx, queue
)
return queueBecause Python's asyncio runs on a single thread and event loop, this monolithic for-loop monopolizes the CPU thread. The server stops responding to all other connections (including liveness probes). Simultaneously, the memory allocator is overwhelmed by cloning millions of request object instances via copy(request), driving the host's Resident Set Size (RSS) up by gigabytes per second until the OS OOM-killer terminates the vLLM process.
Impact
Vulnerability Type: Resource Exhaustion / Denial of Service
Impacted Parties:
- Any individual or organization hosting a public-facing vLLM API server (
vllm.entrypoints.openai.api_server), which happens to be the primary entrypoint for OpenAI-compatible setups. - SaaS / AI-as-a-Service platforms acting as reverse proxies sitting in front of vLLM without strict HTTP body payload validation or rate limitations.
Because this vulnerability exploits the control plane rather than the data plane, an unauthenticated remote attacker can achieve a high success rate in taking down production inference hosts with a single HTTP request. This effectively circumvents any hardware-level capacity planning and conventional bandwidth stress limitations.
Credited to ez-lbz, russellb, jperezdealgaba.
Questions
- Is vLLM 0.18.0 affected by CVE-2026-34756?
Yes. The vulnerable range runs from 0.1.0 up to but not including 0.19.0. The patched version is 0.19.0.
- Does this need authentication?
The advisory title says unauthenticated. The CVSS vector lists low privileges. If you run vLLM with no API key, anyone who can reach the port can send the request.
- How is n limited after the fix?
Through the VLLM_MAX_N_SEQUENCES environment variable. SamplingParams rejects a request when n exceeds it. The default value was not stated in the pull request page I read.
- Is it exploited in the wild?
No source I read says so, and the entry has no CISA KEV flag. The EPSS score is about 0.4%.
References
Read for this analysis:
- https://github.com/vllm-project/vllm/security/advisories/GHSA-3mwp-wvh9-7528
- https://github.com/vllm-project/vllm/pull/37952
- https://github.com/vllm-project/vllm/commit/b111f8a61f100fdca08706f41f29ef3548de7380
- https://nvd.nist.gov/vuln/detail/CVE-2026-34756
- https://access.redhat.com/errata/RHSA-2026:36005
- https://access.redhat.com/errata/RHSA-2026:36006
- https://access.redhat.com/security/cve/CVE-2026-34756
- https://bugzilla.redhat.com/show_bug.cgi?id=2455425
- https://github.com/pypa/advisory-database/tree/main/vulns/vllm/PYSEC-2026-2298.yaml
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-34756.json
- https://github.com/advisories/GHSA-3mwp-wvh9-7528
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More vLLM vulnerabilities
All vLLM entriesCVE-2026-115911
vLLM: DoS via unbounded chat_template Jinja2 rendering exhausts the renderer thread pool
medium6.5Oct 28, 2026CVE-2026-115912
vLLM: Public multimodal SHM handle forgery reaches worker-side `pickle.loads()` with insecure serialization disabled
high7.5Oct 28, 2026CVE-2026-115913
vLLM: Phi-4 multimodal audio encoder materializes and retains full attention matrices: a single max-length audio OOM-crashes the vLLM engine
medium6.5Oct 28, 2026CVE-2026-115914
vLLM DeepSeek-OCR image processing vulnerable to denial of service
medium6.5Oct 28, 2026CVE-2026-115915
vLLM: Untrusted EPS inputs can trigger denial of service or Ghostscript RCE
high8.1Oct 28, 2026CVE-2026-115916
vLLM: Out-of-vocabulary prompt token id passes input validation and triggers a CUDA device-side assert (engine crash / DoS)
medium6.5Oct 28, 2026
