Hugging Face Text Generation Inference vulnerable to Uncontrolled Resource Consumption
The router in Text Generation Inference fetches external images referenced in Markdown input without limits, reading the whole response into memory. An unauthenticated attacker could exhaust network, memory and CPU, potentially crashing the host.
huggingface/text-generation-inference
Originally disclosed on huntr
A vulnerability in huggingface/text-generation-inference version 3.3.6 allows unauthenticated remote attackers to exploit unbounded external image fetching during input validation in VLM mode. The issue arises when the router scans inputs for Markdown image links and performs a blocking HTTP GET request, reading the entire response body into memory and cloning it before decoding. This behavior can lead to resource exhaustion, including network bandwidth saturation, memory inflation, and CPU overutilization. The vulnerability is triggered even if the request is later rejected for exceeding token limits. The default deployment configuration, which lacks memory usage limits and authentication, exacerbates the impact, potentially crashing the host machine. The issue is resolved in version 3.3.7.
From the GitHub Advisory Database (GHSA-j7x9-7j54-2v3h, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the input validation step performs a blocking HTTP GET for each Markdown image link and buffers the entire response body in memory without size, count or timeout limits.
Impact
An unauthenticated attacker could saturate network bandwidth, inflate memory and overuse CPU, potentially crashing the host machine; the default deployment lacks memory limits and authentication, which worsens the effect.
What the attacker needed
Network access to the service; VLM mode enabled; no authentication required
The fix
The issue was fixed in version 3.3.7.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When you send text to this AI service, it looks for image links in your message and downloads those images to check them. It does this without any limit on size or number, and without asking who you are. An attacker can point it at huge or slow files so the server runs out of memory or bandwidth and stops working for everyone.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.