Описание
vLLM: Unauthenticated OOM Denial of Service via Unbounded n Parameter in OpenAI API Server
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.
- 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.
- 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.
Because 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.
Ссылки
- https://github.com/vllm-project/vllm/security/advisories/GHSA-3mwp-wvh9-7528
- https://nvd.nist.gov/vuln/detail/CVE-2026-34756
- https://github.com/vllm-project/vllm/pull/37952
- https://github.com/vllm-project/vllm/commit/b111f8a61f100fdca08706f41f29ef3548de7380
- 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
Пакеты
vllm
>= 0.1.0, < 0.19.0
0.19.0
Связанные уязвимости
vLLM is an inference and serving engine for large language models (LLMs). From 0.1.0 to before 0.19.0, 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. This vulnerability is fixed in 0.19.0.
vLLM is an inference and serving engine for large language models (LLMs). From 0.1.0 to before 0.19.0, 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. This vulnerability is fixed in 0.19.0.
vLLM is an inference and serving engine for large language models (LLM ...