CVE-2025-46722: vLLM has a Weakness in MultiModalHasher Image Hashing Implementation
CVE-2025-46722 is a hash collision in vLLM's multimodal input cache. MultiModalHasher hashed images from their raw pixel bytes only, so two images of different sizes could get the same hash and the cache could return the wrong result. vLLM 0.7.0 up to 0.9.0 is affected; upgrade to 0.9.0.
Published May 28, 2025 · Updated May 29, 2025 · Analysis Nov 1, 2026
What an attacker can do
In vllm/multimodal/hasher.py, MultiModalHasher.serialize_item serialized a PIL image with obj.tobytes(), which returns pixels without width, height or mode. A 30x100 image and a 100x30 image with the same byte sequence therefore hash the same. The cache treats them as one image and can serve results computed for another input. The advisory also points out that palette-based images (mode P) keep their palette in the info dictionary, which the hash ignored.
The advisory says video has the same weakness, since it is converted to a multi-dimensional numpy array. Audio is not affected, because librosa returns a fixed one-dimensional array.
An attacker with access to the API (the CVSS 3.1 vector asks for low privileges and high attack complexity) can craft an image that collides with another user's image. On a shared deployment, that can mean wrong model answers for other users, or answers drawn from cached data that belongs to a different request. The rated impact is low confidentiality and low availability. It does not give code execution.
Who is affected
The pip package vllm from 0.7.0 up to, but not including, 0.9.0, when serving multimodal models with image or video input and the multimodal cache active. Text-only serving is not exposed by this path. Check:
pip show vllmThe risk is greatest on shared servers where several users or tenants send images to the same instance.
vllm
- Ecosystem
- PyPI
- Affected
- >= 0.7.0, < 0.9.0
- Fixed in
- 0.9.0
- Check
pip show vllm
How to fix it
Upgrade to vLLM 0.9.0:
pip install --upgrade "vllm>=0.9.0"The fix is pull request 17378, "[Security] Fix image hash collision", merged May 2, 2025. The advisory recommends hashing image size, mode, format and the info dictionary along with the pixels. It gives no workaround. Until you upgrade, do not share one multimodal vLLM instance between users who do not trust each other.
How to tell if you were hit
There is no log signature for a collision. Look for odd multimodal responses that describe a different image than the one sent, and for requests that send unusual image dimensions with identical byte content (for example transposed dimensions). Compare vLLM's version across your serving fleet to find instances still on 0.7.0 to 0.8.x.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
In the file vllm/multimodal/hasher.py, the MultiModalHasher class has a security and data integrity issue in its image hashing method. Currently, it serializes PIL.Image.Image objects using only obj.tobytes(), which returns only the raw pixel data, without including metadata such as the image’s shape (width, height, mode). As a result, two images of different sizes (e.g., 30x100 and 100x30) with the same pixel byte sequence could generate the same hash value. This may lead to hash collisions, incorrect cache hits, and even data leakage or security risks.
Details
- Affected file:
vllm/multimodal/hasher.py - Affected method:
MultiModalHasher.serialize_item
https://github.com/vllm-project/vllm/blob/9420a1fc30af1a632bbc2c66eb8668f3af41f026/vllm/multimodal/hasher.py#L34-L35
- Current behavior: For
Image.Imageinstances, onlyobj.tobytes()is used for hashing. - Problem description:
obj.tobytes()does not include the image’s width, height, or mode metadata. - Impact: Two images with the same pixel byte sequence but different sizes could be regarded as the same image by the cache and hashing system, which may result in:
- Incorrect cache hits, leading to abnormal responses
- Deliberate construction of images with different meanings but the same hash value
Recommendation
In the serialize_item method, serialization of `Image.Image` objects should include not only pixel data, but also all critical metadata—such as dimensions (size), color mode (mode), format, and especially the info dictionary. The info dictionary is particularly important in palette-based images (e.g., mode 'P'), where the palette itself is stored in info. Ignoring info can result in hash collisions between visually distinct images with the same pixel bytes but different palettes or metadata. This can lead to incorrect cache hits or even data leakage.
Summary: Serializing only the raw pixel data is insecure. Always include all image metadata (size, mode, format, info) in the hash calculation to prevent collisions, especially in cases like palette-based images.
Impact for other modalities For the influence of other modalities, since the video modality is transformed into a multi-dimensional array containing the length, width, time, etc. of the video, the same problem exists due to the incorrect sequence of numpy as well.
For audio, since the momo function is not enabled in librosa.load, the loaded audio is automatically encoded into single channels by librosa and returns a one-dimensional array of numpy, thus keeping the structure of numpy fixed and not affected by this issue.
Fixes
- https://github.com/vllm-project/vllm/pull/17378
Credited to kexinoh, DarkLight1337, russellb.
Questions
- Which vLLM version fixes CVE-2025-46722?
0.9.0. Affected versions run from 0.7.0 up to, but not including, 0.9.0.
- Are audio inputs affected?
No. The advisory says librosa returns a fixed one-dimensional array, so audio keeps a fixed structure. Images are affected, and video has the same weakness.
- Can this execute code?
No. It is an integrity issue in a cache key. The impact is wrong cached results and possible information mix-up between requests.
- Why is the severity medium?
The CVSS 3.1 vector (4.2) needs high attack complexity and low privileges, with low impact on confidentiality and availability.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More vLLM vulnerabilities
All vLLM entriesCVE-2026-115911
vLLM: DoS via unbounded chat_template Jinja2 rendering exhausts the renderer thread pool
medium6.5Oct 28, 2026CVE-2026-115912
vLLM: Public multimodal SHM handle forgery reaches worker-side `pickle.loads()` with insecure serialization disabled
high7.5Oct 28, 2026CVE-2026-115913
vLLM: Phi-4 multimodal audio encoder materializes and retains full attention matrices: a single max-length audio OOM-crashes the vLLM engine
medium6.5Oct 28, 2026CVE-2026-115914
vLLM DeepSeek-OCR image processing vulnerable to denial of service
medium6.5Oct 28, 2026CVE-2026-115915
vLLM: Untrusted EPS inputs can trigger denial of service or Ghostscript RCE
high8.1Oct 28, 2026CVE-2026-115916
vLLM: Out-of-vocabulary prompt token id passes input validation and triggers a CUDA device-side assert (engine crash / DoS)
medium6.5Oct 28, 2026
