# CVE-2025-48889: Gradio unauthorized file copy via path manipulation in flagging feature

Source: https://junglewise.ai/threats/cve-2025-48889-gradio-unauthorized-file-copy-via-path-manipulation-in-flagging  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-05-29. Updated: 2026-06-05  
License: CC BY 4.0 with a link back

CVE-2025-48889 · Severity: medium · CVSS 5.3 · Published 2025-05-29

Gradio, a popular library for building machine learning web interfaces, contains a vulnerability in its data flagging feature. An unauthenticated attacker can remotely trigger the server to copy any file it has access to into a public directory. This can be used to exhaust server disk space, potentially leading to a complete service outage.

Technologies: [gradio (PyPI)](https://junglewise.ai/threats/technologies/gradio). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2025-48889 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-48889 being exploited in the wild.

**How severe is CVE-2025-48889?** Medium severity, with a CVSS score of 5.3, published 29 May 2025.

**Which products and versions are affected?** gradio (PyPI) < 5.31.0, ECOSYSTEM:introduced=0,fixed=5.31.0, ECOSYSTEM:introduced=5.25.2,fixed=5.31.0.

**Is there a fix for CVE-2025-48889?** Yes. gradio (PyPI): upgrade to 5.31.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2025-48889 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2025-48889?** Check whether you run gradio (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- gradio (PyPI): upgrade to 5.31.0 or later

  ```sh
  pip install "gradio>=5.31.0"
  ```


## Technical details

An arbitrary file copy vulnerability exists in Gradio's flagging component due to insufficient validation of the 'path' parameter within the FileData object. By sending a specially crafted JSON payload to the '/gradio_api/run/predict' endpoint, an unauthenticated attacker can control the source path passed to the 'shutil.copy' operation in the 'FileData._copy_to_dir()' method. While the attacker cannot directly read the contents of the copied files through this specific bug, they can target large system files (e.g., /dev/urandom) to fill the server's disk space, causing a Denial of Service (DoS). The vulnerability is addressed in Gradio version 5.31.0.

## Affected products

- gradio-app gradio < 5.31.0

## Identifiers

- CVE-2025-48889
- GHSA-8jw3-6x8j-v96g
- PYSEC-2025-119

## Timeline

- 2025-05-29: disclosed
- 2025-05-29: advisory
- 2025-05-29: patched: Fixed in version 5.31.0

## References

- [https://api.github.com/users/jjjutla](https://api.github.com/users/jjjutla)
- [https://github.com/jjjutla](https://github.com/jjjutla)
- [https://api.github.com/users/jjjutla/gists%7B/gist_id%7D](https://api.github.com/users/jjjutla/gists%7B/gist_id%7D)
- [https://api.github.com/users/jjjutla/repos](https://api.github.com/users/jjjutla/repos)
- [https://avatars.githubusercontent.com/u/22000925?v=4](https://avatars.githubusercontent.com/u/22000925?v=4)
- [https://api.github.com/users/jjjutla/events%7B/privacy%7D](https://api.github.com/users/jjjutla/events%7B/privacy%7D)

## Related threats

- [PYSEC-2026-1423 - Gradio CORS Origin Validation Bypass Vulnerability](https://junglewise.ai/threats/cve-2025-5320-gradio-cors-origin-validation-bypass-vulnerability)
- [PYSEC-2026-1410 - Gradio DOS in multipart boundry while uploading the file](https://junglewise.ai/threats/cve-2024-8966-gradio-dos-in-multipart-boundry-while-uploading-the-file)
- [PYSEC-2026-1411 - Gradio Vulnerable to Open Redirect](https://junglewise.ai/threats/cve-2024-8021-gradio-vulnerable-to-open-redirect)
- [PYSEC-2026-1418 - Gradio Path Traversal vulnerability](https://junglewise.ai/threats/cve-2024-12217-gradio-path-traversal-vulnerability)
- [PYSEC-2026-1417 - Gradio Vulnerable to Arbitrary File Deletion](https://junglewise.ai/threats/cve-2024-10648-gradio-vulnerable-to-arbitrary-file-deletion)
