一、 漏洞 CVE-2025-25183 基础信息
漏洞信息
# vLLM 使用 Python 3.12 内置的 hash() 函数导致 vLLM 前缀缓存中出现可预测的哈希碰撞问题

## 概述
vLLM 是一个用于大规模语言模型 (LLM) 的高性能和内存高效的推理和服务引擎。恶意构造的语句可能导致哈希碰撞,从而导致缓存复用,并干扰后续响应,引发意外行为。

## 影响版本
该漏洞影响 vLLM 0.7.2 之前的版本。

## 细节
前缀缓存利用了 Python 内置的 `hash()` 函数。从 Python 3.12 开始,`hash(None)` 的行为变为一个可预测的常量值。这使得利用哈希碰撞变得更为可行。如果发生碰撞,会导致使用由不同内容生成的缓存。攻击者可以利用已知的提示语和可预测的哈希行为,故意填充缓存,使用与正在使用的其他提示语发生碰撞的提示语。

## 影响
该问题已在 v0.7.2 版本中得到解决,所有用户应升级。目前没有已知的工作绕过此漏洞的方法。
备注
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
vLLM using built-in hash() from Python 3.12 leads to predictable hash collisions in vLLM prefix cache
来源:美国国家漏洞数据库 NVD
漏洞描述信息
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.
来源:美国国家漏洞数据库 NVD
CVSS信息
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:N
来源:美国国家漏洞数据库 NVD
漏洞类别
完整性检查值验证不恰当
来源:美国国家漏洞数据库 NVD
漏洞标题
vLLM 安全漏洞
来源:中国国家信息安全漏洞库 CNNVD
漏洞描述信息
vLLM是vLLM开源的一个适用于 LLM 的高吞吐量和内存高效推理和服务引擎。 vLLM存在安全漏洞,该漏洞源于恶意构造的语句可能导致哈希冲突,从而导致缓存重用,这可能会干扰后续响应并导致意外行为。
来源:中国国家信息安全漏洞库 CNNVD
CVSS信息
N/A
来源:中国国家信息安全漏洞库 CNNVD
漏洞类别
其他
来源:中国国家信息安全漏洞库 CNNVD
二、漏洞 CVE-2025-25183 的公开POC
# POC 描述 源链接 神龙链接
三、漏洞 CVE-2025-25183 的情报信息
  • 标题: [Core] Improve hash collision avoidance in prefix caching by russellb · Pull Request #12621 · vllm-project/vllm · GitHub -- 🔗来源链接

    标签: x_refsource_MISC

  • 标题: vLLM using built-in hash() from Python 3.12 leads to predictable hash collisions in vLLM prefix cache · Advisory · vllm-project/vllm · GitHub -- 🔗来源链接

    标签: x_refsource_CONFIRM

  • 标题: gh-99540: Constant hash for _PyNone_Type to aid reproducibility (GH-9… · python/cpython@432117c · GitHub -- 🔗来源链接

    标签: x_refsource_MISC

  • https://nvd.nist.gov/vuln/detail/CVE-2025-25183