CVE-2025-6209
JSON

7.5high

Arbitrary File Read through Path Traversal in run-llama/llama_index

Severity
7.5high CVSS:3.0 by @huntr_ai
Exploit likelihood
0.62% (higher than 51% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
@huntr_ai
Also known as
GHSA-2rhq-96q8-4vjqPYSEC-2025-65PYSEC-2026-1558

Description

A path traversal vulnerability exists in run-llama/llama_index versions 0.12.27 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.

Affected

Product or packageVersionsReported by
run-llama run-llama/llama_indexfrom unspecified before 0.12.41CVE List
llama-index-core (PyPI)from 0.11.23 before 0.12.41GitHub Advisory Database, PyPA Advisory Database
llamaindex llamaindexfrom 0.12.27 before 0.12.41NVD
llama-index (PyPI)before cdeaab91a204d1c3527f177dac37390327aef274, from 0.12.27 before 0.12.41PyPA Advisory Database

All scores

@huntr_ai7.5high CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
GitHub7.5high CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
PyPA Advisory Database7.5high CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Classification

CWE-29

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

A path traversal vulnerability exists in run-llama/llama_index versions 0.12.27 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 Database

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.

NVD (es)

Existe una vulnerabilidad de path traversal en las versiones 0.12.27 a 0.12.40 de run-llama/llama_index, específicamente en la función `encode_image` de `generic_utils.py`. Esta vulnerabilidad permite a un atacante manipular la entrada `image_path` para leer archivos arbitrarios en el servidor, incluyendo archivos sensibles del sistema. El problema surge debido a una validación o depuración incorrecta de la ruta del archivo, lo que permite que las secuencias de path traversal accedan a archivos fuera del directorio previsto. La vulnerabilidad se corrigió en la versión 0.12.41.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-6209 changed 2025-07-07CVE Terms of Use
GitHub Advisory DatabaseGHSA-2rhq-96q8-4vjq changed 2026-07-07CC-BY-4.0
NVDCVE-2025-6209 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2025-65 changed 2026-07-07CC-BY-4.0
PyPA Advisory DatabasePYSEC-2026-1558 changed 2026-07-07CC-BY-4.0