Skip to content
LlamaIndexGHSA-2rhq-96q8-4vjq

LlamaIndex vulnerable to Path Traversal attack through its encode_image function

High7.5CVE-2025-6209 · Published Jul 7, 2025 · updated Jul 7, 2026

A path traversal vulnerability exists in run-llama/llama_index versions 0.11.23 through 0.12.40, specifically within the `encode_image` function in `generic_utils.py`. This vulnerability allows an attacker to manipulate the `image_path` input to read arbitrary files on the server, including sensitive system files. The issue arises due to improper validation or sanitization of the file path, enabling path traversal sequences to access files outside the intended directory. The vulnerability is fixed in version 0.12.41.

GitHub advisory

Affected versions

PackageAffectedFixed in
llama-index-core
PyPI
>= 0.11.23, < 0.12.410.12.41
Details and references

More LlamaIndex advisories

All LlamaIndex
Advisory
LlamaIndex vulnerable to DoS attack through uncontrolled recursive JSON parsing
Medium6.5Jul 7, 2025
LlamaIndex: path traversal
Medium6.2Jul 7, 2025
LlamaIndex: denial of service
High7.5Jul 7, 2025
A vulnerability in the ArxivReader class of the run-llama/llama_index repository
Medium5.3Jul 7, 2025
LlamaIndex: arbitrary file read
High7.5Jul 7, 2025
LlamaIndex has Incomplete Documentation of Program Execution related to JsonPickleSerializer component
Medium5.0Jul 7, 2025

Critical advisories by email

Wednesdays: the week’s critical and high advisories in the AI and data stack, with the fixed versions. Only in weeks that have some.

Double opt-in. Unsubscribe any time.