---
id: CVE-2026-54235
aliases:
  - GHSA-7h4p-rffg-7823
  - PYSEC-2026-3405
title: >-
  vLLM: temperature=NaN and temperature=Infinity bypass validation and propagate
  to GPU kernels
summary: >-
  vLLM: temperature=NaN and temperature=Infinity bypass validation and propagate
  to GPU kernels
severity: medium
cvss: 6.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L'
vendor: vllm
product: vllm
ecosystem: pip
affected:
  - 'vllm >= 0.8.5, < 0.24.0'
patched:
  - vllm 0.24.0
published: '2026-06-17'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T03:50:48.693939195Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-7h4p-rffg-7823'
references:
  - url: >-
      https://github.com/vllm-project/vllm/security/advisories/GHSA-7h4p-rffg-7823
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-54235'
  - url: 'https://github.com/vllm-project/vllm/pull/45116'
  - url: >-
      https://github.com/vllm-project/vllm/commit/d598d239737cfa37bcfcb98886ec3f3557fc7198
  - url: 'https://github.com/advisories/GHSA-7h4p-rffg-7823'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/vllm/PYSEC-2026-3405.yaml
  - url: 'https://github.com/vllm-project/vllm'
  - url: 'https://pypi.org/project/vllm'
tags:
  - osv
  - pip
  - ghsa
epss: 0.0045
epssPercentile: 0.36589
cwe:
  - CWE-1287
ingestedAt: '2026-06-29T14:31:47.441Z'
---

## Overview

## 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

## Affected packages

- `vllm >= 0.8.5, < 0.24.0`

## Remediation

Upgrade to a patched release:

- `vllm 0.24.0`
