# CVE-2025-6209: Arbitrary File Read through Path Traversal in run-llama/llama_index

- Severity: High 7.5 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.62%, higher than 51% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-07-07T12:21:10.767Z
- Modified: 2026-07-07T17:56:51.353Z
- Also known as: GHSA-2rhq-96q8-4vjq, PYSEC-2025-65, PYSEC-2026-1558
- Weaknesses: CWE-29
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: @huntr_ai

## 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.

(As written by CVE List.)

## Affected

- run-llama run-llama/llama_index: from unspecified before 0.12.41
- llama-index-core (PyPI): from 0.11.23 before 0.12.41
- llamaindex llamaindex: from 0.12.27 before 0.12.41
- llama-index (PyPI): before cdeaab91a204d1c3527f177dac37390327aef274; from 0.12.27 before 0.12.41

## Every score

- @huntr_ai: CVSS:3.0 7.5 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.0 7.5 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- PyPA Advisory Database: CVSS:3.0 7.5 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://huntr.com/bounties/e89d14f8-bfe8-4c9a-bb2a-656c01cc9a68> (exploit, third-party-advisory, web)
- <https://github.com/run-llama/llama_index/commit/cdeaab91a204d1c3527f177dac37390327aef274> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-6209> (advisory)
- <https://github.com/pypa/advisory-database/tree/main/vulns/llama-index/PYSEC-2025-65.yaml> (web)
- <https://github.com/run-llama/llama_index> (package)
- <https://pypi.org/project/llama-index-core> (package)
- <https://github.com/advisories/GHSA-2rhq-96q8-4vjq> (advisory)

## Sources

- CVE List: [CVE-2025-6209](https://www.cve.org/CVERecord?id=CVE-2025-6209), CVE Terms of Use, modified 2025-07-07
- GitHub Advisory Database: [GHSA-2rhq-96q8-4vjq](https://github.com/advisories/GHSA-2rhq-96q8-4vjq), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2025-6209](https://nvd.nist.gov/vuln/detail/CVE-2025-6209), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2025-65](https://osv.dev/vulnerability/PYSEC-2025-65), CC-BY-4.0, modified 2026-07-07
- PyPA Advisory Database: [PYSEC-2026-1558](https://osv.dev/vulnerability/PYSEC-2026-1558), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2025-6209 · Whole record: https://cve.day/CVE-2025-6209.json · Rebuilt by cve.day 2026-11-25T22:59:00.722Z
