{"id":"CVE-2023-49796","aliases":["CVE-2023-49796","GHSA-crhp-7c74-cg4c","PYSEC-2023-278"],"related":[],"kind":"vulnerability","state":"published","title":"MindsDB Arbitrary File Write vulnerability","summary":"MindsDB connects artificial intelligence models to real time data. Versions prior to 23.11.4.1 contain a limited file write vulnerability in `file.py` Users should use MindsDB's `staging` branch or v23.11.4.1, which contain a fix for the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"MindsDB connects artificial intelligence models to real time data. Versions prior to 23.11.4.1 contain a limited file write vulnerability in `file.py` Users should use MindsDB's `staging` branch or v23.11.4.1, which contain a fix for the issue.","source":"cvelist"},{"lang":"en","text":"### 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).","format":"markdown","source":"ghsa"},{"lang":"es","text":"MindsDB conecta modelos de inteligencia artificial con datos en tiempo real. Las versiones anteriores a la 23.11.4.1 contienen una vulnerabilidad de escritura de archivos limitada en `file.py`. Los usuarios deben usar la rama `staging` de MindsDB o la versión 23.11.4.1, que contiene una solución para el problema.","source":"nvd"}],"published":"2023-12-11T20:38:25.330Z","modified":"2026-06-17T06:36:28.990Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-20"],"affected":[{"ranges":[{"version":"< 23.11.4.1","status":"affected"}],"vendor":"mindsdb","product":"mindsdb","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"23.11.4.1"}],"ecosystem":"PyPI","package":"mindsdb","purl":"pkg:pypi/mindsdb","source":"ghsa"},{"ranges":[{"status":"affected","version":"23.7.4.1"}],"vendor":"mindsdb","product":"mindsdb","cpe":"cpe:2.3:a:mindsdb:mindsdb:23.7.4.1:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"8d13c9c28ebcf3b36509eb679378004d4648d8fe"},{"type":"ecosystem","introduced":"0","status":"affected"}],"ecosystem":"PyPI","package":"mindsdb","purl":"pkg:pypi/mindsdb","repo":"https://github.com/mindsdb/mindsdb","source":"pysec"}],"references":[{"url":"https://github.com/mindsdb/mindsdb/security/advisories/GHSA-crhp-7c74-cg4c","tags":["advisory","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/mindsdb/mindsdb/commit/8d13c9c28ebcf3b36509eb679378004d4648d8fe","tags":["fix","patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-49796","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/mindsdb/mindsdb","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/mindsdb/mindsdb/blob/1821da719f34c022890c9ff25810218e71c5abbc/mindsdb/api/http/namespaces/file.py#L122-L125","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/mindsdb/PYSEC-2023-278.yaml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-49796","url":"https://www.cve.org/CVERecord?id=CVE-2023-49796","licence":"CVE Terms of Use","modified":"2024-08-02T22:01:26.096Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-crhp-7c74-cg4c","url":"https://github.com/advisories/GHSA-crhp-7c74-cg4c","licence":"CC-BY-4.0","modified":"2024-11-22T18:40:49.695Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-49796","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-49796","licence":"Public domain","modified":"2026-06-17T06:36:28.990Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2023-278","url":"https://osv.dev/vulnerability/PYSEC-2023-278","licence":"CC-BY-4.0","modified":"2026-04-23T07:45:13.032Z"}],"updatedAt":"2026-11-25T22:58:31.199Z","epss":{"score":0.00492,"percentile":0.43848,"date":"2026-12-01T12:00:22.000Z"}}