CVE-2023-49796 is a medium-severity (CVSS 5.3) Improper Input Validation vulnerability in mindsdb. A fix is available for mindsdb — see the affected versions and patch details below.
MindsDB Arbitrary File Write vulnerability
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
mindsdbReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
Impact
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. This issue may lead to arbitrary file write. This vulnerability allows for writing files anywhere on the server that the filesystem permissions that the running server has access to.
Patches
Use mindsdb staging branch or v23.11.4.1
References
- GHSL-2023-184
- See CodeQL path injection prevention guidelines and OWASP guidelines.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | mindsdb | all versions | 23.11.4.1pip install --upgrade 'mindsdb==23.11.4.1' |
Affected Products
mindsdbmindsdbDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for mindsdb, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update mindsdb to 23.11.4.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2023-49796 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is CVE-2023-49796 in your dependencies?
Find it across PyPI, including transitive dependencies.