vLLM using built-in hash() from Python 3.12 leads to predictable hash collisions in vLLM prefix cache
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
vllmPyPI | < 0.7.2 | 0.7.2 |
Affected products
6- osv-coords5 versionspkg:apk/chainguard/py3.10-vllm-cuda-11.8pkg:apk/chainguard/py3.10-vllm-cuda-12.6pkg:apk/chainguard/py3.10-wheels-vllm-cuda-11.8pkg:apk/chainguard/tritonserver-backend-vllm-24.04pkg:pypi/vllm
< 0.7.2-r0+ 4 more
- (no CPE)range: < 0.7.2-r0
- (no CPE)range: < 0.7.2-r0
- (no CPE)range: < 0.7.2-r0
- (no CPE)range: < 24.04-r9
- (no CPE)range: < 0.7.2
Patches
Vulnerability mechanics
References
8- github.com/advisories/GHSA-rm76-4mrf-v9r8ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-25183ghsaADVISORY
- github.com/pypa/advisory-database/tree/main/vulns/vllm/PYSEC-2025-62.yamlghsaWEB
- github.com/python/cpython/commit/432117cd1f59c76d97da2eaff55a7d758301dbc7ghsax_refsource_MISCWEB
- github.com/python/cpython/pull/99541ghsaWEB
- github.com/vllm-project/vllm/commit/73b35cca7f3745d07d439c197768b25d88b6ab7fghsaWEB
- github.com/vllm-project/vllm/pull/12621ghsax_refsource_MISCWEB
- github.com/vllm-project/vllm/security/advisories/GHSA-rm76-4mrf-v9r8ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.