Skip to content
OpenAdvisories
Low · 2.6 CVE-2025-25183 EUVD-2025-4074GHSA-rm76-4mrf-v9r8PYSEC-2025-62

vLLM using built-in hash() from Python 3.12 leads to predictable hash collisions in vLLM prefix cache

Published Feb 7, 2025 · Updated Feb 12, 2025 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
vllm-project vllm < 0.7.2 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI vllm < 0.7.2 0.7.2 GHSA-rm76-4mrf-v9r8

References