Home / mindsdb / mindsdb / CVE-2023-50731
CVE-2023-50731: is it exploited, and which versions of mindsdb are affected and fixed?
CVE-2023-50731 is a server-side request forgery (SSRF) vulnerability in mindsdb. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 17:39 UTC). Affected: mindsdb before 23.11.4.1 (GitHub advisory GHSA-j8w6-2r9h-cxhj). Fixed in 23.11.4.1 (GitHub advisory GHSA-j8w6-2r9h-cxhj). Severity: Critical (9.1, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 17:39 UTC, CVE record November 19, 2026, 07:12 UTC and NVD November 19, 2026, 07:33 UTC.
What is 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 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.
From the CVE record by GitHub_M, last updated August 2, 2024, 22:16 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| mindsdb | mindsdb | < 23.11.4.1 |
As the CVE record by GitHub_M states it, last updated August 2, 2024. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| PyPI | mindsdb | < 23.11.4.1 | 23.11.4.1 | GHSA-j8w6-2r9h-cxhj |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated November 22, 2024. Summary: GitHub Security Lab (GHSL) Vulnerability Report: Arbitary write GHSL-2023-182.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| mindsdb | mindsdb | before 23.11.4.1 | application |
NVD analysis (status Modified), last modified June 17, 2026, 06:39 UTC.
How severe is CVE-2023-50731?
| Score | Version | Vector | Source |
|---|---|---|---|
| Critical 9.1 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H | GitHub_M |
| Critical 9.1 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2023-50731 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- EPSS
- 0.98% probability of exploitation activity in the next 30 days, percentile 63.4 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
- CWE-918 Server-Side Request Forgery
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
Where are the vendor advisories and references?
- https://securitylab.github.com/advisories/GHSL-2023-182_GHSL-2023-184_mindsdb_mindsdb/ x_refsource_CONFIRM
- https://github.com/mindsdb/mindsdb/security/advisories/GHSA-j8w6-2r9h-cxhj x_refsource_MISC
- https://github.com/mindsdb/mindsdb/blob/1821da719f34c022890c9ff25810218e71c5abbc/mindsdb/api/http/namespaces/file.py#L122-L125 x_refsource_MISC
- https://github.com/mindsdb/mindsdb/blob/1821da719f34c022890c9ff25810218e71c5abbc/mindsdb/api/http/namespaces/file.py#L138 x_refsource_MISC
When was it published, and where is the official record?
- Reserved
- December 11, 2023
- Published
- December 22, 2023, 20:43 UTC
- CVE record updated
- August 2, 2024, 22:16 UTC by GitHub_M
- NVD
- Modified, last modified June 17, 2026, 06:39 UTC
- Last checked
- CVE list November 19, 2026, 07:12 UTC; NVD November 19, 2026, 07:33 UTC; KEV December 3, 2026, 17:39 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
What other CVEs affect mindsdb?
- Oct 21, 2026CVE-2026-92207 MindsDB: code injection (remote code execution)
- Sep 5, 2026CVE-2026-86173 mindsdb: server-side request forgery (SSRF)
- May 3, 2026CVE-2026-7712 MindsDB: deserialization of untrusted data
- May 3, 2026CVE-2026-7711 MindsDB: unrestricted file upload
- Feb 24, 2026CVE-2026-27483 mindsdb: path traversal (reading or writing files outside the intended folder)
- Feb 16, 2026CVE-2026-2531 MindsDB: server-side request forgery (SSRF)
- Jan 12, 2026CVE-2025-68472 mindsdb: path traversal (reading or writing files outside the intended folder)
- Sep 12, 2024CVE-2024-45856 mindsdb: cross-site scripting (XSS)
Questions about CVE-2023-50731
Is CVE-2023-50731 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 17:39 UTC. FIRST's EPSS gives it a 0.98% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of mindsdb are affected by CVE-2023-50731?
mindsdb before 23.11.4.1, per the GitHub advisory GHSA-j8w6-2r9h-cxhj. The tables above give every range the sources list.
Which version fixes CVE-2023-50731?
23.11.4.1, per the GitHub advisory GHSA-j8w6-2r9h-cxhj. Check the vendor's advisory before you rely on it.
How severe is CVE-2023-50731?
Critical (9.1, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2023-50731?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.