CVE-2025-0187: Gradio: DoS via oversized upload filename

UNKNOWN PoC AVAILABLE CISA: TRACK*
Published March 20, 2025
CISO Take

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
42.5K OpenSSF 5.5 679 dependents Pushed 2d ago 27% patched ~110d to patch Full package profile →

Do you use gradio? You're affected.

Severity & Risk

CVSS 3.1
N/A
EPSS
0.8%
chance of exploitation in 30 days
Higher than 73% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
CISA SSVC: Public PoC
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

Recommended Action

6 steps
  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.

CISA SSVC Assessment

Decision Track*
Exploitation poc
Automatable Yes
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity
ISO 42001
A.9.4 - AI System Availability and Resilience
NIST AI RMF
MANAGE 2.2 - Mechanisms to sustain AI system availability
OWASP LLM Top 10
LLM04 - Model Denial of Service

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)

Timeline

Published
March 20, 2025
Last Modified
August 1, 2025
First Seen
March 20, 2025

Related Vulnerabilities