CVE-2025-6209: LlamaIndex vulnerable to Path Traversal attack through its encode_image function
A path traversal vulnerability exists in run-llama/llamaindex versions 0.11.23 through 0.12.40, specifically within the encodeimage function in genericutils.py. This vulnerability allows an attacker to manipulate the imagepath input to read arbitrary files on the server, including sensitive system files.
Published Jul 7, 2025 · Updated Jul 8, 2025
Affected packages
llama-index-core
- Ecosystem
- PyPI
- Affected
- >= 0.11.23, < 0.12.41
- Fixed in
- 0.12.41
- Check
pip show llama-index-core
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
References
- https://nvd.nist.gov/vuln/detail/CVE-2025-6209
- https://github.com/run-llama/llama_index/commit/cdeaab91a204d1c3527f177dac37390327aef274
- https://huntr.com/bounties/e89d14f8-bfe8-4c9a-bb2a-656c01cc9a68
- https://github.com/pypa/advisory-database/tree/main/vulns/llama-index/PYSEC-2025-65.yaml
- https://github.com/advisories/GHSA-2rhq-96q8-4vjq
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More LlamaIndex vulnerabilities
All LlamaIndex entriesCVE-2025-6208
llama-index-core vulnerable to Uncontrolled Resource Consumption
medium5.3Feb 2, 2026CVE-2025-7707
llama-index has Insecure Temporary File
high7.1Oct 13, 2025CVE-2025-7647
llama-index-core insecurely handles temporary files
high7.3Sep 27, 2025CVE-2025-5302
LlamaIndex affected by a Denial of Service (DOS) in JSONReader
high8.6Aug 26, 2025CVE-2025-6211
LlamaIndex vulnerable to data loss through hash collisions in its DocugamiReader class
medium6.5Jul 10, 2025CVE-2025-3108
LlamaIndex has Incomplete Documentation of Program Execution related to JsonPickleSerializer component
medium5.0Jul 7, 2025
