Skip to content
Race condition Disclosed report Intermediate CVE-2025-7647

llama-index-core insecurely handles temporary files

The llama-index-core package uses a predictable, hardcoded temporary directory on Linux without proper security controls. An attacker on a multi-user system could steal proprietary models, poison cached embeddings, or conduct symlink attacks.

run-llama/llama_index

Originally disclosed on huntr

The llama-index-core package, up to version 0.12.44, contains a vulnerability in the get_cache_dir() function where a predictable, hardcoded directory path /tmp/llama_index is used on Linux systems without proper security controls. This vulnerability allows attackers on multi-user systems to steal proprietary models, poison cached embeddings, or conduct symlink attacks. The issue affects all Linux deployments where multiple users share the same system. The vulnerability is classified under CWE-379, CWE-377, and CWE-367, indicating insecure temporary file creation and potential race conditions.

From the GitHub Advisory Database (GHSA-cr7q-2w66-hjcm, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

On shared Linux systems, an attacker could steal proprietary models, poison cached embeddings, or conduct symlink attacks.

What the attacker needed

Multi-user Linux system; attacker has local access

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a program needs a temporary place to store files, it should create a private folder that only its own user can access. This package instead always uses the same folder name in a shared location, so other users on the same computer can guess where it is. That lets a malicious user on the same machine read, change, or trick the program into using files it should not.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

More from run-llama/llama_index

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.