CVE-2025-6209: CWE-29 Path Traversal: '\..\filename' in run-llama run-llama/llama_index
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 Analysis
Technical Summary
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.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain
CVE-2025-6209: CWE-29 Path Traversal: '\..\filename' in run-llama 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
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.
Affected Countries
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: 1/7/2026, 4:22:39 AM
Views: 77
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2026-20893: Origin validation error in Fujitsu Client Computing Limited Fujitsu Security Solution AuthConductor Client Basic V2
HighCVE-2025-14891: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in ivole Customer Reviews for WooCommerce
MediumCVE-2025-14059: CWE-73 External Control of File Name or Path in roxnor EmailKit – Email Customizer for WooCommerce & WP
MediumCVE-2025-12648: CWE-552 Files or Directories Accessible to External Parties in cbutlerjr WP-Members Membership Plugin
MediumCVE-2025-14631: CWE-476 NULL Pointer Dereference in TP-Link Systems Inc. Archer BE400
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.