Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-7647: CWE-378 Creation of Temporary File With Insecure Permissions in run-llama run-llama/llama_index

0
High
VulnerabilityCVE-2025-7647cvecve-2025-7647cwe-378
Published: Sat Sep 27 2025 (09/27/2025, 16:34:36 UTC)
Source: CVE Database V5
Vendor/Project: run-llama
Product: run-llama/llama_index

Description

The llama-index-core package, up to version 0.12.44, contains a vulnerability in the `get_cache_dir()` function where a predictable, hardcoded directory path `/tmp/llama_index` is used on Linux systems without proper security controls. This vulnerability allows attackers on multi-user systems to steal proprietary models, poison cached embeddings, or conduct symlink attacks. The issue affects all Linux deployments where multiple users share the same system. The vulnerability is classified under CWE-379, CWE-377, and CWE-367, indicating insecure temporary file creation and potential race conditions.

AI-Powered Analysis

AILast updated: 10/05/2025, 00:50:16 UTC

Technical Analysis

CVE-2025-7647 is a high-severity vulnerability affecting the run-llama project's llama-index-core package, specifically versions up to 0.12.44. The vulnerability arises from the insecure handling of temporary files in the get_cache_dir() function on Linux systems. The function uses a hardcoded and predictable directory path, /tmp/llama_index, to store cached data without implementing proper security controls such as restrictive permissions or unique directory names. This insecure temporary file creation is classified under CWE-378 (Creation of Temporary File With Insecure Permissions), CWE-377 (Insecure Temporary File), and CWE-367 (Time-of-check Time-of-use (TOCTOU) Race Condition), indicating the risk of race conditions and symlink attacks. On multi-user Linux systems, an attacker with limited privileges can exploit this vulnerability by accessing or manipulating the shared /tmp/llama_index directory. Potential attack vectors include stealing proprietary machine learning models stored in the cache, poisoning cached embeddings to influence model behavior, or creating symbolic links to redirect file operations, potentially leading to privilege escalation or data corruption. The vulnerability requires local access with low privileges (PR:L) but no user interaction (UI:N) and has a CVSS 3.0 score of 7.3, reflecting high confidentiality and integrity impact with low availability impact. No known exploits are currently reported in the wild, but the predictable nature of the temporary directory and the common use of shared Linux environments make exploitation feasible in certain contexts.

Potential Impact

For European organizations, especially those deploying run-llama/llama_index on shared Linux servers or multi-tenant environments, this vulnerability poses significant risks. Confidentiality is at high risk as attackers could exfiltrate proprietary AI models or sensitive cached data, potentially exposing intellectual property or sensitive analytics. Integrity is also highly impacted since attackers can poison cached embeddings, leading to corrupted or manipulated AI outputs, which can affect decision-making processes or automated workflows. Availability impact is low but possible if attackers disrupt cache operations. Organizations in sectors relying heavily on AI/ML models—such as finance, healthcare, manufacturing, and research institutions—may face operational and reputational damage if their models are compromised. The vulnerability is particularly concerning in environments where multiple users share the same Linux system, such as cloud-hosted platforms, research clusters, or development servers common in European tech ecosystems.

Mitigation Recommendations

To mitigate CVE-2025-7647, organizations should first upgrade to a patched version of the llama-index-core package once available. Until then, administrators should implement strict access controls on the /tmp/llama_index directory by setting restrictive permissions (e.g., chmod 700) and ensuring it is owned by the application user to prevent unauthorized access. Employing unique, unpredictable temporary directory names per user or process can reduce the risk of symlink attacks. Running the application in isolated environments such as containers or dedicated virtual machines can limit multi-user exposure. Additionally, monitoring file system changes and access to /tmp/llama_index can help detect suspicious activity. Incorporating mandatory access control (MAC) systems like SELinux or AppArmor to restrict file operations on temporary directories can further harden the environment. Finally, educating developers to avoid hardcoded temporary paths and to use secure temporary file APIs (e.g., mkdtemp) will prevent recurrence.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
@huntr_ai
Date Reserved
2025-07-14T16:44:34.096Z
Cvss Version
3.0
State
PUBLISHED

Threat ID: 68d813d8c38eb2a1b8713fdc

Added to database: 9/27/2025, 4:42:00 PM

Last enriched: 10/5/2025, 12:50:16 AM

Last updated: 11/8/2025, 8:34:12 PM

Views: 122

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

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