LlamaIndex
CVE-2024-14021
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious pickle in multi_embed_store.pkl
-
DeliveryDistribute as shared BGE-M3 persist directory
-
ExploitVictim calls load_from_disk() on it
-
Executionpickle.load() deserializes payload
-
PersistArbitrary code executes as victim
-
ImpactFull host compromise
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V1 - Encoding and Sanitization Safe deserialization, type allowlists
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the attacker can place a crafted persist directory - specifically a malicious multi_embed_store.pkl - where the victim will load it, AND that the victim invokes BGEM3Index.load_from_disk() on that attacker-influenced persist_dir. The exact prerequisite feature is use of the BGE-M3 managed index (llama_index/indices/managed/bge_m3) with on-disk persistence; applications that do not load BGE-M3 indexes from untrusted directories are not exposed. Limiting factors per the CVSS vector: it is not remote (AV:L) and requires victim interaction (UI:A) - no code runs until the victim loads the malicious index - which is why it depends on social engineering or a poisoned shared/downloaded artifact rather than unauthenticated remote triggering; no prior authentication on the victim system is modeled (PR:N). |
| Impact | The CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H) scores 8.4 (High) and is internally consistent with the description: exploitation is local and requires victim action (UI:A) - the victim must load a malicious persist directory - but grants full confidentiality, integrity, and availability impact via code execution. This is a classic 'trusted-input' RCE whose real-world risk hinges entirely on how the persist directory reaches the victim (shared/downloaded index, multi-tenant storage, supply-chained artifact). The signals are somewhat contradictory: severity is High and public POC exists, yet EPSS is only 0.08% (24th percentile) and there is no KEV listing, reflecting that exploitation is not network-automatable and depends on social engineering or a malicious artifact rather than mass, remote scanning. This is a genuine risk for anyone loading third-party or user-supplied LlamaIndex artifacts, but not a drive-by internet-facing emergency; prioritize based on whether your deployment ingests untrusted index directories. |
| Exploit ScenarioDerived | An attacker crafts a persist directory containing a malicious multi_embed_store.pkl whose pickle payload executes a reverse shell on unpickling, then distributes it as a 'pre-built' or 'shared' LlamaIndex BGE-M3 index (e.g., via a download link, model hub, or shared storage). When the victim developer or application calls BGEM3Index.load_from_disk() pointing at that directory, arbitrary code runs with the victim's privileges. Public POC/exploit material exists via the huntr bounty submission, and the local vector with low complexity makes exploitation reliable once the victim is induced to load the artifact. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Jul 14, 2026
Arbitrary code execution in LlamaIndex (run-llama/llama_index) versions up to and including 0.11.6 occurs when BGEM3Index.load_from_disk() calls pickle.load() on a multi_embed_store.pkl file read from an attacker-controlled persist_dir. A victim who loads a maliciously crafted index directory executes attacker-supplied code in their own process. Publicly available exploit code exists (huntr bounty submission), though EPSS is low (0.08%) and it is not listed in CISA KEV, so there is no public exploit identified as actively exploited.
Earlier versions of this analysis (1)
LlamaIndex (run-llama/llama_index) versions up to and including 0.11.6 contain an unsafe deserialization vulnerability in BGEM3Index.load_from_disk() in llama_index/indices/managed/bge_m3/base.py. [CVSS 7.8 HIGH]
RemediationAI
Patch available per vendor advisory - upgrade LlamaIndex to a fixed release beyond 0.11.6 (the input does not specify an exact fixed version number, so confirm the patched version against the VulnCheck advisory at https://www.vulncheck.com/advisories/llamaindex-bgem3index-unsafe-deserialization and the project repository at https://github.com/run-llama/llama_index before deploying). Until patched, do not call BGEM3Index.load_from_disk() on any persist_dir that is not fully under your control; treat index directories as executable code. Practical compensating controls: only load indexes generated and stored by your own trusted pipeline, restrict filesystem permissions on persist directories so untrusted users cannot write multi_embed_store.pkl, and verify artifact integrity (checksums/signatures) before loading - the trade-off is added operational overhead and loss of the convenience of loading arbitrary shared indexes. Also review the huntr disclosure (https://huntr.com/bounties/ab4ceeb4-aa85-4d1c-aaca-4eda1b71fc12) for exploit specifics when validating your mitigations.
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
The flaw sits in the BGE-M3 managed index component (llama_index/indices/managed/bge_m3/base.py), which persists and reloads a multi-embedding store using Python's pickle serialization. Python's pickle format is not a safe data format: deserialization can invoke arbitrary constructors and __reduce__ methods, so unpickling untrusted bytes is functionally equivalent to executing untrusted code. This is a textbook CWE-502 (Deserialization of Untrusted Data) issue - load_from_disk() trusts the on-disk .pkl in a user-supplied persist_dir with no signature, allow-list, or safe-loader validation. The affected code is the LlamaIndex Python package (CPE cpe:2.3:a:llamaindex:llamaindex), a widely used framework for building retrieval-augmented-generation (RAG) and LLM data pipelines.
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
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Local trusted-input RCE: attacker supplies a malicious on-disk pickle (AV:L) and the victim must load it (UI:R), yielding full C/I/A via code execution.
Primary rating from Vendor (vulncheck).
CVSS VectorVendor: vulncheck
Lifecycle Timeline
4DescriptionCVE.org
LlamaIndex (run-llama/llama_index) versions up to and including 0.11.6 contain an unsafe deserialization vulnerability in BGEM3Index.load_from_disk() in llama_index/indices/managed/bge_m3/base.py. The function uses pickle.load() to deserialize multi_embed_store.pkl from a user-supplied persist_dir without validation. An attacker who can provide a crafted persist directory containing a malicious pickle file can trigger arbitrary code execution when the victim loads the index from disk.
Executive ViewAI
LlamaIndex, a widely-used data indexing library for AI applications, contains an arbitrary code execution vulnerability in versions up to 0.11.6 that is triggered when loading maliciously crafted index files from disk. Publicly available exploit code exists for this vulnerability. Organizations using LlamaIndex to manage embeddings and search indices risk attackers executing arbitrary code on their systems if an attacker can supply a malicious index directory for loading.
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
Insecure deserialization occurs when an application converts serialized data (a stream of bytes representing an object's state) back into a living object without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)CVE.org
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
Local privilege escalation and denial of service in llama_index 0.12.33 arising from its default configuration of a worl
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
VulDB
Exploit-DB