CVE-2024-8021: Gradio: open redirect exposes AI demo users to phishing

GHSA-7v2w-h4gh-w5cv MEDIUM PoC AVAILABLE CISA: TRACK*
Published March 20, 2025
CISO Take

Gradio is the de facto standard for ML model demos and internal AI tooling UIs — if your teams expose Gradio publicly, attackers can craft URLs that silently redirect users to malicious sites after interacting with your app. Upgrade to a patched version immediately; if no patch is available for 4.37.2, restrict public access or add a reverse proxy with redirect validation. Risk is moderate but real: AI demo environments are soft targets with trusting internal users.

Risk Assessment

CVSS 6.1 understates operational risk in AI contexts. Gradio is pervasively deployed as public-facing model demos and shared internally across data science teams — users have high trust in these URLs. Open redirect (CWE-601) is trivially exploitable with no auth required, and URL-encoding bypass suggests basic WAF evasion is built-in. EPSS 0.027 reflects low active exploitation today, but the attack surface (public ML demos, Hugging Face Spaces, internal tooling) is large. No patch version listed for pip package as of CVE publish date is a concern.

Affected Systems

Package Ecosystem Vulnerable Range Patched
gradio pip No patch
42.5K OpenSSF 5.6 674 dependents Pushed 8d ago 27% patched ~110d to patch Full package profile →
gradio pip <= 4.37.2 No patch
42.5K OpenSSF 5.6 674 dependents Pushed 8d ago 27% patched ~110d to patch Full package profile →

Severity & Risk

CVSS 3.1
6.1 / 10
EPSS
2.4%
chance of exploitation in 30 days
Higher than 85% 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.

Attack Surface

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI Required
S Changed
C Low
I Low
A None

Recommended Action

5 steps
  1. PATCH

    Upgrade gradio beyond 4.37.2 — check PyPI for latest patched release (no fixed version listed in NVD as of publish date; monitor huntr advisory for patch confirmation).

  2. WORKAROUND

    If patching is blocked, deploy a reverse proxy (nginx/Cloudflare) with an allowlist of permitted redirect destinations.

  3. RESTRICT

    Remove public access to Gradio instances not intended for external use; enforce auth via SSO.

  4. DETECT

    Audit logs for 302 responses from Gradio endpoints containing encoded URL parameters (%2F, %3A patterns). Alert on redirects to external domains.

  5. INVENTORY

    Run 'pip show gradio' across ML workstations and CI environments to identify affected versions.

CISA SSVC Assessment

Decision Track*
Exploitation poc
Automatable No
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 security
NIST AI RMF
GOVERN 6.1 - Policies for AI risk are established MANAGE 2.2 - Mechanisms for responding to and recovering from AI risks
OWASP LLM Top 10
LLM05:2025 - Improper Output Handling / Supply Chain Vulnerabilities

Frequently Asked Questions

What is CVE-2024-8021?

Gradio is the de facto standard for ML model demos and internal AI tooling UIs — if your teams expose Gradio publicly, attackers can craft URLs that silently redirect users to malicious sites after interacting with your app. Upgrade to a patched version immediately; if no patch is available for 4.37.2, restrict public access or add a reverse proxy with redirect validation. Risk is moderate but real: AI demo environments are soft targets with trusting internal users.

Is CVE-2024-8021 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2024-8021, increasing the risk of exploitation.

How to fix CVE-2024-8021?

1. PATCH: Upgrade gradio beyond 4.37.2 — check PyPI for latest patched release (no fixed version listed in NVD as of publish date; monitor huntr advisory for patch confirmation). 2. WORKAROUND: If patching is blocked, deploy a reverse proxy (nginx/Cloudflare) with an allowlist of permitted redirect destinations. 3. RESTRICT: Remove public access to Gradio instances not intended for external use; enforce auth via SSO. 4. DETECT: Audit logs for 302 responses from Gradio endpoints containing encoded URL parameters (%2F, %3A patterns). Alert on redirects to external domains. 5. INVENTORY: Run 'pip show gradio' across ML workstations and CI environments to identify affected versions.

What systems are affected by CVE-2024-8021?

This vulnerability affects the following AI/ML architecture patterns: ML model serving UIs, AI demo environments, Internal AI tooling portals, Agent frameworks with Gradio frontends.

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

CVE-2024-8021 has a CVSS v3.1 base score of 6.1 (MEDIUM). The EPSS exploitation probability is 2.45%.

Technical Details

NVD Description

An open redirect vulnerability exists in the latest version of gradio-app/gradio. The vulnerability allows an attacker to redirect users to a malicious website by URL encoding. This can be exploited by sending a crafted request to the application, which results in a 302 redirect to an attacker-controlled site.

Exploitation Scenario

Attacker identifies a public Gradio-based model demo (e.g., via Shodan, Hugging Face Spaces, or a company's public AI showcase). They craft a URL like `https://legitimate-ai-demo.company.com/redirect?url=https%3A%2F%2Fattacker.com%2Fharvest` and send it via phishing email or Slack to data scientists or ML engineers with existing trust in that domain. User clicks, interacts briefly with what appears to be the real app, then gets silently 302-redirected to a credential-harvesting clone of an internal SSO page or AI tool. Given that AI/ML teams routinely share Gradio demo links, this social engineering vector has high success probability.

CVSS Vector

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

Timeline

Published
March 20, 2025
Last Modified
March 26, 2025
First Seen
March 20, 2025

Related Vulnerabilities