CVE-2025-6209

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

Published Jul 7, 2025 CVSS 3.0 · 7.5 High EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2025-20223 LlamaIndex vulnerable to Path Traversal attack through its encode_image function
Github GHSA Github GHSA GHSA-2rhq-96q8-4vjq LlamaIndex vulnerable to Path Traversal attack through its encode_image function
History
Type Values Removed Values Added
First Time appeared Llamaindex
Llamaindex llamaindex
CPEs cpe:2.3:a:llamaindex:llamaindex:*:*:*:*:*:*:*:*
Vendors & Products Llamaindex
Llamaindex llamaindex
Type Values Removed Values Added
Metrics epss

{'score': 0.00058}

epss

{'score': 0.00076}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Arbitrary File Read through Path Traversal in run-llama/llama_index
Weaknesses CWE-29
References
Metrics cvssV3_0

{'score': 7.5, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
@huntr_ai
Published
Updated
Jul 7, 2025, 1:45 PM
Reserved
Jun 17, 2025, 5:33 PM
Status
Analyzed
Published
Jul 7, 2025, 1:15 PM
Modified
Jun 17, 2026, 10:01 AM
Severity
Moderate
Public date
Jul 7, 2025, 12:21 PM