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 package | Versions | Reported by |
|---|---|---|
| run-llama run-llama/llama_index | from unspecified before 0.12.41 | CVE List |
| llama-index-core (PyPI) | from 0.11.23 before 0.12.41 | GitHub Advisory Database, PyPA Advisory Database |
| llamaindex llamaindex | from 0.12.27 before 0.12.41 | NVD |
| llama-index (PyPI) | before cdeaab91a204d1c3527f177dac37390327aef274, from 0.12.27 before 0.12.41 | PyPA Advisory Database |
All scores
| @huntr_ai | 7.5high CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 7.5high CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| PyPA Advisory Database | 7.5high CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-6209 changed 2025-07-07 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-2rhq-96q8-4vjq changed 2026-07-07 | CC-BY-4.0 |
| NVD | CVE-2025-6209 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2025-65 changed 2026-07-07 | CC-BY-4.0 |
| PyPA Advisory Database | PYSEC-2026-1558 changed 2026-07-07 | CC-BY-4.0 |