Research · Incident

Detecting vLLM media exhaustion before the GPU looks busy

Last reviewed: by Dr. Austin Osuide

A small multimodal request can exhaust a vLLM API server before token or GPU dashboards show the cause; correlate request controls, host resources, queue pressure and accelerator use to catch it.

In this research
  1. Contribution
  2. The pattern
  3. Why it matters to cloud defenders
  4. ATT&CK mapping
  5. Detection guidance
  6. What to do now
Research snapshot
Type
Incident
Reviewed
2026-11-20
ATT&CK
T1190, T1499

Contribution

This post adds a detection method for vLLM media exhaustion that separates work done before inference from work done by the model. The method joins gateway request shape, API-server CPU and memory, vLLM queue metrics, and GPU utilisation so a small media request that burns the host while the GPU remains quiet does not hide inside an ordinary time-to-first-token alert.

The pattern

A run of vLLM advisories has exposed the same architectural weakness through different inputs: untrusted media can consume substantial resources before a model generates its first token. The vulnerable work sits in download, decode, sampling, patch enumeration, or request preparation. Normal model-serving dashboards tend to start their useful story later, at tokenisation, queueing, prefill, or decode. That leaves defenders watching the expensive accelerator while the API process is being hurt elsewhere.

The clearest example is vLLM advisory GHSA-58v5-2m8f-94pr, assigned CVE-2026-105760. A caller to the OpenAI-compatible chat endpoint could select the GLMGA video backend and send very large fps and max_frames values with a valid two-frame video. The loader built and deduplicated an attacker-sized Python index list before OpenCV decoded the two useful frames. Versions from 0.23.0rc2 to 0.29.x were affected; 0.30.0 contains the fix.

The request did not need a large upload. The advisory's example used compact JSON values of 500,000 for fps and max_frames. Increasing them enlarged the temporary list and deduplication work even though the final decoded frame set stayed at two. In an unauthenticated deployment, any remote client could reach the path. With an API key configured, any key holder could still reach it. Rate limits based only on bytes, tokens, or requests per minute would miss the work multiplier.

A second vLLM advisory, GHSA-p6g9-7v3x-m8mv, describes another pre-inference family. Remote images, audio, or video could be fully downloaded before a size check ran. Inline audio could be fully base64-decoded first. A batch speech path applied its file-size check after the complete object existed in memory. The Rust frontend could start one fetch task per media part before applying a per-modality item limit. The affected resource changed between paths, but the order was the same: acquisition work first, control second.

A proposed Cohere2 Vision change follows the same lesson. vLLM pull request 56044 would limit request-level max_patches before calling the Hugging Face patch enumerator. Without that bound, a small image plus a large override could trigger quadratic CPU work in nested loops. The proposal adds an operator-controlled cap and rejects values outside it before processor construction. It was closed without being merged, so do not assume a released vLLM version enforces the cap.

There is also a model-level path that reaches the opposite side of the pipeline. The VidDoS paper shows a universal visual trigger that suppresses early termination and drives video-language models towards long output. Its experiments reported more than 205 times the clean token count and more than 15 times the clean inference latency. This attack burns GPU decode rather than API-server preprocessing. The observable distinction matters because the controls differ: input validation and bounded media workers address the former; output-token limits and generation anomaly detection constrain the latter.

Taken together, these sources describe two availability attacks that ordinary latency alerts merge into one symptom. Pre-inference exhaustion raises host CPU, memory, or egress before the scheduler sees useful token work. Decoder exhaustion raises generated-token volume and GPU time after the request reaches the model. A useful detector must say which side of that boundary is failing.

Why it matters to cloud defenders

Self-hosted inference commonly runs as a Kubernetes service behind an API gateway, with a CPU-heavy frontend beside one or more costly GPU workers. A tenant may share the API server, media executor, model replica, or all three. One hostile request can therefore delay unrelated users even if namespace and model permissions are correct.

The first operational trap is billing. Teams often meter prompt and completion tokens because those units map neatly to cost. The GLMGA and Cohere2 cases consume substantial CPU before token accounting reflects the work. The remote-media case can add outbound bandwidth and resident memory. A tenant can produce low billable token volume while causing high infrastructure cost and queue delay.

The second trap is autoscaling. A GPU autoscaler may see low utilisation during media download or CPU patch enumeration and decline to add replicas. A CPU autoscaler can add more API pods, but that can multiply remote fetches and move the bottleneck to egress, a shared cache, or the upstream media host. Scaling on end-to-end latency alone treats an attack-controlled work factor as legitimate demand.

The third trap is misleading time-to-first-token data. The vLLM multimodal metrics proposal says the frontend's arrival_time starts when tokenisation begins. Work before that point can be invisible to model timing. The change proposes separate histograms for media download, decode, bytes, item resolution, and total multimodal preprocessing. That proposal is useful evidence of the gap, but operators should not assume those metric names exist in their deployed release until the change lands and their build exposes them.

Cloud relevance is not limited to public inference APIs. Internal agent platforms, document processors, video search, support tools, and evaluation services may accept media from authenticated users or from URLs supplied by an upstream workflow. A stolen low-privilege API key is enough for several affected paths. The security boundary is therefore the point where a request chooses media work, not merely the internet-facing load balancer.

ATT&CK mapping

The entry point maps to T1190, Exploit Public-Facing Application, when an exposed vLLM endpoint accepts attacker-controlled media options or content that reaches a vulnerable loader. Authentication changes the precondition, not the behaviour. An API key can narrow exposure while still leaving every authorised tenant able to exercise the expensive path.

The resource effect maps to T1499, Endpoint Denial of Service. These requests exhaust CPU, memory, outbound bandwidth, or GPU decode on the host that serves the API, which delays other tenants or causes an out-of-memory restart. The cited advisories describe availability impact only. Nothing in them shows the attacker putting the consumed resources to work, so T1496, Resource Hijacking is not claimed here. The detection principle is to compare resource consumption with the workload's expected business output. High compute with little accepted media, few prompt tokens, or no useful completion is the tell.

T1190 covers the observable entry stage. T1499 covers the resource exhaustion and the service impact that the detector measures.

The chain is short but has two materially different endings. In a pre-inference attack, the payoff is API-process pressure and shared-queue delay before model execution. In a VidDoS-style decoder attack, the payoff is prolonged generation, high GPU utilisation, and output that reaches the configured token ceiling. Defenders should retain both branches in the incident timeline rather than labelling every slow response as GPU saturation.

Detection guidance

Build the detector around one request identifier propagated from the gateway into API logs and, where supported, model traces. Record the authenticated principal, source address, route, request bytes, response status, duration, model name, media count, media type, and a bounded summary of control fields. For video requests, retain whether media_io_kwargs was present and the numeric values of fps and max_frames. For image requests, retain max_patches from flat or nested multimodal processor options. Do not store full prompts, images, audio, bearer tokens, or media URLs in a general security index.

At the gateway, reject or flag these request shapes before forwarding:

  1. A client supplies a media backend when the service contract does not allow backend selection.
  2. fps, max_frames, or max_patches exceeds the operator's model-specific ceiling, is not an integer, or appears in a nested location that bypasses the normal schema.
  3. The media-part count exceeds the allowed count before any remote fetch starts.
  4. A remote media URL returns more bytes than the compressed-media budget, including after redirects.

The alert should not depend on a published exploit value. Use the configured ceiling as the boundary. An attacker can stay below a headline proof-of-concept number and repeat requests concurrently.

For deployments on Kubernetes, join gateway events to container and node telemetry over a short request window. The useful host signals are rate of container_cpu_usage_seconds_total and container_memory_working_set_bytes (both cAdvisor container metrics), container restarts, and network receive and transmit bytes for the API-server pod. Add accelerator utilisation from the GPU exporter. Then join the same window to vLLM's documented metrics: vllm:num_requests_running, vllm:num_requests_waiting, vllm:request_queue_time_seconds, vllm:time_to_first_token_seconds, vllm:request_prompt_tokens, vllm:request_generation_tokens, vllm:request_decode_time_seconds, and vllm:request_success_total by its finished_reason label.

A pre-inference exhaustion alert should key on this combination:

  • one principal or source sends a small request containing media controls or many compact media references;
  • API-server CPU, resident memory, or outbound bytes rises sharply for that request window;
  • GPU utilisation and prompt-token throughput stay near the service baseline;
  • waiting requests or queue time rises for other principals, or the API process restarts before recording a normal completion.

This is a resource-to-output ratio, not a fixed CPU threshold. Baseline it per model and media type. Video decode is legitimately expensive, so compare a request with peers that produced a similar number of accepted frames or media items. A tiny file that creates a large candidate list is suspicious because the work no longer tracks the useful output.

A decoder exhaustion alert has a different shape:

  • media preprocessing and host memory remain within the normal range;
  • GPU utilisation, decode time, and generated-token count rise together;
  • the share of request_success_total with finished_reason="length" increases;
  • short-answer workloads begin returning near their maximum output-token limit.

The VidDoS paper assumes an attacker can place a learned trigger into video content. Content inspection alone is a poor primary control because the trigger is designed to survive temporal processing. Server-side max_tokens, per-principal GPU-time budgets, and cancellation when output length diverges from the endpoint's expected task are stronger controls. A yes-or-no safety classifier should not be allowed to produce hundreds of tokens because the model declined to stop.

False positives cluster around legitimate stress tests, newly enabled high-frame-rate models, bulk video indexing, and cold starts after a rollout. Suppress approved load-test identities only during named windows. For model changes, build a fresh baseline rather than carrying the old threshold forward. Cold starts raise latency and memory, but they usually coincide with pod creation or model loading and affect requests broadly, not one caller repeatedly selecting extreme request options.

If the proposed multimodal preprocessing histograms become available in the deployed vLLM release, add them as direct evidence rather than replacing the cross-plane join. Compare media download and decode latency with end-to-end latency, request bytes, API-process resources, and engine queue time. The join remains useful when metrics disappear during an out-of-memory kill or when a multi-process setup omits process-level metrics.

What to do now

  1. Upgrade affected vLLM releases. GHSA-58v5-2m8f-94pr identifies 0.30.0 as the patched line for the GLMGA sampling issue. Check each advisory separately because the affected versions and fixes differ across media paths. The Cohere2 max_patches cap was proposed upstream but not merged, so gateway limits are the only control for that path.
  2. Put server-owned ceilings at the acquisition boundary. Cap compressed bytes while streaming, media-part count before task creation, decoded dimensions, frame candidates before list construction, and output tokens before decode can run away.
  3. Remove request-level backend selection and processor overrides unless a product feature needs them. Where they are required, allow specific keys and values rather than forwarding an open mapping.
  4. Separate media loading from the model API process with bounded worker concurrency and memory limits. A media worker failure should not take the scheduler or every tenant's request queue with it.
  5. Add the resource-to-output correlation to the service runbook. During an incident, determine whether CPU, memory, egress, or GPU time rose first. That answer tells responders whether to block an input shape, isolate a media worker, reduce output limits, or add model capacity.

The practical test is blunt: send the largest permitted media request in a staging environment and confirm that resource use is bounded before useful work begins. If a rejected request can still download the full object, allocate a list from an untrusted number, or push unrelated tenants into the queue, the limit is in the wrong place.

01 ATT&CK references