CVE-2024-1183: Gradio: SSRF enables internal network port scanning
UNKNOWN PoC AVAILABLE NUCLEI TEMPLATE CISA: TRACK*Gradio deployments used for ML model demos and inference UIs are vulnerable to unauthenticated SSRF, allowing attackers to map internal network topology by manipulating a single GET parameter. ML environments typically have privileged internal network access to databases, model servers, and cloud metadata endpoints — making this recon capability particularly dangerous. Patch immediately to the fixed commit and implement egress controls to prevent Gradio processes from reaching internal RFC 1918 address ranges.
Risk Assessment
HIGH risk for organizations with internet-exposed Gradio instances. The exploit is trivial — no authentication, no special knowledge, just GET request manipulation — and ML environments typically run with broad internal network access. No CVSS score is assigned but exploitability is near-certain and impact includes full internal service enumeration. Cloud-deployed ML stacks expose additional risk via metadata endpoint access (169.254.169.254), potentially leading to credential theft and privilege escalation beyond initial recon.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| gradio | pip | — | No patch |
Do you use gradio? You're affected.
Severity & Risk
Recommended Action
5 steps-
Apply the patch from commit 2ad3d9e7ec6c8eeea59774265b44f11df7394bb4 or upgrade to a patched Gradio release.
-
If immediate patching is blocked, restrict Gradio to authenticated-only access and place it behind a WAF with SSRF rules.
-
Implement egress filtering to block Gradio processes from initiating connections to RFC 1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) and cloud metadata endpoints.
-
Audit firewall rules to ensure Gradio hosts are network-segmented from production model infrastructure and databases.
-
Monitor application logs for anomalous GET requests with IP addresses or internal hostnames in the file parameter.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2024-1183?
Gradio deployments used for ML model demos and inference UIs are vulnerable to unauthenticated SSRF, allowing attackers to map internal network topology by manipulating a single GET parameter. ML environments typically have privileged internal network access to databases, model servers, and cloud metadata endpoints — making this recon capability particularly dangerous. Patch immediately to the fixed commit and implement egress controls to prevent Gradio processes from reaching internal RFC 1918 address ranges.
Is CVE-2024-1183 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2024-1183, increasing the risk of exploitation.
How to fix CVE-2024-1183?
1. Apply the patch from commit 2ad3d9e7ec6c8eeea59774265b44f11df7394bb4 or upgrade to a patched Gradio release. 2. If immediate patching is blocked, restrict Gradio to authenticated-only access and place it behind a WAF with SSRF rules. 3. Implement egress filtering to block Gradio processes from initiating connections to RFC 1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) and cloud metadata endpoints. 4. Audit firewall rules to ensure Gradio hosts are network-segmented from production model infrastructure and databases. 5. Monitor application logs for anomalous GET requests with IP addresses or internal hostnames in the file parameter.
What systems are affected by CVE-2024-1183?
This vulnerability affects the following AI/ML architecture patterns: model serving, ML demo infrastructure, AI development environments, internal ML APIs, Kubernetes ML clusters.
What is the CVSS score for CVE-2024-1183?
No CVSS score has been assigned yet.
Technical Details
NVD Description
An SSRF (Server-Side Request Forgery) vulnerability exists in the gradio-app/gradio repository, allowing attackers to scan and identify open ports within an internal network. By manipulating the 'file' parameter in a GET request, an attacker can discern the status of internal ports based on the presence of a 'Location' header or a 'File not allowed' error in the response.
Exploitation Scenario
An attacker targeting an ML team sends crafted GET requests to a public-facing Gradio demo (e.g., /file=http://192.168.1.100:6379). By observing whether the response contains a Location redirect header (port open) versus a 'File not allowed' error (port closed), the attacker iterates across internal IP ranges and common ML service ports — Redis (6379), MLflow (5000), Jupyter (8888), Kubeflow (8080), internal model APIs. Within minutes they build a complete internal service map. From there, unauthenticated services (common in internal ML tooling) become direct targets for follow-on exploitation.
Weaknesses (CWE)
References
Timeline
Scanner Template Available
A Nuclei vulnerability scanner template exists for this CVE. You can scan your infrastructure for this vulnerability immediately.
View template on GitHubnuclei -t http/cves/2024/CVE-2024-1183.yaml -u https://target.example.com Related Vulnerabilities
CVE-2024-47167 9.8 Gradio: unauthenticated SSRF in /queue/join, internal pivot
Same package: gradio CVE-2023-25823 9.8 Gradio: hardcoded SSH key leaks via share=True demos
Same package: gradio CVE-2024-39236 9.8 Gradio: code injection via component metadata (CVSS 9.8)
Same package: gradio CVE-2024-0964 9.4 Gradio: unauthenticated LFI exposes full server filesystem
Same package: gradio CVE-2023-34239 9.1 Gradio: path traversal + SSRF exposes model files & infra
Same package: gradio
AI Threat Alert