Skip to main content
← All vulnerabilities
CVE-2022-23522GHSA-7X45-PHMR-9WQPPYSEC-2023-26

Arbitrary File Write when Extracting Tarballs retrieved from a remote location using in mindsdb

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 22.11.4.3
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • mindsdb mindsdb

    fixed in 22.11.4.3

  • mindsdbPyPI

    fixed in 22.11.4.3

References 1

GitHub · mindsdb/mindsdb