LlamaIndex
CVE-2024-14021
HIGH
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
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
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Lifecycle Timeline
6Blast Radius
ecosystem impact- 2 pypi packages depend on llama-index (2 direct, 0 indirect)
Ecosystem-wide dependent count for version 0.11.7.
DescriptionCVE.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.
AnalysisAI
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.
Technical ContextAI
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.
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.
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
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
An XML Entity Expansion vulnerability, also known as a 'billion laughs' attack, exists in the sitemap parser of the run-
Same weakness CWE-502 – Deserialization of Untrusted Data
View allSame technique Deserialization
View allShare
External POC / Exploit Code
Leaving vuln.today