Skip to main content

CVE-2025-6209: CWE-29 Path Traversal: '\..\filename' in run-llama run-llama/llama_index

High
VulnerabilityCVE-2025-6209cvecve-2025-6209cwe-29
Published: Mon Jul 07 2025 (07/07/2025, 12:21:10 UTC)
Source: CVE Database V5
Vendor/Project: run-llama
Product: run-llama/llama_index

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.

AI-Powered Analysis

AILast updated: 07/07/2025, 12:54:37 UTC

Technical Analysis

CVE-2025-6209 is a path traversal vulnerability identified in the run-llama project's component llama_index, specifically affecting versions 0.12.27 through 0.12.40. The vulnerability resides in the encode_image function within the generic_utils.py file. The root cause is insufficient validation or sanitization of the image_path input parameter, which allows an attacker to craft a path containing traversal sequences such as "\..\filename". This manipulation enables unauthorized reading of arbitrary files on the server, including sensitive system files outside the intended directory scope. The vulnerability does not require any authentication or user interaction and can be exploited remotely over the network. The CVSS v3.0 base score is 7.5, indicating a high severity level, with an attack vector of network (AV:N), low attack complexity (AC:L), no privileges required (PR:N), no user interaction (UI:N), unchanged scope (S:U), high confidentiality impact (C:H), and no impact on integrity or availability (I:N/A:N). The vulnerability has been addressed and fixed in version 0.12.41 of the run-llama/llama_index package. There are no known exploits in the wild at the time of publication, but the ease of exploitation and high confidentiality impact make it a significant risk if left unpatched.

Potential Impact

For European organizations using the run-llama/llama_index library versions 0.12.27 through 0.12.40, this vulnerability poses a serious risk to the confidentiality of sensitive data. Attackers exploiting this flaw can read arbitrary files on affected servers, potentially exposing credentials, configuration files, intellectual property, or personal data protected under GDPR. This could lead to data breaches, regulatory fines, reputational damage, and loss of customer trust. Since the vulnerability does not affect integrity or availability, the primary concern is unauthorized data disclosure. Organizations relying on run-llama for AI or machine learning workloads that process images or files are particularly at risk. The vulnerability's network accessibility and lack of authentication requirements increase the likelihood of exploitation, especially in internet-facing deployments or environments with insufficient network segmentation. Given the sensitivity of data handled by many European enterprises and strict data protection regulations, the impact could be substantial if exploited.

Mitigation Recommendations

European organizations should immediately upgrade run-llama/llama_index to version 0.12.41 or later, where the vulnerability is fixed. Until the upgrade is applied, organizations should implement strict input validation and sanitization on all user-supplied file paths to prevent path traversal sequences. Employ application-layer firewalls or web application firewalls (WAFs) with custom rules to detect and block suspicious path traversal patterns in requests. Restrict file system permissions so that the application process has access only to necessary directories and files, minimizing exposure if exploitation occurs. Conduct thorough code reviews and static analysis on any custom code interacting with file paths to ensure no similar vulnerabilities exist. Monitor logs for unusual file access patterns or errors that could indicate attempted exploitation. Finally, ensure network segmentation and limit exposure of vulnerable services to trusted internal networks when possible to reduce attack surface.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
@huntr_ai
Date Reserved
2025-06-17T17:33:02.165Z
Cvss Version
3.0
State
PUBLISHED

Threat ID: 686bbff86f40f0eb72e88b8b

Added to database: 7/7/2025, 12:39:20 PM

Last enriched: 7/7/2025, 12:54:37 PM

Last updated: 8/19/2025, 7:00:24 AM

Views: 25

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats