CVE-2024-8939: Vllm Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-wc36-9694-f9rf
CVSS 6.2
CWE-400
Published
Advisory Summary

CVE-2024-8939 is a MODERATE (CVSS 6.2) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Vllm libraries in the PyPI ecosystem. The issue involves vllm denial of service via the best_of parameter. Remediation is available in the latest vendor maintenance releases.

CVE-2024-8939 at a Glance

CVE Identifier CVE-2024-8939
GHSA Identifier GHSA-wc36-9694-f9rf
Severity MODERATE
CVSS v3.1 Base Score 6.2
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Vllm
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.2

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

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

How to Fix CVE-2024-8939

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: Latest secure release
pip install vllm>=Latest secure release
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-2024-8939, 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 the patched release), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. 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

A vulnerability was found in the ilab model serve component, where improper handling of the best_of parameter in the vllm JSON web API can lead to a Denial of Service (DoS). The API used for LLM-based sentence or chat completion accepts a best_of parameter to return the best completion from several options. When this parameter is set to a large value, the API does not handle timeouts or resource exhaustion properly, allowing an attacker to cause a DoS by consuming excessive system resources. This leads to the API becoming unresponsive, preventing legitimate users from accessing the service.

CVE-2024-8939 Affected Vllm Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
vllm
PyPI
≤ 0.5.0.post1

References

Frequently Asked Questions

What is CVE-2024-8939?
CVE-2024-8939 is a security vulnerability in Vllm involving vLLM Denial of Service via the best_of parameter under CWE-400: Uncontrolled Resource Consumption.
Which Vllm versions are affected?
Affected versions include releases prior to current release patches across affected packages: vllm.
What version fixes CVE-2024-8939?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is vllm affected?
Yes, vllm is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2024-8939?
CVE-2024-8939 has a CVSS v3.1 base score of 6.2 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2024-8939?
CVE-2024-8939 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check PyPI dependencies for CVE-2024-8939?
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-wc36-9694-f9rf",
  "modified" : "2024-09-17T21:56:55Z",
  "published" : "2024-09-17T18:33:26Z",
  "aliases" : [ "CVE-2024-8939" ],
  "summary" : "vLLM Denial of Service via the best_of parameter",
  "details" : "A vulnerability was found in the ilab model serve component, where improper handling of the best_of parameter in the vllm JSON web API can lead to a Denial of Service (DoS). The API used for LLM-based sentence or chat completion accepts a best_of parameter to return the best completion from several options. When this parameter is set to a large value, the API does not handle timeouts or resource exhaustion properly, allowing an attacker to cause a DoS by consuming excessive system resources. This leads to the API becoming unresponsive, preventing legitimate users from accessing the service.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "vllm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.5.0.post1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-8939"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vllm-project/vllm/issues/6137"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2024-8939"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2312782"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/vllm-project/vllm"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-17T21:56:55Z",
    "nvd_published_at" : "2024-09-17T17:15:11Z"
  }
}