SCA: security update for mindsdb (GHSA-j8w6-2r9h-cxhj)

high Tenable Self-Hosted Container Security Plugin ID 416258

Description

There are packages installed that are affected by a vulnerability referenced in the following CVE:

- 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. (CVE-2023-50731)

See Also

https://github.com/advisories/GHSA-j8w6-2r9h-cxhj

Plugin Details

Severity: High

ID: 416258

Version: Revision 1.8

Type: Local

Family: SCA Checks

Published: 1/23/2025

Updated: 7/2/2026

Supported Sensors: Tenable Cloud Security, Tenable Self-Hosted Container Security

Risk Information

VPR

Risk Factor: Medium

Score: 4.3

Percentile: 53.04

Vendor

Vendor Severity: High

CVSS v2

Risk Factor: High

Base Score: 9.4

Temporal Score: 7.4

Vector: CVSS2#AV:N/AC:L/Au:N/C:N/I:C/A:C

CVSS Score Source: CVE-2023-50731

CVSS v3

Risk Factor: Critical

Base Score: 9.1

Temporal Score: 8.2

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

CVSS v4

Risk Factor: High

Base Score: 8.8

Threat Score: 7.8

Threat Vector: CVSS:4.0/E:P

Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N

Vulnerability Information

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 12/15/2023

Vulnerability Publication Date: 12/15/2023

Reference Information

CVE: CVE-2023-50731