txtai Framework Arbitrary File Write Vulnerability via Symbolic Link Handling
Vulnerability
A vulnerability in the txtai framework allows for arbitrary file writing when loading untrusted embedding indices from compressed tar files. The issue arises because the validation function, which is meant to prevent path traversal vulnerabilities by ensuring safe filenames, fails to consider symbolic links within the tar file. As a result, an attacker can manipulate the tar file to create a symbolic link that points to a sensitive location, leading to unauthorized file writes anywhere in the filesystem.
Impact
Exploitation of this vulnerability allows for arbitrary file writes, which could be used to overwrite critical system files or introduce malicious payloads that could be executed later.
Reproduction
To reproduce this vulnerability, load a tar file containing symbolic links into the txtai framework's embedding index. The validation function will not properly handle the symbolic links, allowing for files to be written arbitrarily across the filesystem.
Remediation
Users can update to txtai version 9.0.1 or later, where this vulnerability has been addressed.
Vulnerability Rating
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.
