CVE-2024-6868: CWE-59 Improper Link Resolution Before File Access in mudler mudler/localai
mudler/LocalAI version 2.17.1 allows for arbitrary file write due to improper handling of automatic archive extraction. When model configurations specify additional files as archives (e.g., .tar), these archives are automatically extracted after downloading. This behavior can be exploited to perform a 'tarslip' attack, allowing files to be written to arbitrary locations on the server, bypassing checks that normally restrict files to the models directory. This vulnerability can lead to remote code execution (RCE) by overwriting backend assets used by the server.
AI Analysis
Technical Summary
CVE-2024-6868 is a vulnerability classified under CWE-59 (Improper Link Resolution Before File Access) affecting the mudler/localai project, specifically version 2.17.1. The issue arises from the automatic extraction of archive files (such as .tar) specified in model configurations. When these archives are downloaded and extracted, the software does not properly validate or sanitize the file paths contained within the archives. This flaw enables a 'tarslip' attack, where maliciously crafted archive entries use relative paths or symbolic links to escape the intended extraction directory (the models directory) and write files to arbitrary locations on the server filesystem. Because the software uses these extracted files as backend assets, an attacker can overwrite critical files, potentially injecting malicious code or altering server behavior, leading to remote code execution (RCE). The CVSS 3.0 score is 8.1 (high severity), reflecting network attack vector, low attack complexity, requiring privileges but no user interaction, and resulting in high impact on integrity and availability but no confidentiality loss. No patches are currently linked, and no known exploits have been observed in the wild. The vulnerability is particularly dangerous in environments where mudler/localai is exposed to untrusted users or automated model deployment pipelines, as it can be exploited to gain persistent control over the server or disrupt AI services.
Potential Impact
For European organizations, the impact of CVE-2024-6868 can be significant, especially those relying on mudler/localai for AI model hosting, inference, or development. Successful exploitation can lead to remote code execution, allowing attackers to manipulate AI models, disrupt services, or pivot to other internal systems. This threatens the integrity and availability of AI-driven applications, which are increasingly critical in sectors such as finance, healthcare, manufacturing, and government services across Europe. The ability to write arbitrary files can also facilitate the deployment of ransomware or other malware, amplifying operational risks. Given the growing adoption of AI technologies in Europe and the emphasis on data protection and service continuity under regulations like GDPR and NIS2, this vulnerability poses compliance and reputational risks. Organizations with automated model deployment pipelines or public-facing AI services are particularly vulnerable to exploitation if proper access controls and input validation are not enforced.
Mitigation Recommendations
1. Apply patches or updates from mudler/localai as soon as they become available to address the improper archive extraction behavior. 2. Until patches are released, disable or restrict the use of automatic archive extraction for model configurations, especially from untrusted sources. 3. Implement strict validation and sanitization of archive contents before extraction, ensuring no file paths can escape the intended extraction directory (e.g., by rejecting entries with '../' or absolute paths). 4. Employ filesystem access controls and sandboxing to limit the permissions of the mudler/localai process, preventing it from writing outside designated directories. 5. Monitor file system changes in the models directory and critical backend asset locations for unauthorized modifications. 6. Restrict privileges of users or automated systems that can upload or configure models to mudler/localai to minimize the risk of malicious archive uploads. 7. Conduct regular security audits and penetration testing focused on archive handling and deployment pipelines. 8. Consider network segmentation and firewall rules to limit exposure of mudler/localai services to trusted networks only.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Denmark, Belgium, Italy, Spain
CVE-2024-6868: CWE-59 Improper Link Resolution Before File Access in mudler mudler/localai
Description
mudler/LocalAI version 2.17.1 allows for arbitrary file write due to improper handling of automatic archive extraction. When model configurations specify additional files as archives (e.g., .tar), these archives are automatically extracted after downloading. This behavior can be exploited to perform a 'tarslip' attack, allowing files to be written to arbitrary locations on the server, bypassing checks that normally restrict files to the models directory. This vulnerability can lead to remote code execution (RCE) by overwriting backend assets used by the server.
AI-Powered Analysis
Technical Analysis
CVE-2024-6868 is a vulnerability classified under CWE-59 (Improper Link Resolution Before File Access) affecting the mudler/localai project, specifically version 2.17.1. The issue arises from the automatic extraction of archive files (such as .tar) specified in model configurations. When these archives are downloaded and extracted, the software does not properly validate or sanitize the file paths contained within the archives. This flaw enables a 'tarslip' attack, where maliciously crafted archive entries use relative paths or symbolic links to escape the intended extraction directory (the models directory) and write files to arbitrary locations on the server filesystem. Because the software uses these extracted files as backend assets, an attacker can overwrite critical files, potentially injecting malicious code or altering server behavior, leading to remote code execution (RCE). The CVSS 3.0 score is 8.1 (high severity), reflecting network attack vector, low attack complexity, requiring privileges but no user interaction, and resulting in high impact on integrity and availability but no confidentiality loss. No patches are currently linked, and no known exploits have been observed in the wild. The vulnerability is particularly dangerous in environments where mudler/localai is exposed to untrusted users or automated model deployment pipelines, as it can be exploited to gain persistent control over the server or disrupt AI services.
Potential Impact
For European organizations, the impact of CVE-2024-6868 can be significant, especially those relying on mudler/localai for AI model hosting, inference, or development. Successful exploitation can lead to remote code execution, allowing attackers to manipulate AI models, disrupt services, or pivot to other internal systems. This threatens the integrity and availability of AI-driven applications, which are increasingly critical in sectors such as finance, healthcare, manufacturing, and government services across Europe. The ability to write arbitrary files can also facilitate the deployment of ransomware or other malware, amplifying operational risks. Given the growing adoption of AI technologies in Europe and the emphasis on data protection and service continuity under regulations like GDPR and NIS2, this vulnerability poses compliance and reputational risks. Organizations with automated model deployment pipelines or public-facing AI services are particularly vulnerable to exploitation if proper access controls and input validation are not enforced.
Mitigation Recommendations
1. Apply patches or updates from mudler/localai as soon as they become available to address the improper archive extraction behavior. 2. Until patches are released, disable or restrict the use of automatic archive extraction for model configurations, especially from untrusted sources. 3. Implement strict validation and sanitization of archive contents before extraction, ensuring no file paths can escape the intended extraction directory (e.g., by rejecting entries with '../' or absolute paths). 4. Employ filesystem access controls and sandboxing to limit the permissions of the mudler/localai process, preventing it from writing outside designated directories. 5. Monitor file system changes in the models directory and critical backend asset locations for unauthorized modifications. 6. Restrict privileges of users or automated systems that can upload or configure models to mudler/localai to minimize the risk of malicious archive uploads. 7. Conduct regular security audits and penetration testing focused on archive handling and deployment pipelines. 8. Consider network segmentation and firewall rules to limit exposure of mudler/localai services to trusted networks only.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- @huntr_ai
- Date Reserved
- 2024-07-17T21:19:44.930Z
- Cvss Version
- 3.0
- State
- PUBLISHED
Threat ID: 68ef9b2a178f764e1f470d5d
Added to database: 10/15/2025, 1:01:30 PM
Last enriched: 10/15/2025, 1:33:59 PM
Last updated: 10/16/2025, 3:19:57 PM
Views: 1
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-2025-61543: n/a
HighCVE-2025-61541: n/a
HighCVE-2025-61536: n/a
HighCVE-2025-41254: CWE-352: Cross-Site Request Forgery (CSRF) in VMware Spring Framework
MediumCVE-2025-36002: Password in Configuration File in IBM Sterling B2B Integrator
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.