CVE-2025-0187: Gradio: DoS via oversized upload filename
UNKNOWN PoC AVAILABLE CISA: TRACK*Any Gradio instance with file upload enabled is vulnerable to unauthenticated denial of service by sending a malformed multipart request with an oversized filename field. Patch to a fixed Gradio version immediately; if patching is blocked, place a WAF or reverse proxy in front enforcing filename length limits and rate limiting on upload endpoints. Risk is low sophistication, high availability impact—especially for teams exposing Gradio demos or internal model UIs publicly.
What is the risk?
Medium risk. Exploitation is trivial (no authentication, no AI/ML knowledge required, single crafted HTTP request) but impact is limited to availability. Gradio instances are frequently exposed publicly for ML demos, PoCs, and internal tooling, widening the attack surface. No CVSS score assigned yet, but CWE-400 combined with unauthenticated access and public exposure warrants prompt remediation. Not in CISA KEV; no evidence of active in-the-wild exploitation at time of publication.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Gradio | pip | — | No patch |
Do you use Gradio? You're affected.
How severe is it?
What should I do?
6 steps-
Patch: Upgrade Gradio to the latest fixed release beyond 0.39.1 immediately.
-
Short-term workaround: Enforce filename length limits at the reverse proxy/WAF level (e.g., nginx: client_header_buffer_size, or a WAF rule rejecting Content-Disposition filenames >255 chars).
-
Rate limiting: Apply per-IP rate limits on the file upload endpoint (/upload, /queue/join).
-
Network controls: If Gradio is for internal use only, restrict access to internal networks; remove public exposure.
-
Detection: Alert on HTTP 5xx spikes and abnormal multipart request sizes on Gradio endpoints.
-
Verify fix: Confirm server handles large filename gracefully without resource exhaustion after patching.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-0187?
Any Gradio instance with file upload enabled is vulnerable to unauthenticated denial of service by sending a malformed multipart request with an oversized filename field. Patch to a fixed Gradio version immediately; if patching is blocked, place a WAF or reverse proxy in front enforcing filename length limits and rate limiting on upload endpoints. Risk is low sophistication, high availability impact—especially for teams exposing Gradio demos or internal model UIs publicly.
Is CVE-2025-0187 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-0187, increasing the risk of exploitation.
How to fix CVE-2025-0187?
1. Patch: Upgrade Gradio to the latest fixed release beyond 0.39.1 immediately. 2. Short-term workaround: Enforce filename length limits at the reverse proxy/WAF level (e.g., nginx: client_header_buffer_size, or a WAF rule rejecting Content-Disposition filenames >255 chars). 3. Rate limiting: Apply per-IP rate limits on the file upload endpoint (/upload, /queue/join). 4. Network controls: If Gradio is for internal use only, restrict access to internal networks; remove public exposure. 5. Detection: Alert on HTTP 5xx spikes and abnormal multipart request sizes on Gradio endpoints. 6. Verify fix: Confirm server handles large filename gracefully without resource exhaustion after patching.
What systems are affected by CVE-2025-0187?
This vulnerability affects the following AI/ML architecture patterns: model serving, ML demo platforms, agent frameworks.
What is the CVSS score for CVE-2025-0187?
No CVSS score has been assigned yet.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0029 Denial of AI Service AML.T0034 Cost Harvesting AML.T0049 Exploit Public-Facing Application Compliance Controls Affected
What are the technical details?
Original Advisory
A Denial of Service (DoS) vulnerability was discovered in the file upload feature of gradio-app/gradio version 0.39.1. The vulnerability is due to improper handling of form-data with a large filename in the file upload request. By sending a payload with an excessively large filename, the server becomes overwhelmed and unresponsive, leading to unavailability for legitimate users.
Exploitation Scenario
An adversary targets an organization's publicly accessible Gradio model demo (e.g., a fine-tuned LLM interface or image generation UI). They craft a single multipart/form-data POST request to the /upload endpoint with a Content-Disposition filename field padded to several megabytes. The server's form-data parser allocates unbounded memory/CPU processing the filename, starving the process. With minimal tooling (curl or a Python script), the attacker can sustain unavailability with repeated requests, effectively taking down the model demo, disrupting a product launch or customer evaluation, and potentially causing reputational or financial harm with no authentication barrier.
Weaknesses (CWE)
CWE-400 — Uncontrolled Resource Consumption: The product does not properly control the allocation and maintenance of a limited resource.
- [Architecture and Design] Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.
- [Architecture and Design] Mitigation of resource exhaustion attacks requires that the target system either: The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question. The second solution is simply difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker. recognizes the attack and denies that user further access for a given amount of time, or uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed.
Source: MITRE CWE corpus.
References
- huntr.com/bounties/77f3ed54-9e1c-4d9f-948f-ee6f82e2fe24 Exploit 3rd Party
Timeline
Related Vulnerabilities
CVE-2023-25823 9.8 Gradio: hardcoded SSH key leaks via share=True demos
Same package: gradio CVE-2024-47167 9.8 Gradio: unauthenticated SSRF in /queue/join, internal pivot
Same package: gradio CVE-2024-39236 9.8 Gradio: code injection via component metadata (CVSS 9.8)
Same package: gradio CVE-2024-0964 9.4 Gradio: unauthenticated LFI exposes full server filesystem
Same package: gradio CVE-2023-34239 9.1 Gradio: path traversal + SSRF exposes model files & infra
Same package: gradio