CVE-2026-54235: vLLM: temperature=NaN and temperature=Infinity bypass validation and propagate to GPU kernels
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
samplingparams.py:384: python if 0 < self.temperature < MAXTEMP: # NaN → False; +Inf → False
samplingparams.py:462: python if self.temperature < 0.0: # NaN → False; +Inf → False raise VLLMValidationError(...)
No math.isnan() or math.isinf() check exists anywhere in samplingparams.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 verifyargs(). 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
Other sources
vLLM is an inference and serving engine for large language models (LLMs). Prior to 0.23.1rc0, ll 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. This vulnerability is fixed in 0.23.1rc0.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/vllmto a version that resolves this vulnerability.Fixed in 0.23.1rc0 - Configuration
Add math.isfinite(self.temperature) check in _verify_args() in sampling_params.py and raise VLLMValidationError (resulting in HTTP 400) for non-finite temperature values (NaN or +Infinity) so they are rejected before reaching GPU kernels.
vllm (sampling_params.py) temperature validation in _verify_args() = math.isfinite(self.temperature) == True
Event History
Frequently Asked Questions
What is the severity of CVE-2026-54235?
CVE-2026-54235 has a medium severity rating of 6.9.
How does CVE-2026-54235 affect software performance?
CVE-2026-54235 allows bypassing validation checks, which can lead to undefined behavior in GPU kernels.
What causes the vulnerability in CVE-2026-54235?
CVE-2026-54235 is caused by temperature validation gates using comparison operators that do not handle NaN and positive Infinity correctly.
Are there any known exploits for CVE-2026-54235?
As of now, there are no known public exploits specifically targeting CVE-2026-54235.
How can I mitigate CVE-2026-54235 in my application?
To mitigate CVE-2026-54235, ensure proper validation checks are implemented to handle NaN and Infinity values in temperature inputs.