Skip to main content

llama_index CVE-2025-7707

HIGH
Insecure Temporary File (CWE-377)
2025-10-13 security@huntr.dev
7.8
CVSS 3.1 · NVD
Share

Severity by source

NVD PRIMARY
7.8 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI
7.8 HIGH

Local account needed (AV:L, PR:L) to write the world-writable shared dir; tamper-to-execution in a victim's context yields full C/I/A, though C:H assumes the priv-esc chain succeeds.

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Analysis Generated
Oct 08, 2026 - 11:32 vuln.today
CVE Published
Oct 13, 2025 - 17:15 nvd
HIGH 7.8

DescriptionNVD

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.

AnalysisAI

Local privilege escalation and denial of service in llama_index 0.12.33 arising from its default configuration of a world-writable, shared NLTK data directory inside the codebase. The flaw requires a multi-user host with a local unprivileged account able to write to that shared path (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, 7.8, CWE-377); an attacker can overwrite, delete, or corrupt NLTK data files, causing tampering or DoS, with escalation to higher-privileged processes possible if a more privileged user or service later loads the poisoned data. No confirmed active exploitation (not in CISA KEV), though publicly available exploit code exists and an upstream fix commit is published; EPSS is low at 0.19% (8th percentile), and the risk is genuine but context-limited rather than a remotely exploitable emergency.

Technical ContextAI

llama_index is a Python framework for building LLM/RAG applications that depends on NLTK for tokenization and text preprocessing. Per CWE-377 (Insecure Temporary File) the root cause is unsafe handling of a shared, writable data location: version 0.12.33 points NLTK's data directory (NLTK_DATA) at a subdirectory of the llama_index codebase rather than a per-user or permission-restricted path. On multi-user systems this location is world-writable, so any local account can place, replace, or remove NLTK corpus/model files that a different process will later load. The CPE entry cpe:2.3:a:llamaindex:llamaindex:*:*:*:*:*:*:*:* indicates the package identifier covers the affected library; the fix is an upstream commit that changes how the NLTK data directory is selected. Because the tampered artifacts are consumed as trusted data rather than executable input, impact manifests first as data tampering and denial of service, and can extend to privilege escalation only when a higher-privileged invocation of llama_index loads the attacker-controlled files.

RemediationAI

Upgrade llama_index to a release containing the upstream fix; the vendor-provided patch is the commit at https://github.com/run-llama/llama_index/commit/98816394d57c7f53f847ed7b60725e69d0e7aae4 (referenced by NVD), and the vulnerability report at https://huntr.com/bounties/3fe2c8ab-6727-4aef-a0ef-4d2818e48803 documents the affected default configuration - confirm the exact patched release version with the vendor or PyPI before deployment, since only the commit SHA is provided here. If upgrading immediately is not possible, set the NLTK_DATA environment variable to a per-user directory (for example under the invoking user's home) or a path writable only by the owning account and root, and ensure the default in-codebase directory is not world-writable; the trade-off is that each user or service account must maintain its own NLTK corpora, which increases disk usage and may alter application startup behavior or fail if the corpora are missing. On multi-user hosts, remove write permission for other users on any shared llama_index/NLTK data location (chmod/chown) and treat the corpora as trusted, root-owned assets, accepting that unprivileged application users can no longer self-download or update NLTK data. Additionally, avoid running llama_index workloads as privileged accounts on shared hosts, since the escalation path depends on a higher-privileged process loading tampered NLTK files.

CVE-2024-11958 CRITICAL POC
9.8 Mar 20

A SQL injection vulnerability exists in the `duckdb_retriever` component of the run-llama/llama_index repository, specif

CVE-2024-12909 CRITICAL POC
9.8 Mar 20

A vulnerability in the FinanceChatLlamaPack of the run-llama/llama_index repository, versions up to v0.12.3, allows for

CVE-2025-1750 CRITICAL POC
9.8 Jun 02

SQL injection in llama_index DuckDB vector store v0.12.19. PoC and patch available.

CVE-2025-1793 CRITICAL POC
9.8 Jun 05

Critical SQL injection vulnerability affecting run-llama/llama_index v0.12.21 and potentially other versions, present in

CVE-2024-3271 CRITICAL POC
9.8 Apr 16

A command injection vulnerability exists in the run-llama/llama_index repository, specifically within the safe_eval func

CVE-2024-23751 CRITICAL POC
9.8 Jan 22

LlamaIndex (aka llama_index) through 0.9.34 allows SQL injection via the Text-to-SQL feature in NLSQLTableQueryEngine, S

CVE-2023-39662 CRITICAL POC
9.8 Aug 15

An issue in llama_index v.0.7.13 and before allows a remote attacker to execute arbitrary code via the `exec` parameter

CVE-2024-4181 HIGH POC
8.8 May 16

A command injection vulnerability exists in the RunGptLLM class of the llama_index library, version 0.9.47, used by the

CVE-2024-58339 HIGH POC
8.7 Jan 12

Denial-of-service in LlamaIndex (run-llama/llama_index) versions up to and including 0.12.2 lets remote unauthenticated

CVE-2024-14021 HIGH POC
8.4 Jan 12

Arbitrary code execution in LlamaIndex (run-llama/llama_index) versions up to and including 0.11.6 occurs when BGEM3Inde

CVE-2025-3108 HIGH POC
7.5 Jul 06

A critical deserialization vulnerability exists in the run-llama/llama_index library's JsonPickleSerializer component, a

CVE-2025-1752 HIGH POC
7.5 May 10

A Denial of Service (DoS) vulnerability has been identified in the KnowledgeBaseWebReader class of the run-llama/llama_i

Share

CVE-2025-7707 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy