Symlink Following in txtai leads to arbitrary file write when loading untrusted embedding indices
txtai
(,9.0.0]
The txtai framework allows the loading of compressed tar files as embedding indices. While the validate function is intended to prevent path traversal vulnerabilities by ensuring safe filenames, it does not account for symbolic links within the tar file. An attacker is able to write a file anywhere in the filesystem when txtai is used to load untrusted embedding indices
The following txtai code is vulnerable, when loading a tar file that contains symbolic links -
from txtai import Embeddings
embeddings = Embeddings()
embeddings.load(path="/tmp/bad_tar.tar.gz")
No mitigations are supplied for this issue