Read the docs
TI-2023-27677 Aliases CVE-2023-50731GHSA-j8w6-2r9h-cxhj

MindsDB has arbitrary file write in file.py

Priority MEDIUM 41CWE-918Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
None · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.

Summary

MindsDB is a SQL Server for artificial intelligence. Prior to version 23.11.4.1, the `put` method in `mindsdb/mindsdb/api/http/namespaces/file.py` does not validate the user-controlled name value, which is used in a temporary file name, which is afterwards opened for writing on lines 122-125, which leads to path injection. Later in the method, the temporary directory is deleted on line 151, but since we can write outside of the directory using the path injection vulnerability, the potentially dangerous file is not deleted. Arbitrary file contents can be written due to `f.write(chunk)` on line 125. Mindsdb does check later on line 149 in the `save_file` method in `file-controller.py` which calls the `_handle_source` method in `file_handler.py` if a file is of one of the types `csv`, `json`, `parquet`, `xls`, or `xlsx`. However, since the check happens after the file has already been written, the files will still exist (and will not be removed due to the path injection described earlier), just the `_handle_source` method will return an error. The same user-controlled source source is used also in another path injection sink on line 138. This leads to another path injection, which allows an attacker to delete any `zip` or `tar.gz` files on the server.

Why it matters now

EPSS 0.00983 62nd percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed mindsdb (mindsdb): 23.11.4.1mindsdb (PyPI): 23.11.4.1

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
mindsdbmindsdbbefore 23.11.4.123.11.4.1Patch availableCNA
—mindsdb (PyPI)before 23.11.4.123.11.4.1Patch availableGHSA-j8w6-2r9h-cxhj
  • mindsdb Vendormindsdb Affected before 23.11.4.1 Fixed in 23.11.4.1 Patch available CNA
  • mindsdb (PyPI) Vendor— Affected before 23.11.4.1 Fixed in 23.11.4.1 Patch available GHSA-j8w6-2r9h-cxhj

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:mindsdb:mindsdb:*:*:*:*:*:*:*:*before 23.11.4.1Vulnerablemindsdb
  • cpe:2.3:a:mindsdb:mindsdb:*:*:*:*:*:*:*:* Versions before 23.11.4.1 Vulnerable ·mindsdb

Remediation

  • Fix · CNA mindsdb (mindsdb) Fixed in 23.11.4.1
  • Fix · GHSA-j8w6-2r9h-cxhj mindsdb (PyPI) Fixed in 23.11.4.1 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2023-50731
  2. 2026-10-03 Alias added: GHSA-j8w6-2r9h-cxhj

References

  • TI-2024-16276 MindsDB Vulnerable to Bypass of SSRF Protection with DNS Rebinding CVSS 3.1CRITICAL 9.3
  • TI-2026-21890 MindsDB has Path Traversal in /api/files Leading to Remote Code Execution CVSS 3.1HIGH 8.8
  • TI-2024-30805 Code injection in mindsdb CVSS 3.1HIGH 8.8
  • TI-2024-30804 Code injection in mindsdb CVSS 3.1HIGH 8.8
  • TI-2024-30803 Code injection in mindsdb CVSS 3.1HIGH 8.8
  • TI-2024-30802 Code injection in mindsdb CVSS 3.1HIGH 8.8
See all 21 →

Sources