Free AI Safety Workshop — in collaboration with explainx.aiSave your seat
AgentbeamBeta
AI agent vulnerability · LlamaIndex

CVE-2025-6209: LlamaIndex vulnerable to Path Traversal attack through its encode_image function

highCVSS 3.0 7.5GHSA-2rhq-96q8-4vjq

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

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 entries