{"id":"CVE-2022-23522","published":"2023-03-30T18:04:56Z","modified":"2025-02-12T14:56:13Z","title":"Arbitrary File Write when Extracting Tarballs retrieved from a remote location using in mindsdb","vendor":"mindsdb","product":"mindsdb","tier":"tail","description":{"text":"MindsDB is an open source machine learning platform. An unsafe extraction is being performed using `shutil.unpack_archive()` from a remotely retrieved tarball. Which may lead to the writing of the extracted files to an unintended location. This vulnerability is sometimes called a **TarSlip** or a **ZipSlip variant**. Unpacking files using the high-level function `shutil.unpack_archive()` from a potentially malicious tarball without validating that the destination file path remained within the intended destination directory may cause files to be overwritten outside the destination directory. An attacker could craft a malicious tarball with a filename path, such as `../../../../../../../../etc/passwd`, and then serve the archive remotely using a personal bucket `s3`, thus, retrieve the tarball through **mindsdb** and overwrite the system files of the hosting server. This issue has been addressed in version 22.11.4.3. Users are advised to upgrade. Users unable to upgrade should avoid ingesting archives from untrusted sources.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00883,"percentile":0.60052,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/mindsdb/mindsdb/security/advisories/GHSA-7x45-phmr-9wqp","tags":["x_refsource_CONFIRM"]}],"priority":{"score":18.0,"factors":[{"name":"EPSS percentile","points":12.01},{"name":"CVSS severity","points":5.95}]},"vendorSlug":"mindsdb","affectedVersions":[{"vendor":"mindsdb","product":"mindsdb","versions":["< 22.11.4.3"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-02-12T14:56:07.796410Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"mindsdb","vulnerableRanges":["<22.11.4.3"],"patched":["22.11.4.3"],"from":["GHSA-7x45-phmr-9wqp","PYSEC-2023-26"],"provenance":"source"}],"summary":{"text":"A path traversal flaw in MindsDB's handling of remotely retrieved tarballs allows extracted files to be written outside the intended destination directory, because shutil.unpack_archive() is used without validating destination paths. An attacker who can get a crafted tarball with traversal filenames retrieved through MindsDB, such as via a remote storage location they control, needs network access and low privileges to trigger the ingestion, and no user interaction is required, enabling overwriting of arbitrary files on the hosting server.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:35:06Z"},"euvd":{"id":"EUVD-2023-0147","exploited":false,"provenance":"source"}}