Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
HIGH severity

CVE-2021-43831 — gradio

HIGHFix: gradio-app/gradio@41bd364

CVE-2021-43831 is a high-severity (CVSS 7.7) Path Traversal vulnerability in gradio. 1 public exploit reference exists, so weaponization risk is real. A fix is available for gradio — see the affected versions and patch details below.

Files on the host computer can be accessed from the Gradio interface

Also known asGHSA-rhq2-3vr9-6mcrPYSEC-2021-873
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
1 known
Exploitation data as of Oct 10, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
3.9%probability of exploitation in next 30 days
Lower Risk+0.06%
Lower risk than most CVEs90th percentile — riskier than 90% of all scored CVEsHighest risk
0.00%12.8%25.5%38.3%30.3%3.9%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2021-43831 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected
🐍gradio

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

Impact

This is a vulnerability that affects anyone who creates and publicly shares Gradio interfaces using gradio<2.4.8. Because of the way that static files were being served, someone who generated a public Gradio link and shared it with others would potentially be exposing the files on the computer that generated the link, while the link was active. An attacker would be able to view the contents of a file on the computer if they knew the exact relative filepath. We do not have any evidence that this was ever exploited, but we treated the issue seriously and immediately took steps to mitigate it (see below)

Response

  1. We worked with @haby0 to immediately patch the issue and released a new version, gradio 2.5.0, within 24 hours of the issue being brought to our attention
  2. We enabled a notification that is printed to anyone using an older version of gradio telling them to upgrade (see screenshot below)
  3. We expanded our test suite to test for this vulnerability ensuring that our patch does not get reverted in future releases of gradio

image

Patches

The problem has been patched in gradio>=2.5.0.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIgradioall versions2.5.0pip install --upgrade 'gradio==2.5.0'

Affected Products

1 product · 1 configurations
Application
gradiogradio_project
< 2.5.0
range
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for gradio, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update gradio to 2.5.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-43831 is resolved across your whole dependency graph.

  3. Workarounds

    Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.

How to detect CVE-2021-43831

A community-maintained Nuclei template exists for this CVE. You can scan for it directly:

nuclei -id cve-2021-43831 -u https://target
Template
Gradio < 2.5.0 - Arbitrary File Read
Severity
high
Impact
An attacker would be able to view the contents of a file on the computer.
Remediation
Update to version 2.5.0.

Template by ProjectDiscovery nuclei-templates (isacaya), MIT licensed. View the full template. Scan only systems you are authorised to test.

Frequently Asked Questions

### Impact This is a vulnerability that affects anyone who creates and publicly shares Gradio interfaces using `gradio<2.4.8`. Because of the way that static files were being served, someone who generated a public Gradio link and shared it with others would potentially be exposing the files on the computer that generated the link, while the link was active. An attacker would be able to view the contents of a file on the computer if they knew the exact relative filepath. We do not have any evidence that this was ever exploited, but we treated the issue seriously and immediately took steps to mi
O3 Security · Impact-Aware SCA

Is CVE-2021-43831 in your dependencies?

Find it across PyPI, including transitive dependencies.

CVE-2021-43831: gradio — Fixed in 2.5.0