Vulnerability · Published Feb 7, 2025 · Assigned by GitHub_M
CVE-2025-25183vLLM using built-in hash() from Python 3.12 leads to predictable hash collisions in vLLM prefix cache
Low 2.6
In plain English
A low-severity security flaw in vllm from vllm-project. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 9% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
vLLM is a high-throughput and memory-efficient inference and serving engine for LLMs. Maliciously constructed statements can lead to hash collisions, resulting in cache reuse, which can interfere with subsequent responses and cause unintended behavior. Prefix caching makes use of Python's built-in hash() function. As of Python 3.12, the behavior of hash(None) has changed to be a predictable constant value. This makes it more feasible that someone could try exploit hash collisions. The impact of a collision would be using cache that was generated using different content. Given knowledge of prompts in use and predictable hashing behavior, someone could intentionally populate the cache using a prompt known to collide with another prompt in use. This issue has been addressed in version 0.7.2 and all users are advised to upgrade. There are no known workarounds for this vulnerability.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | vllm | 0.7.2 | GHSA-rm76-4mrf-v9r8 |
| PyPI | vllm | 0.7.2 | PYSEC-2025-62 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| vllm-project | vllm | < 0.7.2 |
Weakness: CWE-354 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:N
References
- https://github.com/vllm-project/vllm/security/advisories/GHSA-rm76-4mrf-v9r8 x_refsource_CONFIRM
- https://github.com/vllm-project/vllm/pull/12621 x_refsource_MISC
- https://github.com/python/cpython/commit/432117cd1f59c76d97da2eaff55a7d758301dbc7 x_refsource_MISC