CVE-2026-54235: vLLM Temperature=NaN And Temperature=Infinity Bypass Validation Vulnerability

MODERATE
Advisory Identifier: GHSA-7h4p-rffg-7823
CVSS 6.5
CWE-1287
Published
Advisory Summary

CVE-2026-54235 is a MODERATE (CVSS 6.5) temperature=nan and temperature=infinity bypass validation vulnerability (CWE-1287: Improper Validation of Specified Type of Input) affecting vLLM libraries in the PyPI ecosystem. The issue involves temperature=nan and temperature=infinity bypass validation and propagate to gpu kernels. Remediation is available by upgrading affected packages to version 0.24.0.

CVE-2026-54235 at a Glance

CVE Identifier CVE-2026-54235
GHSA Identifier GHSA-7h4p-rffg-7823
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-1287: Improper Validation of Specified Type of Input
Affected Product vLLM
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2026-54235

To remediate this vulnerability, upgrade all affected vLLM dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

vllm fixed: 0.24.0
pip install vllm>=0.24.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show vllm

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-54235, inspect your installed packages using pip:

pip show vllm

Analyze the terminal output to locate any version of vLLM in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.24.0), your application is affected.

Note: The pip show vllm command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1287: Improper Validation of Specified Type of Input, where the product receives input that is expected to be of a certain type, but it does not validate or incorrectly validates that the input is actually of the expected type. In vLLM, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

CVE-2026-54235 Affected vLLM Versions

1 component(s)
Fixed Versions:
0.24.0
Product / Package Ecosystem Affected Versions Fixed Version
vllm
PyPI
≥ 0.8.5
< 0.24.0
0.24.0

References

Frequently Asked Questions

What is CVE-2026-54235?
CVE-2026-54235 is a security vulnerability in vLLM involving temperature=NaN and temperature=Infinity bypass validation and propagate to GPU kernels under CWE-1287: Improper Validation of Specified Type of Input.
Which vLLM versions are affected?
Affected versions include releases prior to 0.24.0 across affected packages: vllm.
What version fixes CVE-2026-54235?
Upgrading to 0.24.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is vllm affected?
Yes, vllm is affected in releases prior to 0.24.0. Upgrade your dependency to 0.24.0 or later.
What is the CVSS score of CVE-2026-54235?
CVE-2026-54235 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L.
What CWE is associated with CVE-2026-54235?
CVE-2026-54235 is classified under CWE-1287: Improper Validation of Specified Type of Input (The product receives input that is expected to be of a certain type, but it does not validate or incorrectly validates that the input is actually of the expected type.).
How can I check PyPI dependencies for CVE-2026-54235?
Run the dependency tree command: 'pip show vllm'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7h4p-rffg-7823",
  "modified" : "2026-07-17T16:40:01Z",
  "published" : "2026-06-17T14:02:22Z",
  "aliases" : [ "CVE-2026-54235" ],
  "summary" : "vLLM: temperature=NaN and temperature=Infinity bypass validation and propagate to GPU kernels",
  "details" : "## Summary\n\nAll 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.\n\n## Root Cause\n\n`sampling_params.py:384`:\n```python\nif 0 < self.temperature < _MAX_TEMP:  # NaN → False; +Inf → False\n```\n\n`sampling_params.py:462`:\n```python\nif self.temperature < 0.0:            # NaN → False; +Inf → False\n    raise VLLMValidationError(...)\n```\n\nNo `math.isnan()` or `math.isinf()` check exists anywhere in `sampling_params.py`.\n\nPython semantics (verified): `float('nan') < 0.0` → `False`, `float('inf') < 0.0` → `False`.\n\n\n## Impact\n\nCrash of inference worker on GPU kernel execution with NaN/Inf softmax input, degrading service for all concurrent users.\n\n## Remediation\n\nAdd `math.isfinite(self.temperature)` check in `_verify_args()`. Reject non-finite float values with a 400 error.\n\n## Fix\n\nA fix for this vulnerability was merged here: https://github.com/vllm-project/vllm/pull/45116",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "vllm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.8.5"
      }, {
        "fixed" : "0.24.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.23.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/vllm-project/vllm/security/advisories/GHSA-7h4p-rffg-7823"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-54235"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vllm-project/vllm/pull/45116"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vllm-project/vllm/commit/d598d239737cfa37bcfcb98886ec3f3557fc7198"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-7h4p-rffg-7823"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/vllm/PYSEC-2026-3405.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/vllm-project/vllm"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/vllm"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1287" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-17T14:02:22Z",
    "nvd_published_at" : "2026-06-22T23:16:31Z"
  }
}