Skip to content

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

High severity GitHub Reviewed Published Dec 15, 2021 in gradio-app/gradio • Updated Jan 27, 2023

Package

pip gradio (pip)

Affected versions

< 2.5.0

Patched versions

2.5.0

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.

References

@abidlabs abidlabs published to gradio-app/gradio Dec 15, 2021
Published by the National Vulnerability Database Dec 15, 2021
Reviewed Jan 18, 2022
Published to the GitHub Advisory Database Jan 21, 2022
Last updated Jan 27, 2023

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Adjacent
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L

EPSS score

0.623%
(79th percentile)

Weaknesses

CVE ID

CVE-2021-43831

GHSA ID

GHSA-rhq2-3vr9-6mcr

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.