CVE-2021-43831: Files on the host computer can be accessed from the Gradio interface

gradio Updated 02 Oct 2025

Summary

21/01/2022
Yes i
Critical
8.3

CVE-2021-43831: Files on the host computer can be accessed from the Gradio interface. Affects gradio versions < 2.5.0. Fixed in 2.5.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Gradio is a Python library that allows users to quickly create customizable UI components for machine learning models. It provides a simple interface for creating interactive interfaces and sharing them with others. However, versions of Gradio prior to 2.5.0 were vulnerable to a security issue that allowed files on the host computer to be accessed from the Gradio interface. This vulnerability could potentially expose sensitive files to attackers if they knew the exact relative filepath. It is important for users of Gradio to be aware of this vulnerability and take appropriate actions to mitigate the risk.

Vulnerability Detail

The vulnerability in Gradio versions prior to 2.5.0 allowed an attacker to access files on the host computer through the Gradio interface. When a user generated a public Gradio link and shared it with others, the files on the computer that generated the link could be exposed while the link was active. An attacker could view the contents of a file on the computer if they knew the exact relative filepath. Although there is no evidence of exploitation, the potential impact of this vulnerability is significant. The issue was promptly addressed by the Gradio team, and a patch was released in version 2.5.0 to mitigate the vulnerability.

How To Fix

Latest published version: 6.30.0 as of 22 Oct 2026

pip install --upgrade "gradio==6.30.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.5.0

This is the first release that contains the fix.

pip install --upgrade "gradio==2.5.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Conclusion

The vulnerability in Gradio versions prior to 2.5.0 allowed files on the host computer to be accessed through the Gradio interface. This could potentially expose sensitive information to attackers. Users of Gradio should upgrade to version 2.5.0 or later to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for gradio →

Share this vulnerability

FAQ

Gradio is a Python library for creating customizable UI components for machine learning models.

The vulnerability allows files on the host computer to be accessed through the Gradio interface, potentially exposing sensitive information.

There is no evidence of exploitation, but it is important to upgrade to the patched version to mitigate the risk.

To fix the vulnerability, upgrade to Gradio version 2.5.0 or later.

No, upgrading to the patched version is the recommended solution.

Related vulnerabilities

Recent vulnerabilities recorded for gradio.

How To Fix

Latest published version: 6.30.0 as of 22 Oct 2026

pip install --upgrade "gradio==6.30.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.5.0

This is the first release that contains the fix.

pip install --upgrade "gradio==2.5.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback