CVE-2024-14021 LlamaIndex <= 0.11.6 BGEM3Index Unsafe Deserialization

High 8.4 Published Updated

Attackers can execute arbitrary code by providing a malicious pickle file to LlamaIndex's BGEM3Index loader.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-14021?

CVE-2024-14021 is a high-severity unsafe deserialization vulnerability in run-llama llama_index, published on 12 Jan 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-502

Which versions are affected by CVE-2024-14021?

1 open source package ship an affected version, including llama-index. It affects 1 product.

PackageAffectedFixed in
llama-index PyPIAll versions0.11.7

Products include Llamaindex Llamaindex.

How do I fix CVE-2024-14021?

Upgrade llama-index to 0.11.7 or later.

Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.

Is CVE-2024-14021 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-14021 exists.

Sources

Also known as GHSA-m592-cr2f-4qg5, PYSEC-2026-85.

Is CVE-2024-14021 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free