Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2024-47167 PoC — SSRF in the path parameter of /queue/join in Gradio

Source
Associated Vulnerability
Title:SSRF in the path parameter of /queue/join in Gradio (CVE-2024-47167)
Description:Gradio is an open-source Python package designed for quick prototyping. This vulnerability relates to **Server-Side Request Forgery (SSRF)** in the `/queue/join` endpoint. Gradio’s `async_save_url_to_cache` function allows attackers to force the Gradio server to send HTTP requests to user-controlled URLs. This could enable attackers to target internal servers or services within a local network and possibly exfiltrate data or cause unwanted internal requests. Additionally, the content from these URLs is stored locally, making it easier for attackers to upload potentially malicious files to the server. This impacts users deploying Gradio servers that use components like the Video component which involve URL fetching. Users are advised to upgrade to `gradio>=5` to address this issue. As a workaround, users can disable or heavily restrict URL-based inputs in their Gradio applications to trusted domains only. Additionally, implementing stricter URL validation (such as allowinglist-based validation) and ensuring that local or internal network addresses cannot be requested via the `/queue/join` endpoint can help mitigate the risk of SSRF attacks.
Readme
Components:
1. gradio_container: hosts internal HTTP server on port 5678
2. target_internal_server: launches a python app using vulnerable version of gradio (4.40.0)
File Snapshot

[4.0K] /data/pocs/fa7170d0a0d306fe8031a62c38bc412bf3ff92e3 ├── [ 363] docker-compose.yml ├── [1.0K] exploit-script.py ├── [4.0K] gradio_vuln │   ├── [ 536] app.py │   └── [ 345] Dockerfile ├── [ 166] README.md ├── [4.0K] target_internal_server │   ├── [ 157] company_security_creds.txt │   ├── [ 89] Dockerfile │   ├── [ 34] index.html │   └── [ 208] secret_passwords.txt └── [4.0K] www ├── [ 157] company_security_creds.txt └── [ 34] index.html 4 directories, 11 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →