CVE-2024-45846·Python vulnerability
An arbitrary code execution vulnerability exists in versions 23.10.3.0 up to 24.7.4.1 of the MindsDB platform, when the Weaviate integration is installed on the server. If a specially crafted ‘SELECT WHERE’ clause containing Python code is run against a database created with the Weaviate engine, the code will be passed to an eval function and executed on the server.
- Severity
- high
- Software
- Python
- Fixed in
- 24.7.4.1
- Published
- 2024-09-12
Affected versions
From: 23.10.3.0
Until: 24.7.4.1
Fixed in: 24.7.4.1
How to fix this CVE
Update MindsDB to version 24.7.4.1 or later to patch the arbitrary code execution vulnerability in the Weaviate integration. If you are running MindsDB versions 23.10.3.0 through 24.7.4.0, immediately upgrade to the patched release. Disable or remove the Weaviate integration if an immediate upgrade is not possible and a temporary mitigation is required.
sudo dnf update python3 && pip install --upgrade mindsdb==24.7.4.1Defensia detects this vulnerability
How to check if you are affected
- Run `mindsdb --version` or check the MindsDB package version with `pip show mindsdb` to verify the installed version is between 23.10.3.0 and 24.7.4.0
- Check if the Weaviate integration is installed by running `pip list | grep weaviate` and verify that Weaviate databases exist in your MindsDB instance with `SELECT * FROM information_schema.databases` while connected to MindsDB
- Search MindsDB server logs for suspicious SELECT WHERE clauses containing Python code patterns such as `__import__`, `exec(`, `eval(`, or `open(` in queries targeting Weaviate engines over the past 30 days
- Verify the patch was applied by confirming `pip show mindsdb` reports version 24.7.4.1 or later and restart the MindsDB service with `sudo systemctl restart mindsdb`
FAQ
What is CVE-2024-45846?
CVE-2024-45846 is an arbitrary code execution vulnerability in MindsDB's Weaviate integration that allows authenticated users to inject Python code through specially crafted SQL WHERE clauses, which is then executed server-side without proper sanitization.
Is CVE-2024-45846 being actively exploited?
No, CVE-2024-45846 is not currently listed as actively exploited according to CISA's Known Exploited Vulnerabilities catalog, and no public exploit code is available.
What versions of Python are affected by CVE-2024-45846?
The vulnerability affects MindsDB versions 23.10.3.0 through 24.7.4.0 when the Weaviate integration is installed. The issue was patched in MindsDB 24.7.4.1. This is a MindsDB-specific vulnerability, not a Python core issue.
How do I check if my server is vulnerable to CVE-2024-45846?
Run `pip show mindsdb | grep Version` to check your MindsDB version. If it reports a version from 23.10.3.0 to 24.7.4.0 and `pip list | grep -i weaviate` returns a result, your server is vulnerable.
Does Defensia detect CVE-2024-45846?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If MindsDB is installed on a monitored server, CVE-2024-45846 will appear in your dashboard with remediation steps.
Related Python CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-45846. Free for 1 server.
Get started free