# CVE-2024-14021: LlamaIndex unsafe deserialization in BGEM3Index load_from_disk

Source: https://junglewise.ai/threats/cve-2024-14021-llamaindex-unsafe-deserialization-in-bgem3index-load-from-disk  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-01-12. Updated: 2026-07-14  
License: CC BY 4.0 with a link back

CVE-2024-14021 · Severity: high · CVSS 7.8 · Published 2026-01-12

LlamaIndex is a popular framework used by developers to connect custom data to Large Language Models (LLMs). A security flaw in how the library handles saved data files allows an attacker to execute malicious code on a user's system. This occurs if a user is tricked into loading a specially crafted index file from an untrusted source, potentially leading to a full system compromise.

Technologies: [Llamaindex](https://junglewise.ai/threats/technologies/llamaindex), [llama-index (PyPI)](https://junglewise.ai/threats/technologies/llama-index). Vendors: [Llamaindex](https://junglewise.ai/threats/vendors/llamaindex), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2024-14021 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-14021 being exploited in the wild.

**How severe is CVE-2024-14021?** High severity, with a CVSS score of 7.8, published 12 January 2026.

**Which products and versions are affected?** Llamaindex <= 0.11.6; llama-index (PyPI) ECOSYSTEM:introduced=0,fixed=0.11.7.

**Is there a fix for CVE-2024-14021?** Yes. llama-index (PyPI): upgrade to 0.11.7 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2024-14021 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2024-14021?** Check whether you run Llamaindex or llama-index (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- llama-index (PyPI): upgrade to 0.11.7 or later

  ```sh
  pip install "llama-index>=0.11.7"
  ```


## Technical details

An unsafe deserialization vulnerability exists in LlamaIndex (run-llama/llama_index) versions up to and including 0.11.6 within the BGEM3Index.load_from_disk() function. The root cause is the use of the Python 'pickle' module to load the 'multi_embed_store.pkl' file from a user-provided directory without any validation. Because 'pickle' is inherently insecure for untrusted data, an attacker can craft a malicious pickle file that executes arbitrary commands when deserialized. Exploitation requires a victim to point the library to a directory controlled by the attacker; this is classified as a local attack vector with required user interaction.

## Affected products

- run-llama LlamaIndex <= 0.11.6

## Identifiers

- CVE-2024-14021
- PYSEC-2026-85

## Timeline

- 2026-01-12: disclosed: Initial disclosure via VulnCheck and NVD
- 2026-01-12: advisory

## References

- [https://github.com/run-llama/llama_index](https://github.com/run-llama/llama_index)
- [https://huntr.com/bounties/ab4ceeb4-aa85-4d1c-aaca-4eda1b71fc12](https://huntr.com/bounties/ab4ceeb4-aa85-4d1c-aaca-4eda1b71fc12)
- [https://www.llamaindex.ai/](https://www.llamaindex.ai/)
- [https://www.vulncheck.com/advisories/llamaindex-bgem3index-unsafe-deserialization](https://www.vulncheck.com/advisories/llamaindex-bgem3index-unsafe-deserialization)

## Related threats

- [PYSEC-2026-2606 - LlamaIndex vulnerable to data loss through hash collisions in its DocugamiReader class](https://junglewise.ai/threats/cve-2025-6211-llamaindex-vulnerable-to-data-loss-through-hash-collisions-in-its)
- [PYSEC-2026-1558 - LlamaIndex vulnerable to Path Traversal attack through its encode_image function](https://junglewise.ai/threats/cve-2025-6209-llamaindex-path-traversal-in-encode-image-function)
- [PYSEC-2026-1559 - LlamaIndex vulnerable to DoS attack through uncontrolled recursive JSON parsing](https://junglewise.ai/threats/cve-2025-5472-llamaindex-vulnerable-to-dos-attack-through-uncontrolled-recursive)
- [PYSEC-2026-1567 - LlamaIndex vulnerability in its ObsidianReader class can lead to Path Traversal exploit](https://junglewise.ai/threats/cve-2025-6210-llamaindex-obsidianreader-path-traversal-via-hardlinks)
- [PYSEC-2026-1568 - LlamaIndex is vulnerable to Path Traversal attack through its ObsidianReader class](https://junglewise.ai/threats/cve-2025-3046-llamaindex-is-vulnerable-to-path-traversal-attack-through-its)
