vLLM: temperature=NaN and temperature=Infinity bypass validation and propagate to GPU kernels
Description
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: ``python if 0 < self.temperature < _MAX_TEMP: # NaN → False; +Inf → False ``
sampling_params.py:462: ``python 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
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
vllmPyPI | <= 0.23.0 | — |
Affected products
5- osv-coords4 versionspkg:apk/chainguard/py3.10-vllm-cuda-12.4pkg:apk/chainguard/py3.12-vllm-cuda-12.4pkg:apk/chainguard/vllm-cuda-13.2pkg:apk/chainguard/vllm-openai-cuda-13.0
< 0.18.1-r5+ 3 more
- (no CPE)range: < 0.18.1-r5
- (no CPE)range: < 0.18.1-r5
- (no CPE)range: < 0.24.0-r0
- (no CPE)range: < 0.24.0-r1
Patches
Vulnerability mechanics
References
4News mentions
1- vLLM: Six CVEs Disclosed in 21 Hours — Critical Auth Bypass, Code Execution, and GPU Memory LeaksVypr Intelligence · Jun 17, 2026