Browse / AI Framework and Platform Flaws / CVE-2025-68472
MindsDB has improper sanitation of filepath that leads to information disclosure and DOS
- Class
- AI Framework and Platform Flaws (filed by a model that read the advisory)
- Technique
- Path traversal and file access
- Affected
- mindsdb (PyPI)
- CVSS
- CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
- EPSS
- 20.3% chance of exploitation in 30 days
How it works, in short
An absolute file path in a JSON upload body escapes the temp directory, so the server reads and moves arbitrary local files. (Our summary, written by a model. The source text is below.)
Details
Summary
BlueRock discovered an unauthenticated path traversal in the file upload API lets any caller read arbitrary files from the server filesystem and move them into MindsDB’s storage, exposing sensitive data.
Details
The PUT handler in file.py directly joins user-controlled data into a filesystem path when the request body is JSON and source_type is not "url":
data = request.json(line ~104) accepts attacker input without validation.file_path = os.path.join(temp_dir_path, data["file"])(line ~178) creates the path inside a temporary directory, but ifdata["file"]is absolute (e.g.,/home/secret.csv),os.path.joinignorestemp_dir_pathand targets the attacker-specified location.- The resulting path is handed to
ca.file_controller.save_file(...), which wrapsFileReader(path=source_path)(mindsdb/interfaces/file/file_controller.py:66), causing the application to read the contents of that arbitrary file. The subsequentshutil.move(file_path, ...)call also relocates the victim file into MindsDB’s managed storage.
Only multipart uploads and URL-sourced uploads receive sanitization; JSON uploads lack any call to clear_filename or equivalent checks.
PoC
1. Run MindsDB in Docker: 0
- Execute the exploit from the host (save as poc.py and run with
python poc.py):