CWE
1333
Advisory Published
Updated

GHSA-vc6m-hm49-g9qg

First published: Tue Apr 29 2025(Updated: )

### 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) ```

Affected SoftwareAffected VersionHow to fix
pip/vllm>=0.8.0<0.8.5
0.8.5

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of GHSA-vc6m-hm49-g9qg?

    GHSA-vc6m-hm49-g9qg is classified as a critical performance vulnerability.

  • How do I fix GHSA-vc6m-hm49-g9qg?

    To fix GHSA-vc6m-hm49-g9qg, upgrade the vllm package to version 0.8.5.

  • What software is affected by GHSA-vc6m-hm49-g9qg?

    GHSA-vc6m-hm49-g9qg affects the vllm package versions between 0.8.0 and 0.8.5.

  • What specific issue does GHSA-vc6m-hm49-g9qg describe?

    GHSA-vc6m-hm49-g9qg describes an inefficient list concatenation in the input preprocessing logic of the multimodal tokenizer.

  • Is GHSA-vc6m-hm49-g9qg a widespread vulnerability?

    GHSA-vc6m-hm49-g9qg may affect any project that relies on the vulnerable versions of the vllm package.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203