CVE-2024-45850

8.8 HIGH

📋 TL;DR

This vulnerability allows remote code execution on MindsDB servers when the Microsoft SharePoint integration is installed. Attackers can craft malicious INSERT queries containing Python code that gets executed via eval() on the server. Organizations running MindsDB versions 23.10.5.0 through 24.7.4.1 with SharePoint integration are affected.

💻 Affected Systems

Products:
  • MindsDB
Versions: 23.10.5.0 up to 24.7.4.1
Operating Systems: All platforms running MindsDB
Default Config Vulnerable: ✅ No
Notes: Requires Microsoft SharePoint integration to be installed and configured on the MindsDB server.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full server compromise allowing attackers to execute arbitrary commands, steal data, install malware, pivot to other systems, or disrupt operations.

🟠

Likely Case

Unauthorized data access, modification, or deletion in SharePoint-connected databases, with potential for lateral movement within the network.

🟢

If Mitigated

Limited impact if proper network segmentation, query validation, and least privilege access controls are implemented.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires database access privileges to execute INSERT queries against SharePoint-connected databases.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 24.7.4.2 or later

Vendor Advisory: https://hiddenlayer.com/sai-security-advisory/2024-09-mindsdb/

Restart Required: Yes

Instructions:

1. Backup MindsDB configuration and data. 2. Upgrade to MindsDB version 24.7.4.2 or later. 3. Restart the MindsDB service. 4. Verify the upgrade was successful.

🔧 Temporary Workarounds

Disable SharePoint Integration

all

Remove or disable the Microsoft SharePoint integration from MindsDB to eliminate the attack vector.

# Remove SharePoint connector if installed
# Check MindsDB documentation for specific removal commands

Restrict Database Access

all

Implement strict access controls to limit who can execute queries against SharePoint-connected databases.

# Configure MindsDB user permissions to restrict INSERT operations
# Use database role-based access control

🧯 If You Can't Patch

  • Implement network segmentation to isolate MindsDB servers from critical systems
  • Deploy web application firewall (WAF) rules to detect and block malicious INSERT queries

🔍 How to Verify

Check if Vulnerable:

Check MindsDB version and verify if SharePoint integration is installed. Vulnerable if version is between 23.10.5.0 and 24.7.4.1 inclusive.

Check Version:

mindsdb --version

Verify Fix Applied:

Confirm MindsDB version is 24.7.4.2 or later and test that eval() execution no longer occurs with crafted INSERT queries.

📡 Detection & Monitoring

Log Indicators:

  • Unusual INSERT queries containing Python code patterns
  • Multiple failed eval() executions
  • Unexpected process spawns from MindsDB

Network Indicators:

  • Anomalous database query patterns to SharePoint endpoints
  • Unexpected outbound connections from MindsDB server

SIEM Query:

source="mindsdb" AND (query="*eval*" OR query="*INSERT*" AND query="*python*" OR query="*exec*")

🔗 References

📤 Share & Export