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.
Risk Assessment
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.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| gradio | pip | — | No patch |
Do you use gradio? You're affected.
Severity & Risk
Recommended Action
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.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
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.
Technical Details
NVD Description
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)
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
AI Threat Alert