CVE-2023-50731CWE-918

MindsDB has arbitrary file write in file.py

Critical · published December 22, 2023

CVSS v3.1
9.1
EPSS
1%
Percentile
62.0
In the wild
Unconfirmed
What it is

🔥 A sneaky path injection vulnerability hides in MindsDB’s `put` method, ready to exploit user input without validation! Think of it like a chef who writes down orders but doesn’t check if the ingredients are safe. That missing check allows anyone to slip in a rogue item that could spoil the whole dish or even poison the kitchen! An attacker could leverage this flaw to create arbitrary files on the server, potentially allowing them to write harmful content. Even worse, they can delete important files like `zip` or `tar.gz`, wreaking absolute havoc on your server’s file system. This could lead to data loss and compromise the integrity of your AI applications!

Put simply

Think of it like a chef who writes down orders but doesn’t check if the ingredients are safe. That missing check allows anyone to slip in a rogue item that could spoil the whole dish or even poison the kitchen! The vulnerability arises from the `put` method in MindsDB, which fails to validate the user-controlled file name before writing it to a temporary location. This allows an attacker to inject malicious paths, resulting in unauthorized file creation and deletion.

What to do

An attacker could leverage this flaw to create arbitrary files on the server, potentially allowing them to write harmful content. Even worse, they can delete important files like `zip` or `tar.gz`, wreaking absolute havoc on your server’s file system. This could lead to data loss and compromise the integrity of your AI applications! Upgrade to MindsDB version 23.11.4.1 or later to patch this vulnerability. Ensure to review and sanitize any user inputs used in file operations to prevent path injection vulnerabilities. Conduct a thorough audit of your file handling methods for security best practices. You’ve got this! Follow these steps to safeguard your MindsDB instance and keep your applications safe! 🛡️

The record
Technical detail
CVSS v3.1
9.1 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00983 · 62.0th percentile
Weakness
CWE-918 · Server-Side Request Forgery (SSRF)
Published
2023-12-22T20:43Z
EPSS history
Timeline
  • 22 DEC 20:43Z
    MindsDB has arbitrary file write in file.py
    cvelistv5