NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · LlamaIndex

CVE-2025-7707: llama-index has Insecure Temporary File

highCVSS 3.0 7.1GHSA-rg9h-vx28-xxp5

llama-index 0.12.33 points the NLTK data directory at a subdirectory inside the installed codebase, which can be writable by every user on a shared machine. A local user can overwrite or corrupt those files. The patched release is llama-index 0.13.0.

Published Oct 13, 2025 · Analysis Nov 1, 2026

What an attacker can do

LlamaIndex uses NLTK data files, such as tokenizer and stopword resources, when it processes text. In the affected version the default location for that data is a folder under the library's own install tree, not a per-user cache. On a multi-user host where that tree is world-writable, any local user can replace, delete or corrupt the files. The advisory classes it as an insecure temporary file (CWE-377).

The attacker needs a local account on the same machine (the CVSS 3.0 vector is local, low privileges, no user interaction). Deleting or corrupting the data breaks text processing, which is a denial of service for apps built on the library. Replacing files lets the attacker change what the application loads, which is data tampering. The advisory also names possible privilege escalation, for example if a higher-privileged process later reads the planted data.

Single-user laptops and containers with one process owner are mostly not at risk. Shared servers, notebooks hubs and CI hosts that install LlamaIndex into a common location are the main exposure. The sources give no proof of concept and the advisory does not say what the patch changed in the directory logic.

Who is affected

llama-index on PyPI before 0.13.0; the advisory names version 0.12.33. The risk exists on multi-user systems where the install directory is writable by users other than the owner.

pip show llama-index

To see whether the data directory is writable, find where the package is installed with pip show -f llama-index and check the permissions of the folder that holds the NLTK data.

llama-index

Ecosystem
PyPI
Affected
< 0.13.0
Fixed in
0.13.0
Check
pip show llama-index

How to fix it

Upgrade to llama-index 0.13.0:

pip install --upgrade llama-index==0.13.0

The fix commit is the 0.13.0 release commit, so the specific change is not isolated in the sources and I cannot describe it. As a precaution, which is our suggestion and not from the advisory, make sure the install directory is owned by one trusted account and not writable by other users, and install into per-user virtual environments instead of a shared location.

How to tell if you were hit

On shared hosts, list the NLTK data folder under the llama-index install path and look for files owned by a user other than the installer, files with recent modification times, or world-writable permissions. Compare file hashes against a fresh install of the same version. Unexplained errors from tokenizers or missing NLTK resources in LlamaIndex apps can point to deleted or corrupted data.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

The llama_index library version 0.12.33 sets the NLTK data directory to a subdirectory of the codebase by default, which is world-writable in multi-user environments. This configuration allows local users to overwrite, delete, or corrupt NLTK data files, leading to potential denial of service, data tampering, or privilege escalation. The vulnerability arises from the use of a shared cache directory instead of a user-specific one, making it susceptible to local data tampering and denial of service.

Questions

Is a single-user machine affected by CVE-2025-7707?

It is unlikely to matter. The flaw needs another local user who can write to the shared data folder. Multi-user servers and shared build hosts are the real exposure.

Which version fixes it?

llama-index 0.13.0. The advisory describes version 0.12.33 as the one that sets the NLTK data directory inside the codebase.

Can this be exploited remotely?

No. The CVSS 3.0 vector has a local attack vector and low privileges, so the attacker needs an account on the same system.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More LlamaIndex vulnerabilities

All LlamaIndex entries