Skip to main content

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')


Severity High
Score 8.8/10


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 affects versions prior to Users unable to upgrade should avoid ingesting archives from untrusted sources.

  • LOW
  • HIGH
  • NONE
  • LOW
  • HIGH
  • HIGH

CWE-22 - Path Traversal

Path traversal (or directory traversal), is a vulnerability that allows malicious users to traverse the server's root directory, gaining access to arbitrary files and folders such as application code & data, back-end credentials, and sensitive operating system files. In the worst-case scenario, an attacker could potentially execute arbitrary files on the server, resulting in a denial of service attack. Such an exploit may severely impact the integrity, confidentiality, and availability of an application.

Advisory Timeline

  • Published