CVE-2026-54235: vLLM: temperature=NaN and temperature=Infinity bypass validation and propagate to GPU kernels
vLLM versions 0.8.5 through 0.23.0 accept temperature=NaN and temperature=Infinity in sampling parameters. The values pass validation, reach GPU sampling kernels and can crash the inference worker, cutting service for all concurrent users. Upgrade to vLLM 0.24.0.
Published Jun 17, 2026 · Updated Jul 17, 2026 · Analysis Oct 26, 2026
What an attacker can do
vLLM validates temperature with comparison operators in vllm/sampling_params.py. One check is 0 < self.temperature < _MAX_TEMP and another is self.temperature < 0.0. In Python float semantics, comparisons with NaN are always false, and positive infinity is not less than zero, so both values pass every guard. Negative infinity is caught correctly. No math.isnan or math.isinf check exists in the file.
The bad value then reaches the GPU sampling kernels as softmax input. The advisory says this produces undefined behavior or CUDA errors that can crash the inference worker.
An attacker needs only the ability to send a completion request with a crafted temperature. The CVSS vector requires no privileges and no user interaction. The result is lost availability for every user of that worker. It does not give code execution or data access. Public or shared vLLM endpoints are the main exposure.
Who is affected
vllm from 0.8.5 up to and including 0.23.0 on PyPI. Any deployment whose API accepts client-set sampling parameters is exposed. Check your version:
pip show vllmvllm
- Ecosystem
- PyPI
- Affected
- >= 0.8.5, <= 0.23.0
- Fixed in
- 0.24.0
- Check
pip show vllm
How to fix it
Upgrade to vllm 0.24.0:
pip install --upgrade "vllm>=0.24.0"The fix (pull request 45116) adds a math.isfinite() check in SamplingParams._verify_args() in vllm/sampling_params.py. It covers temperature and also repetition_penalty, and rejects NaN and both infinities. The sources give no other workaround. Until you upgrade, filter requests at a gateway so temperature is a finite number in a sane range, and run vLLM under a supervisor that restarts a crashed worker.
How to tell if you were hit
Look for inference worker crashes or restarts with CUDA errors or NaN-related messages from the sampling step. Compare crash times with request logs that carry a temperature of NaN or Infinity (the JSON may contain the literal NaN or Infinity, or a very large exponent such as 1e999 that parses to infinity). Repeated worker restarts triggered by a single client point to this flaw.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
All temperature validation gates use comparison operators (<, >), which silently evaluate to False for NaN and for positive Infinity in Python's IEEE 754 float semantics. Both values pass every guard and propagate to GPU sampling kernels, where they produce undefined behavior or CUDA errors that can crash the inference worker. Note: -Infinity is correctly caught.
Root Cause
sampling_params.py:384:
if 0 < self.temperature < _MAX_TEMP: # NaN → False; +Inf → Falsesampling_params.py:462:
if self.temperature < 0.0: # NaN → False; +Inf → False
raise VLLMValidationError(...)No math.isnan() or math.isinf() check exists anywhere in sampling_params.py.
Python semantics (verified): float('nan') < 0.0 → False, float('inf') < 0.0 → False.
Impact
Crash of inference worker on GPU kernel execution with NaN/Inf softmax input, degrading service for all concurrent users.
Remediation
Add math.isfinite(self.temperature) check in _verify_args(). Reject non-finite float values with a 400 error.
Fix
A fix for this vulnerability was merged here: https://github.com/vllm-project/vllm/pull/45116
Credited to brodmart, jperezdealgaba.
Questions
- Which vLLM versions are affected by CVE-2026-54235?
Versions 0.8.5 through 0.23.0. The patched version is 0.24.0.
- Is -Infinity also a problem?
No. The advisory says negative infinity is caught by the existing temperature < 0.0 check. Only NaN and positive infinity slip through.
- Can this lead to code execution?
The advisory describes only undefined behavior or CUDA errors that crash the worker. It reports no code execution or data exposure.
- Is it exploited in the wild?
The sources do not report exploitation, and the entry has no CISA KEV data. EPSS is low, at 0.45%.
References
Read for this analysis:
- https://github.com/vllm-project/vllm/security/advisories/GHSA-7h4p-rffg-7823
- https://github.com/vllm-project/vllm/pull/45116
- https://github.com/vllm-project/vllm/commit/d598d239737cfa37bcfcb98886ec3f3557fc7198
- https://nvd.nist.gov/vuln/detail/CVE-2026-54235
- https://github.com/advisories/GHSA-7h4p-rffg-7823
- https://github.com/pypa/advisory-database/tree/main/vulns/vllm/PYSEC-2026-3405.yaml
- https://github.com/vllm-project/vllm
- https://pypi.org/project/vllm
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
