CVE-2024-47167: Gradio: unauthenticated SSRF in /queue/join, internal pivot

GHSA-576c-3j53-r9jj CRITICAL
Published October 10, 2024
CISO Take

Any Gradio instance below v5.0.0 exposes your internal network to unauthenticated SSRF — no credentials needed, no user interaction required. This is particularly dangerous in ML environments where Gradio demos often run on hosts with access to model APIs, S3 buckets, cloud metadata endpoints, and internal tooling. Upgrade to gradio>=5 immediately and audit every Gradio deployment for network exposure.

What is the risk?

CVSS 9.8 with network-accessible, zero-auth, zero-interaction attack vector makes this a drop-everything patch. Despite low EPSS (0.00236), SSRF exploits are commodity-level — any script kiddie can abuse this. The real multiplier is deployment context: ML teams routinely run Gradio on cloud VMs with access to IMDSv1 metadata (AWS 169.254.169.254), internal model registries, and data pipelines. A single compromised Gradio instance can cascade into full cloud credential theft or internal network lateral movement.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
Gradio pip No patch
43.0K OpenSSF 5.6 685 dependents Pushed 4d ago 26% patched ~110d to patch Full package profile →
Gradio pip < 5.0.0 5.0.0
43.0K OpenSSF 5.6 685 dependents Pushed 4d ago 26% patched ~110d to patch Full package profile →

How severe is it?

CVSS 3.1
9.8 / 10
EPSS
0.5%
chance of exploitation in 30 days
Higher than 36% of all CVEs
Exploitation Status
No known exploitation
Sophistication
Trivial

What is the attack surface?

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI None
S Unchanged
C High
I High
A High

What should I do?

5 steps
  1. PATCH

    Upgrade to gradio>=5.0.0 — this is the only complete fix.

  2. IMMEDIATE WORKAROUND

    Implement allowlist-based URL validation restricting inputs to trusted domains only; block all RFC1918 addresses and link-local ranges (169.254.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16).

  3. NETWORK CONTROL

    Apply egress filtering on hosts running Gradio to block outbound HTTP to internal subnets.

  4. DETECTION

    Monitor for outbound HTTP requests from Gradio processes to internal IPs or metadata endpoints; alert on file writes to cache directories from unexpected URL sources.

  5. INVENTORY

    Identify all Gradio instances — pay special attention to cloud-hosted VMs and internal demo environments.

What does CISA's SSVC say?

Decision Track
Exploitation none
Automatable Yes
Technical Impact partial

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:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity Article 9 - Risk management system
ISO 42001
A.6.1.2 - AI-related threat and vulnerability identification A.9.3 - AI system security
NIST AI RMF
GOVERN 6.1 - Policies and procedures are in place for AI risk management MANAGE 2.2 - Mechanisms to sustain, track, and manage AI risks over time
OWASP LLM Top 10
LLM05:2025 - Improper Output Handling

Frequently Asked Questions

What is CVE-2024-47167?

Any Gradio instance below v5.0.0 exposes your internal network to unauthenticated SSRF — no credentials needed, no user interaction required. This is particularly dangerous in ML environments where Gradio demos often run on hosts with access to model APIs, S3 buckets, cloud metadata endpoints, and internal tooling. Upgrade to gradio>=5 immediately and audit every Gradio deployment for network exposure.

Is CVE-2024-47167 actively exploited?

No confirmed active exploitation of CVE-2024-47167 has been reported, but organizations should still patch proactively.

How to fix CVE-2024-47167?

1. PATCH: Upgrade to gradio>=5.0.0 — this is the only complete fix. 2. IMMEDIATE WORKAROUND: Implement allowlist-based URL validation restricting inputs to trusted domains only; block all RFC1918 addresses and link-local ranges (169.254.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16). 3. NETWORK CONTROL: Apply egress filtering on hosts running Gradio to block outbound HTTP to internal subnets. 4. DETECTION: Monitor for outbound HTTP requests from Gradio processes to internal IPs or metadata endpoints; alert on file writes to cache directories from unexpected URL sources. 5. INVENTORY: Identify all Gradio instances — pay special attention to cloud-hosted VMs and internal demo environments.

What systems are affected by CVE-2024-47167?

This vulnerability affects the following AI/ML architecture patterns: ML prototyping and demo environments, Model evaluation UIs, Internal MLOps tooling, Model serving interfaces, AI application backends on cloud VMs.

What is the CVSS score for CVE-2024-47167?

CVE-2024-47167 has a CVSS v3.1 base score of 9.8 (CRITICAL). The EPSS exploitation probability is 0.46%.

What is the AI security impact?

Affected AI Architectures

ML prototyping and demo environmentsModel evaluation UIsInternal MLOps toolingModel serving interfacesAI application backends on cloud VMs

MITRE ATLAS Techniques

AML.T0006 Active Scanning
AML.T0025 Exfiltration via Cyber Means
AML.T0037 Data from Local System
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Article 15, Article 9
ISO 42001: A.6.1.2, A.9.3
NIST AI RMF: GOVERN 6.1, MANAGE 2.2
OWASP LLM Top 10: LLM05:2025

What are the technical details?

Original Advisory

Gradio is an open-source Python package designed for quick prototyping. This vulnerability relates to **Server-Side Request Forgery (SSRF)** in the `/queue/join` endpoint. Gradio’s `async_save_url_to_cache` function allows attackers to force the Gradio server to send HTTP requests to user-controlled URLs. This could enable attackers to target internal servers or services within a local network and possibly exfiltrate data or cause unwanted internal requests. Additionally, the content from these URLs is stored locally, making it easier for attackers to upload potentially malicious files to the server. This impacts users deploying Gradio servers that use components like the Video component which involve URL fetching. Users are advised to upgrade to `gradio>=5` to address this issue. As a workaround, users can disable or heavily restrict URL-based inputs in their Gradio applications to trusted domains only. Additionally, implementing stricter URL validation (such as allowinglist-based validation) and ensuring that local or internal network addresses cannot be requested via the `/queue/join` endpoint can help mitigate the risk of SSRF attacks.

Exploitation Scenario

Attacker identifies an internet-facing Gradio deployment (common for model demos, AI hackathons, internal ML tooling). They POST to `/queue/join` with a crafted payload containing a URL pointing to `http://169.254.169.254/latest/meta-data/iam/security-credentials/` (AWS IMDS). Gradio's `async_save_url_to_cache` fetches the URL server-side and stores the response locally. Attacker retrieves the cached file containing IAM temporary credentials, then pivots to AWS APIs with full role permissions — exfiltrating training data, accessing model artifacts in S3, or escalating to broader cloud infrastructure.

Weaknesses (CWE)

CWE-918 — Server-Side Request Forgery (SSRF): The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Timeline

Published
October 10, 2024
Last Modified
January 21, 2025
First Seen
October 10, 2024

Related Vulnerabilities