CVE-2025-7647: llama-index-core insecurely handles temporary files
On Linux, `get_cache_dir()` in `llama-index-core` stores its cache in the fixed path `/tmp/llama_index`, which any local user can reach. On a shared machine, another user can read cached models, poison cached embeddings, or plant symlinks. The package data lists versions before 0.13.0 as affected and 0.13.0 as the fix.
Published Sep 27, 2025 · Updated Sep 29, 2025 · Analysis Nov 1, 2026
What an attacker can do
The function get_cache_dir() returns a predictable, hardcoded directory, /tmp/llama_index, on Linux. /tmp is writable by every local account, and the advisory says the directory is used without proper security controls. Another user can create the directory first, or read and change what is inside it.
The advisory names three outcomes. An attacker can steal proprietary models kept in the cache. An attacker can poison cached embeddings, so your application later retrieves attacker-chosen vectors and returns wrong results. An attacker can use symlinks, and a race between check and use (CWE-367) can send writes to files the victim owns.
The attack is local: the CVSS vector is local access with low privileges and no user interaction. It matters on multi-user hosts such as shared GPU servers, notebook hosts and CI runners where several accounts share one /tmp. A single-user laptop or an isolated container is much less exposed. The sources do not describe a remote path.
Who is affected
Affected: the pip package llama-index-core before 0.13.0 according to the package data. The advisory text says "up to version 0.12.44", which is narrower; treat anything below 0.13.0 as affected. Only Linux deployments where more than one user shares the machine carry the risk.
Check your install:
pip show llama-index-coreAlso check who owns the directory on a shared host with ls -ld /tmp/llama_index.
llama-index-core
- Ecosystem
- PyPI
- Affected
- < 0.13.0
- Fixed in
- 0.13.0
- Check
pip show llama-index-core
How to fix it
Upgrade to llama-index-core 0.13.0:
pip install -U "llama-index-core>=0.13.0"The fix shipped as part of the v0.13.0 release commit, which is too large for the sources to show the exact change to get_cache_dir(). The advisory names no workaround. On a shared host that cannot upgrade yet, run each user's LlamaIndex jobs in a separate container or a private /tmp, and delete and re-create /tmp/llama_index with owner-only permissions before use. Treat existing cached embeddings as untrusted and rebuild them.
How to tell if you were hit
Run ls -la /tmp/llama_index on shared Linux hosts. Look for a directory owned by a user other than the one running your LlamaIndex jobs, for group- or world-writable permissions, and for symlinks inside it. Compare cached files' owners and modification times against your job schedules. If anything looks planted, delete the cache and rebuild embeddings from source data.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
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.
Questions
- Is this exploitable remotely?
The sources describe a local attack. The CVSS vector is local access with low privileges, so the attacker needs an account on the same Linux system.
- Which llama-index-core version fixes CVE-2025-7647?
0.13.0 per the package data. The advisory text says "up to version 0.12.44", so versions below 0.13.0 are treated as affected.
- Does it affect macOS or Windows?
The advisory says the hardcoded
/tmp/llama_indexpath is used on Linux and that the issue affects Linux deployments where users share the 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 entriesCVE-2025-6208
llama-index-core vulnerable to Uncontrolled Resource Consumption
medium5.3Feb 2, 2026CVE-2025-7707
llama-index has Insecure Temporary File
high7.1Oct 13, 2025CVE-2025-5302
LlamaIndex affected by a Denial of Service (DOS) in JSONReader
high8.6Aug 26, 2025CVE-2025-6211
LlamaIndex vulnerable to data loss through hash collisions in its DocugamiReader class
medium6.5Jul 10, 2025CVE-2025-3108
LlamaIndex has Incomplete Documentation of Program Execution related to JsonPickleSerializer component
medium5.0Jul 7, 2025CVE-2025-5472
LlamaIndex vulnerable to DoS attack through uncontrolled recursive JSON parsing
medium6.5Jul 7, 2025
