---
id: CVE-2023-51449
aliases:
  - GHSA-6qm2-wpxq-7qh2
  - PYSEC-2023-249
title: >-
  Gradio makes the `/file` secure against file traversal and server-side request
  forgery attacks
summary: >-
  Gradio makes the `/file` secure against file traversal and server-side request
  forgery attacks
severity: high
cvss: 8.6
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L'
vendor: gradio
product: gradio
ecosystem: pip
affected:
  - gradio < 4.11.0
patched:
  - gradio 4.11.0
published: '2023-12-21'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T03:49:59.568927938Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-6qm2-wpxq-7qh2'
references:
  - url: >-
      https://github.com/gradio-app/gradio/security/advisories/GHSA-6qm2-wpxq-7qh2
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2023-51449'
  - url: >-
      https://github.com/gradio-app/gradio/commit/1b9d4234d6c25ef250d882c7b90e1f4039ed2d76
  - url: >-
      https://github.com/gradio-app/gradio/commit/7ba8c5da45b004edd12c0460be9222f5b5f5f055
  - url: 'https://github.com/gradio-app/gradio'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/gradio/PYSEC-2023-249.yaml
tags:
  - osv
  - pip
  - exploit-available
epss: 0.28336
epssPercentile: 0.98056
exploits:
  nuclei:
    - CVE-2023-51449
  checkedAt: '2026-09-25T08:20:42.113Z'
exploitAvailable: true
ingestedAt: '2026-09-12T03:13:01.667Z'
---

## Overview

Older versions of `gradio` contained a vulnerability in the `/file` route which made them susceptible to file traversal attacks in which an attacker could access arbitrary files on a machine running a Gradio app with a public URL (e.g. if the demo was created with `share=True`, or on Hugging Face Spaces) if they knew the path of files to look for. 

This was not possible through regular URLs passed into a browser, but it was possible through the use of programmatic tools such as `curl` with the `--pass-as-is` flag. 

Furthermore,  the `/file` route in Gradio apps also contained a vulnerability that made it possible to use it for SSRF attacks.

Both of these vulnerabilities have been fixed in `gradio==4.11.0`

## Affected packages

- `gradio < 4.11.0`

## Remediation

Upgrade to a patched release:

- `gradio 4.11.0`
