Skip to content
Noroxi
CVE-2024-47166· NVD / CVE Program· CNA GitHub_M

One-level read path traversal in `/custom_component` in Gradio

Gradio is an open-source Python package designed for quick prototyping. This vulnerability involves a **one-level read path traversal** in the `/custom_component` endpoint. Attackers can exploit this flaw to access and leak source code from custom Gradio components by manipulating the file path in the request. Although the traversal is limited to a single directory level, it could expose proprietary or sensitive code that developers intended to keep private. This impacts users who have developed custom Gradio components and are hosting them on publicly accessible servers. Users are advised to upgrade to `gradio>=4.44` to address this issue. As a workaround, developers can sanitize the file paths and ensure that components are not stored in publicly accessible directories.

LowCVSS 2.3 · v4.0—No exploit Fix available
Published
Oct 10, 2024
Updated
Jun 17, 2026
EPSS
0.4% · 35th percentile
Follow this CVE

Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.

Report tools

JSON

Action score

9

Monitor

Low priority for now.

CVSS
9 / 40 · 2.3 / 10
CISA KEV
0 / 30 · Not listed
EPSS
0 / 30 · 0.4%

CISA SSVC decision

Exploitation
none
Automatable
no
Technical impact
partial

Vulnrichment: CISA's decision-tree inputs.

CNA vs NVD score

NVD
—
CNA · GitHub_M
2.3
NVD has not scored this yet; the score shown is the CNA’s.

CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.

Noroxi analysis

No Noroxi analysis for this record yet

We don't hand-write analysis for the hundreds of thousands of vulnerabilities in the database; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.

We use this product, ask for help

Affected systems

VendorProduct
gradio projectgradio

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • gradio project gradiobefore 4.44.0

Versions reported by the vendor

Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.

  • gradio-app gradio

    • < 4.44affected

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
PyPIgradiobefore 4.44.04.44.0

Other highest-scoring records for the same primary product.

  • CVE-2024-1728Local File Inclusion in gradio-app/gradio
    56Plan
  • CVE-2024-4325Server-Side Request Forgery (SSRF) in gradio-app/gradio
    45Plan
  • CVE-2024-39236Gradio v4.36.1 was discovered to contain a code injection vulnerability via the component /gradio/component_meta.py.
    39Monitor
  • CVE-2023-51449Make the `/file` secure against file traversal attacks
    39Monitor
  • CVE-2023-25823Gradio contains Use of Hard-coded Credentials
    39Monitor
  • CVE-2024-4253Command Injection in gradio-app/gradio
    37Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
PyPI:gradio4.44.0Package registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

EPSS, last 120 days

FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

No commit or PR link among the references.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

No credits in the CNA record.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

  • CVE-2024-1728183 days apartLocal File Inclusion in gradio-app/gradio
    56Plan
  • CVE-2023-51449293 days apartMake the `/file` secure against file traversal attacks
    39Monitor
  • CVE-2024-0964248 days apartA local file include could be remotely triggered in Gradio due to a vulnerable user-supplied JSON value in an API request.
    37Monitor
  • CVE-2024-4941126 days apartLocal File Inclusion in JSON component in gradio-app/gradio
    30Monitor
  • CVE-2024-5175127 days apartArbitrary file read with File and UploadButton components in Gradio
    26Monitor
  • CVE-2024-471640 days apartThe `is_in_or_equal` function may be bypassed in Gradio
    9Monitor

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

No known public program.

Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • A low-privileged account is enough.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
Integrity
Availability
Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
X

CVSS vector

CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

nvd-secondary

Root cause

A user-supplied file name is joined with the allowed directory, but the result is never checked to confirm it is still inside that directory.

A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

Vulnerable

ts
const file = path.join(ROOT, req.query.name);res.sendFile(file);

Fixed

ts
const file = path.resolve(ROOT, req.query.name);if (!file.startsWith(ROOT + path.sep)) {  return res.sendStatus(400);}res.sendFile(file);

Change log

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

Vendor advisories and official records. Exploit/PoC links are deliberately left out.

All records