CourseTransformers: From Attention to Trained, Served and Interpreted Models · Module 11: Inference and Serving · part 86 of 111
Part 86 · Module 11: Inference and Serving

Incident: A guessable hash that shared another prompt's cache

19 min read·13 Oct 2026
Module 11 · Incident file · About 40 minutes

What happened

VLLM PREFIX CACHE: A PREDICTABLE KEY 31 Jan 2025 PR opened 4 Feb 2025 fix merged 6 Feb 2025 advisory, CVE v0.11 SHA-256 default 13 Oct 2026 docs read fixed in 0.7.2: earlier versions affected; severity Low, CVSS 2.6
The fix (green) landed two days before the advisory (red); later releases made SHA-256 the default key (green). Dates from the advisory, the pull request and vLLM's docs.

On 6 February 2025 the vLLM project published security advisory GHSA-rm76-4mrf-v9r8, CVE-2025-25183: "vLLM using built-in hash() from Python 3.12 leads to predictable hash collisions in vLLM prefix cache" (advisory). Its summary: "Maliciously constructed prompts can lead to hash collisions, resulting in prefix cache reuse", which can interfere with later responses. A user, kexinoh, reported it; Russell Bryant coordinated.

The cause was one function. "vLLM's prefix caching makes use of Python's built-in hash() function", and since Python 3.12 hash(None) is a predictable constant. The advisory states the cost plainly: "The impact of a collision would be using cache that was generated using different content." It rated the issue Low (CVSS 2.6). Versions before 0.7.2 were affected.

The fix, pull request #12621 ("Improve hash collision avoidance in prefix caching", merged 4 February 2025), seeds the first block's hash with a value that changes on every run, "the behavior we got here prior to Python 3.12" (PR). The advisory notes that SHA-256 would reduce collisions further, at some cost. vLLM's design notes now say older versions' key "was not guaranteed to be collision-free" and that since v0.11 "the default hashing algorithm is sha256" (docs, read 13 October 2026).

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.