Skip to main content
No exploitation reportedFix available

CVE-2023-50731

No exploitation reported by the sources we read.

  • Published2023-12-22
  • Fixed in23.11.4.1
  • WeaknessCWE-22 · CWE-918

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

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.

Timeline

dates in UTC
  1. 2023-12-2221:15CVE publishedNVD

Versions per branch

NVD · OSV
Mindsdb
BranchAffectedFixed in
23.11< 23.11.4.123.11.4.1

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Fix

  1. Update Mindsdb to 23.11.4.1

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CNACVSS 3.19.1known since 2026-10-23
  • NVDCVSS 3.19.1read 2026-10-23
  • CNAweakness (CWE)CWE-918known since 2026-10-23
  • NVDweakness (CWE)CWE-22read 2026-10-23
  • FIRST EPSSEPSS score1.0 %2026-11-08
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryHIGH2023-12-15

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
Published
2023-12-22
Last Modified
2026-06-17
NVD status
Modified
GitHub Advisory
GHSA-j8w6-2r9h-cxhj

Frequently asked questions

What is CVE-2023-50731?

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.

Is CVE-2023-50731 actively exploited?

Active exploitation of CVE-2023-50731 has not been confirmed. Its EPSS score was 1.0% on 2026-11-08, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2023-50731?

CVE-2023-50731 has a CVSS v3 base score of 9.1 (CRITICAL severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H.

Running mindsdb? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record