CVE-2023-49796: Mindsdb Improper Input Validation Vulnerability
MODERATECVE-2023-49796 is a MODERATE (CVSS 5.3) improper input validation vulnerability (CWE-20: Improper Input Validation) affecting Mindsdb libraries in the PyPI ecosystem. The issue involves improper input validation in mindsdb. Remediation is available by upgrading affected packages to version 23.11.4.1.
CVE-2023-49796 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2023-49796
To remediate this vulnerability, upgrade all affected Mindsdb dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install mindsdb>=23.11.4.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show mindsdb
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2023-49796, inspect your installed packages using pip:
pip show mindsdb
Analyze the terminal output to locate any version of Mindsdb in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 23.11.4.1), your application is affected.
Note: The pip show mindsdb command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Mindsdb, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-49796 Affected Mindsdb Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mindsdb
|
PyPI |
< 23.11.4.1
|
23.11.4.1
|
References
Frequently Asked Questions
What is CVE-2023-49796?
Which Mindsdb versions are affected?
What version fixes CVE-2023-49796?
Is mindsdb affected?
What is the CVSS score of CVE-2023-49796?
What CWE is associated with CVE-2023-49796?
How can I check PyPI dependencies for CVE-2023-49796?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-crhp-7c74-cg4c",
"modified" : "2024-11-22T18:14:16Z",
"published" : "2023-12-12T00:49:00Z",
"aliases" : [ "CVE-2023-49796" ],
"summary" : "Improper Input Validation in mindsdb",
"details" : "### Impact\n\nThe 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.\n\n### Patches\n\nUse mindsdb staging branch or v23.11.4.1\n\n\n### References\n\n* GHSL-2023-184 \n* See [CodeQL path injection prevention guidelines](https://codeql.github.com/codeql-query-help/python/py-path-injection/) and [OWASP guidelines](https://owasp.org/www-community/attacks/Path_Traversal).\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "mindsdb"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "23.11.4.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mindsdb/mindsdb/security/advisories/GHSA-crhp-7c74-cg4c"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-49796"
}, {
"type" : "WEB",
"url" : "https://github.com/mindsdb/mindsdb/commit/8d13c9c28ebcf3b36509eb679378004d4648d8fe"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mindsdb/mindsdb"
}, {
"type" : "WEB",
"url" : "https://github.com/mindsdb/mindsdb/blob/1821da719f34c022890c9ff25810218e71c5abbc/mindsdb/api/http/namespaces/file.py#L122-L125"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/mindsdb/PYSEC-2023-278.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-12-12T00:49:00Z",
"nvd_published_at" : "2023-12-11T21:15:07Z"
}
}