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
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain local user account on shared host
  2. Delivery
    Write malicious file to world-writable NLTK data dir
  3. Exploit
    Victim llama_index process loads tampered NLTK data
  4. Execution
    Code executes / data corrupted in victim context
  5. Impact
    Privilege 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

pypi llama-index fix: 0.13.0

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

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
Red Hat 6.1 MEDIUM

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

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

Why It Matters

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.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
Medium
popular Python LLM/RAG framework, but vulnerable only in shared multi-user deployments
Exploit
POC
Public exploit code exists
Data Quality
4 sources
Confidence: Medium

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Small
Automatable· derived
No
Human Impact
Medium

Priority Score

59
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

cpe:2.3:a:llamaindex:llamaindex:*:*:*:*:*:*:*:*
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

Vendor StatusVendor

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