Mittel

vLLM: Quadratic Time Complexity in Input Token Processing​ leads to denial of service

  • Veröffentlicht: 29.04.2025
  • Aktualisiert: 11.10.2026 14:19

Summary

A critical performance vulnerability has been identified in the input preprocessing logic of the multimodal tokenizer. The code dynamically replaces placeholder tokens (e.g., <|audio_|>, <|image_|>) with repeated tokens based on precomputed lengths. Due to ​​inefficient list concatenation operations​​, the algorithm exhibits ​​quadratic time complexity (O(n²))​​, allowing malicious actors to trigger resource exhaustion via specially crafted inputs.

Details

​​Affected Component​​: input_processor_for_phi4mm function. https://github.com/vllm-project/vllm/blob/8cac35ba435906fb7eb07e44fe1a8c26e8744f4e/vllm/model_executor/models/phi4mm.py#L1182-L1197

The code modifies the input_ids list in-place using input_ids = input_ids[:i] + tokens + input_ids[i+1:]. Each concatenation operation copies the entire list, leading to O(n) operations per replacement. For k placeholders expanding to m tokens, total time becomes O(kmn), approximating O(n²) in worst-case scenarios.

PoC

Test data demonstrates exponential time growth:

python
test_cases = [100, 200, 400, 800, 1600, 3200, 6400]
run_times = [0.002, 0.007, 0.028, 0.136, 0.616, 2.707, 11.854]  # seconds

Doubling input size increases runtime by ~4x (consistent with O(n²)).

Impact

​​Denial-of-Service (DoS):​​ An attacker could submit inputs with many placeholders (e.g., 10,000 <|audio_1|> tokens), causing CPU/memory exhaustion. Example: 10,000 placeholders → ~100 million operations.

Remediation Recommendations​

Precompute all placeholder positions and expansion lengths upfront. Replace dynamic list concatenation with a single preallocated array.

python
# Pseudocode for O(n) solution
new_input_ids = []
for token in input_ids:
    if token is placeholder:
        new_input_ids.extend([token] * precomputed_length)
    else:
        new_input_ids.append(token)

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Python (PyPI) vllm >= 0.8.0, < 0.8.5 0.8.5

Verweise

CVSS-Wert 6.5/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Schwäche (CWE)
CWE-1333
Plattform
Python (PyPI)
Paket
vllm
Veröffentlicht
29.04.2025
Aktualisiert
11.10.2026 14:19

Quellen und Lizenzen

OSV / GitHub Advisory Database - PYSEC-2026-2022 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-vc6m-hm49-g9qg - CC BY 4.0

Schwachstellenhistorie: vllm

Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (94) im Archiv
Einträge insgesamt
94
Erste → letzte
09.2024 10.2026
Ohne Fix
5
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 9
  • Hoch 23
  • Mittel 47
  • Niedrig 4
  • Nicht bewertet 11

Veröffentlichungen pro Jahr

  1. 2024: 2
  2. 2025: 30
  3. 2026: 62
Schweregrad:
  1. vLLM: Quadratic Time Complexity in Input Token Processing​ leads to denial of service dieser Eintrag
    Mittel · 6.5 CVE-2025-46560 >= 0.8.0, < 0.8.5 0.8.5
  2. Hoch · 7.5 CVE-2026-54234 >= 0.17.1, < 0.24.0 0.24.0
  3. Hoch CVE-2026-55514 >= 0.12.0, < 0.24.0 0.24.0
  4. Kritisch · 9.1 CVE-2026-48746 >= 0.3.0, < 0.22.0 0.22.0
  5. Kritisch · 9.8 CVE-2026-22778 >= 0.8.3, < 0.14.1 0.14.1
  6. Hoch · 8.8 CVE-2026-22807 >= 0.10.1, < 0.14.0 0.14.0
  7. Hoch · 8.8 CVE-2026-56340 >= 0.10.2, < 0.13.0 0.13.0
  8. Hoch · 6.5 CVE-2025-62372 >= 0.5.5, < 0.11.1 0.11.1
  9. Hoch · 8.8 CVE-2025-62164 >= 0.10.2, < 0.11.1 0.11.1
  10. Hoch · 7.5 CVE-2025-59425 < 0.11.0 0.11.0
  11. Hoch · 8.8 CVE-2025-9141 >= 0.10.0, < 0.10.1.1 0.10.1.1
Mehr anzeigen (12) 21 von 33 angezeigt

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.