llama_index CVE-2025-7707
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain local user account on shared host
-
DeliveryWrite malicious file to world-writable NLTK data dir
-
ExploitVictim llama_index process loads tampered NLTK data
-
ExecutionCode executes / data corrupted in victim context
-
ImpactPrivilege escalation or denial of service
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Secure temp file creation
|
| Exploitation Conditions | Exploitation requires (1) a multi-user host where multiple accounts share the same llama_index installation, and (2) the NLTK data directory being left at its insecure default location - a world-writable subdirectory of the llama_index codebase (version 0.12.33) rather than a user-specific path. The attacker must already possess a local unprivileged account (PR:L, AV:L) with write access to that directory. Escalation beyond pure DoS/tampering additionally requires a second, higher-privileged user or service to subsequently run llama_index and load the attacker-controlled NLTK data. LIMITING FACTORS: not remotely exploitable, no exploitation against single-user or properly-permissioned installations, and the highest-impact (privilege escalation) outcome depends on a victim process consuming the tampered files - environments that relocate NLTK_DATA to a per-user directory or apply the vendor patch are not affected. |
| Impact | This is a genuine but context-limited risk, best characterized as a local privilege-escalation/tampering issue rather than a remotely exploitable emergency. The CVSS 3.1 vector (AV:L/AC:L/PR:L/UI:N) confirms a LOCAL attack vector requiring an existing low-privileged local account - there is no network exposure. The 7.8 'High' base score is driven entirely by the C:H/I:H/A:H impact set, which is plausible because NLTK data placed in a world-writable shared directory can include pickled/serialized content that a higher-privileged user's llama_index process will load, enabling code execution in that victim's context (hence the stated privilege-escalation outcome). The signals are internally consistent but point to LOW urgency for most environments: EPSS is only 0.19% (8th percentile), the vulnerability is NOT on the CISA KEV list (no confirmed active exploitation), and exploitation is confined to shared multi-user hosts where an attacker already has local access. A public POC exists (huntr), raising the practical likelihood of opportunistic use on such hosts, but POC availability is not the same as in-the-wild exploitation. Conflicting signal worth flagging: the CVSS claims C:H, yet the primary described primitive is file overwrite/deletion (integrity/availability); full confidentiality loss only materializes if the tamper-to-code-execution priv-esc chain succeeds, so C:H should be treated as a best-case-for-attacker assumption rather than a certainty - verify the exact impact against the vendor/huntr report. |
| Exploit ScenarioDerived | On a shared multi-user Linux host, a low-privileged local user writes a malicious NLTK data file (e.g., a crafted serialized resource) into the world-writable NLTK data subdirectory inside the llama_index codebase. When a different, higher-privileged user or service later runs llama_index and loads that NLTK resource, the tampered file is parsed in the victim's context, causing denial of service, data corruption, or escalation to the victim's privileges. A public proof-of-concept is available via huntr; the local-only attack vector (AV:L) means the attacker must already hold an account on the host. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 08, 2026
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.
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.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
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.
Know when Llamaindex gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
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.
Primary rating from NVD.
CVSS VectorNVD
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.
Executive ViewAI
llama_index 0.12.33 exposes multi-user hosts to local privilege escalation and denial of service through insecure shared NLTK data directory permissions, allowing any local low-privileged user to tamper with data that more privileged processes may later load. Publicly available exploit code exists, but EPSS is low and the risk is context-limited to multi-user deployments. Leadership should prioritize inventory and patching of affected systems, as successful exploitation could disrupt AI/LLM services or enable follow-on compromise of higher-privileged workloads.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Affected Products (CPE)NVD
More in Llamaindex
View allA SQL injection vulnerability exists in the `duckdb_retriever` component of the run-llama/llama_index repository, specif
A vulnerability in the FinanceChatLlamaPack of the run-llama/llama_index repository, versions up to v0.12.3, allows for
SQL injection in llama_index DuckDB vector store v0.12.19. PoC and patch available.
Critical SQL injection vulnerability affecting run-llama/llama_index v0.12.21 and potentially other versions, present in
A command injection vulnerability exists in the run-llama/llama_index repository, specifically within the safe_eval func
LlamaIndex (aka llama_index) through 0.9.34 allows SQL injection via the Text-to-SQL feature in NLSQLTableQueryEngine, S
An issue in llama_index v.0.7.13 and before allows a remote attacker to execute arbitrary code via the `exec` parameter
A command injection vulnerability exists in the RunGptLLM class of the llama_index library, version 0.9.47, used by the
Denial-of-service in LlamaIndex (run-llama/llama_index) versions up to and including 0.12.2 lets remote unauthenticated
Arbitrary code execution in LlamaIndex (run-llama/llama_index) versions up to and including 0.11.6 occurs when BGEM3Inde
A critical deserialization vulnerability exists in the run-llama/llama_index library's JsonPickleSerializer component, a
A Denial of Service (DoS) vulnerability has been identified in the KnowledgeBaseWebReader class of the run-llama/llama_i
NVD
CVE.org
EPSS
GitHub
Exploit-DB