CVE-2025-7707
High · 7.1llama-index has Insecure Temporary File
CVSS
7.1
EPSS
0.2%
Published
Oct 13, 2025
CISA due date
—
Cloudanix analysis
On computers used by multiple people, a popular AI library can let one user secretly damage files that the library needs, which may stop services or change results for everyone else.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Low
- Impact
- Data Tampering
- Component
- Library
- Class
- Misconfiguration
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
The library configures NLTK data to a shared subdirectory of the installation that is world-writable on multi-user systems, allowing any local user to overwrite, delete or corrupt cached NLTK resources and thereby trigger denial of service, data tampering or privilege escalation when the library later loads those resources.
Why it matters to the business
Applications built on llama_index running in shared or multi-tenant environments face service interruptions, corrupted model behavior, and possible lateral movement, increasing operational risk on shared infrastructure even though the flaw is not known to be exploited in the wild.
How an attack unfolds
An attacker with a local account on the same system locates the world-writable NLTK cache directory used by llama_index, replaces or deletes NLTK data files with malicious or empty content, and waits for any process using llama_index to load the tampered data, resulting in crashes, incorrect outputs or escalated privileges.
How to fix it
Upgrade run-llama/llama_index to commit 98816394d57c7f53f847ed7b60725e69d0e7aae4 or later; SUSE Linux Enterprise Server 12-LTSS and SAP Application 12 customers must apply kgraft-patch-SLE12_Update_16 version 6-2.1 or newer. Until patches are deployed, configure NLTK data to a user-specific directory outside the shared installation tree.
How to confirm the fix worked
Confirm the installed llama_index commit is at or beyond 98816394d57c7f53f847ed7b60725e69d0e7aae4, verify that NLTK_DATA or the internal cache path resolves to a per-user location, and test that non-privileged users cannot write to the directory used by the library.
Typical attack path
- Obtain a local shell on a multi-user host running an affected version of llama_index
- Discover the NLTK data path under the library installation directory
- Overwrite or delete NLTK resource files with attacker-controlled content
- Trigger any application that imports llama_index so it loads the corrupted data
- Observe denial of service, tampered outputs, or attempt privilege escalation via the resulting process behavior
How to detect it
Review file-integrity monitoring logs for unexpected changes inside the NLTK data directory under the llama_index installation; inspect process execution and library import logs for sudden failures or altered behavior after local user activity; correlate with authentication events showing multiple users on the same host.
What your security team should do
- Immediately schedule upgrade of all llama_index deployments to the fixed commit
- Audit shared hosts and containers for world-writable cache directories under Python package paths
- Enforce per-user NLTK data directories via environment variables in all production workloads
- Add package-version checks to CI/CD pipelines to block vulnerable releases
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| PyPI | llama-index | 0 | 0.13.0 |
Related vulnerabilities
- CVE-2025-6211 LlamaIndex vulnerable to data loss through hash collisions in its DocugamiReader class Also affects llama-index
- CVE-2025-1793 llama_index vulnerable to SQL Injection Also affects llama-index
- CVE-2024-12911 LlamaIndex vulnerable to Creation of Temporary File in Directory with Insecure Permissions Also affects llama-index
- CVE-2024-12910 LlamaIndex Uncontrolled Resource Consumption vulnerability Also affects llama-index
- CVE-2024-4181 A command injection vulnerability exists in the RunGptLLM class of the llama_index… Also affects llama-index
- CVE-2024-23751 LlamaIndex (aka llama_index) through 0.9.34 allows SQL injection via the Text-to-SQL… Also affects llama-index
- CVE-2026-62847 Metalama is a Roslyn-based open-source patterns and architecture toolkit for C#. CWE-377
- CVE-2026-97209 Insecure Temporary File vulnerability in Mix deps.partition in Elixir allows a local user… CWE-377