vLLM: temperature=NaN and temperature=Infinity bypass validation and propagate to GPU kernels
Moderate severity
GitHub Reviewed
Published
Jun 11, 2026
in
vllm-project/vllm
•
Updated Jun 17, 2026
Description
Published to the GitHub Advisory Database
Jun 17, 2026
Reviewed
Jun 17, 2026
Last updated
Jun 17, 2026
Summary
All temperature validation gates use comparison operators (
<,>), which silently evaluate toFalseforNaNand for positiveInfinityin 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:-Infinityis correctly caught.Root Cause
sampling_params.py:384:sampling_params.py:462:No
math.isnan()ormath.isinf()check exists anywhere insampling_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: vllm-project/vllm#45116
References