CVE-2023-50731
Python vulnerability analysis and mitigation

Overview

MindsDB, a SQL Server for artificial intelligence, was found to contain a critical vulnerability (CVE-2023-50731) prior to version 23.11.4.1. The vulnerability exists in the put method within mindsdb/mindsdb/api/http/namespaces/file.py, where insufficient validation of user-controlled name values used in temporary file names leads to path injection (GitHub Security Lab, NVD).

Technical details

The vulnerability stems from the put method's handling of file operations. When a temporary file is created, the user-controlled name value is used without proper validation in the file path. The file is opened for writing on lines 122-125, enabling path injection. Although the temporary directory is deleted on line 151, the path injection vulnerability allows writing files outside the directory, meaning potentially dangerous files remain on the system. The vulnerability has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H (NVD).

Impact

The vulnerability allows arbitrary file contents to be written through f.write(chunk) on line 125. While MindsDB does validate file types (csv, json, parquet, xls, or xlsx) in the save_file method, this check occurs after file writing, meaning malicious files persist on the system. Additionally, the same user-controlled source variable can be exploited in another path injection vulnerability that enables deletion of any zip or tar.gz files on the server (GitHub Security Lab).

Mitigation and workarounds

The vulnerability has been patched in MindsDB version 23.11.4.1. Users should upgrade to this version or later to mitigate the risk (GitHub Security Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-23949HIGH8.6
  • PythonPython
  • jaraco.context
NoYesJan 20, 2026
CVE-2026-22219HIGH8.3
  • PythonPython
  • chainlit
NoYesJan 20, 2026
CVE-2026-23842HIGH7.5
  • PythonPython
  • chatterbot
NoYesJan 19, 2026
CVE-2026-23877MEDIUM5.3
  • PythonPython
  • swingmusic
NoYesJan 19, 2026
CVE-2026-23833LOW1.7
  • PythonPython
  • esphome
NoYesJan 19, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management