GHSA-hf3c-wxg2-49q9: Vllm Denial of Service Vulnerability

MODERATE
CVSS 6.5
CWE-1395 CWE-770
Published
Advisory Summary

GHSA-hf3c-wxg2-49q9 is a MODERATE (CVSS 6.5) denial of service vulnerability (CWE-1395: Dependency on Vulnerable Third-Party Component) affecting Vllm libraries in the PyPI ecosystem. The issue involves vllm vulnerable to denial of service by abusing xgrammar cache. Remediation is available by upgrading affected packages to version 0.8.4.

GHSA-hf3c-wxg2-49q9 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-hf3c-wxg2-49q9
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-1395: Dependency on Vulnerable Third-Party Component
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:L/UI:N/S:U/C:N/I:N/A:H).

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

How to Fix GHSA-hf3c-wxg2-49q9

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.8.4
pip install vllm>=0.8.4
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 GHSA-hf3c-wxg2-49q9, 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.8.4), 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-1395: Dependency on Vulnerable Third-Party Component, where the product has a dependency on a third-party component that contains one or more known vulnerabilities. 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

### Impact This report is to highlight a vulnerability in XGrammar, a library used by the structured output feature in vLLM. The XGrammar advisory is here: https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3 The [xgrammar](https://xgrammar.mlc.ai/docs/) library is the default backend used by vLLM to support structured output (a.k.a. guided decoding). Xgrammar provides a required, built-in cache for its compiled grammars stored in RAM. xgrammar is available by default through the OpenAI compatible API server with both the V0 and V1 engines. A malicious user can send a stream of very short decoding requests with unique schemas, resulting in an addition to the cache for each request. This can result in a Denial of Service by consuming all of the system's RAM. Note that even if vLLM was configured to use a different backend by default, it is still possible to choose xgrammar on a per-request basis using the `guided_decoding_backend` key of the `extra_body` field of the request with the V0 engine. This per-request choice is not available when using the V1 engine. ### Patches * https://github.com/vllm-project/vllm/pull/16283 ### Workarounds There is no way to workaround this issue in existing versions of vLLM other than preventing untrusted access to the OpenAI compatible API server. ### References * https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3

GHSA-hf3c-wxg2-49q9 Affected Vllm Versions

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

References

Frequently Asked Questions

What is GHSA-hf3c-wxg2-49q9?
GHSA-hf3c-wxg2-49q9 is a security vulnerability in Vllm involving vLLM vulnerable to Denial of Service by abusing xgrammar cache under CWE-1395: Dependency on Vulnerable Third-Party Component.
Which Vllm versions are affected?
Affected versions include releases prior to 0.8.4 across affected packages: vllm.
What version fixes GHSA-hf3c-wxg2-49q9?
Upgrading to 0.8.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is vllm affected?
Yes, vllm is affected in releases prior to 0.8.4. Upgrade your dependency to 0.8.4 or later.
What is the CVSS score of GHSA-hf3c-wxg2-49q9?
GHSA-hf3c-wxg2-49q9 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with GHSA-hf3c-wxg2-49q9?
GHSA-hf3c-wxg2-49q9 is classified under CWE-1395: Dependency on Vulnerable Third-Party Component (The product has a dependency on a third-party component that contains one or more known vulnerabilities.).
How can I check PyPI dependencies for GHSA-hf3c-wxg2-49q9?
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-hf3c-wxg2-49q9",
  "modified" : "2025-04-15T21:21:04Z",
  "published" : "2025-04-15T21:21:04Z",
  "aliases" : [ ],
  "summary" : "vLLM vulnerable to Denial of Service by abusing xgrammar cache",
  "details" : "### Impact\n\nThis report is to highlight a vulnerability in XGrammar, a library used by the structured output feature in vLLM. The XGrammar advisory is here: https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3\n\nThe [xgrammar](https://xgrammar.mlc.ai/docs/) library is the default backend used by vLLM to support structured output (a.k.a. guided decoding). Xgrammar provides a required, built-in cache for its compiled grammars stored in RAM. xgrammar is available by default through the OpenAI compatible API server with both the V0 and V1 engines.\n\nA malicious user can send a stream of very short decoding requests with unique schemas, resulting in an addition to the cache for each request. This can result in a Denial of Service by consuming all of the system's RAM.\n\nNote that even if vLLM was configured to use a different backend by default, it is still possible to choose xgrammar on a per-request basis using the `guided_decoding_backend` key of the `extra_body` field of the request with the V0 engine. This per-request choice is not available when using the V1 engine. \n### Patches\n\n* https://github.com/vllm-project/vllm/pull/16283\n\n### Workarounds\n\nThere is no way to workaround this issue in existing versions of vLLM other than preventing untrusted access to the OpenAI compatible API server.\n\n### References\n\n* https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "vllm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.6.5"
      }, {
        "fixed" : "0.8.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vllm-project/vllm/security/advisories/GHSA-hf3c-wxg2-49q9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vllm-project/vllm/pull/16283"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vllm-project/vllm/commit/cb84e45ac75b42ba6795145923e8eb323bb825ad"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/vllm-project/vllm"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1395", "CWE-770" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-04-15T21:21:04Z",
    "nvd_published_at" : null
  }
}