Vulnerability · Published Jul 7, 2025 · Assigned by @huntr_ai
CVE-2025-6209Arbitrary File Read through Path Traversal in run-llama/llama_index
High 7.5
In plain English
A high-severity security flaw in run-llama/llama_index from run-llama. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 50% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | llama-index | 0.12.41 | PYSEC-2025-65 |
| PyPI | llama-index-core | 0.12.41 | GHSA-2rhq-96q8-4vjq |
| PyPI | llama-index-core | 0.12.41 | PYSEC-2026-1558 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| run-llama | run-llama/llama_index | unspecified – before 0.12.41 |
Weakness: CWE-29 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N