PYSEC-2025-65
Vulnerability from pysec - Published: 2025-07-07 13:15 - Updated: 2025-07-07 15:23A 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.
| Name | purl | llama-index | pkg:pypi/llama-index |
|---|
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "llama-index",
"purl": "pkg:pypi/llama-index"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "cdeaab91a204d1c3527f177dac37390327aef274"
}
],
"repo": "https://github.com/run-llama/llama_index",
"type": "GIT"
},
{
"events": [
{
"introduced": "0.12.27"
},
{
"fixed": "0.12.41"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.12.27",
"0.12.28",
"0.12.29",
"0.12.30",
"0.12.31",
"0.12.32",
"0.12.33",
"0.12.34",
"0.12.35",
"0.12.36",
"0.12.37",
"0.12.38",
"0.12.39",
"0.12.40"
]
}
],
"aliases": [
"CVE-2025-6209"
],
"details": "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.",
"id": "PYSEC-2025-65",
"modified": "2025-07-07T15:23:42.730681+00:00",
"published": "2025-07-07T13:15:28+00:00",
"references": [
{
"type": "FIX",
"url": "https://github.com/run-llama/llama_index/commit/cdeaab91a204d1c3527f177dac37390327aef274"
},
{
"type": "WEB",
"url": "https://huntr.com/bounties/e89d14f8-bfe8-4c9a-bb2a-656c01cc9a68"
}
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.