Skip to main content
CVE Radar
CRITICAL

CVE-2023-50731

CVE-2023-50731 — MindsDB has arbitrary file write in file.py

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…

Published Updated Sources: cvelistV5, GitHub_M

Triage

Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.

Exploitation

Unreported

no source claims exploitation

EPSS

<1%

chance of exploitation in 30 days

Affects

Mindsdb

mindsdb

CVSS base

9.1

CRITICAL

Affected scope

The catalog records vendors and products as separate lists, not pairs, so which product belongs to which vendor is not something this page can say.

Vendors (1)

Products (1)

mindsdb

Every base score collected

Sources score independently and disagree; each row says who scored it and under which version.

Every CVSS base score collected, by source and version
ScoreVersionSeverityExpl.ImpactSource
9.1CVSS 3.1CRITICALn/an/acvelistV5

Weakness & attack patterns

  • CWE-918

Detection

Read off the CVSS vector and the weakness class. Starting points, not rules we have tested.

  • Search application, proxy, and WAF logs for requests touching /mindsdb/api/http/namespaces/file.py.

References

4 on the record

Related CVEs

Same product first, then the same weakness or threat actor.

Elsewhere on this site

  • Mindsdbevery CVE for this vendor
  • CWE-918other pages naming this weakness

Not in any source we poll

Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.

  • No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
  • No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
  • No exploit packet captures, log samples, or incident case IDs supplied.