CVE-2025-1753: CWE-78 Improper Neutralization of Special Elements used in an OS Command in run-llama run-llama/llama_index
LLama-Index CLI version v0.12.20 contains an OS command injection vulnerability. The vulnerability arises from the improper handling of the `--files` argument, which is directly passed into `os.system`. An attacker who controls the content of this argument can inject and execute arbitrary shell commands. This vulnerability can be exploited locally if the attacker has control over the CLI arguments, and remotely if a web application calls the LLama-Index CLI with a user-controlled filename. This issue can lead to arbitrary code execution on the affected system.
AI Analysis
Technical Summary
CVE-2025-1753 is a high-severity OS command injection vulnerability affecting the LLama-Index CLI tool, specifically versions up to v0.12.20. The vulnerability stems from improper neutralization of special elements in the '--files' argument, which is passed directly to the operating system via the Python os.system call without adequate sanitization or validation. This allows an attacker who can control the '--files' argument to inject arbitrary shell commands, leading to arbitrary code execution on the host system. Exploitation can occur locally if an attacker has access to run the CLI with crafted arguments. More critically, remote exploitation is possible if a web application or service invokes the LLama-Index CLI with user-supplied filenames, effectively allowing remote code execution (RCE). The vulnerability is classified under CWE-78 (Improper Neutralization of Special Elements used in an OS Command), indicating a classic command injection flaw. The CVSS v3.0 base score is 7.8, reflecting high impact on confidentiality, integrity, and availability, with low attack complexity and requiring low privileges but no user interaction. No patches are currently linked, and no known exploits are reported in the wild as of the publication date (May 28, 2025). The affected versions are unspecified but include at least v0.12.20 and earlier. This vulnerability poses a significant risk to any environment using the LLama-Index CLI, especially where the '--files' argument can be influenced by untrusted users or inputs, such as in automated pipelines, web services, or multi-user systems.
Potential Impact
For European organizations, the impact of CVE-2025-1753 can be substantial, particularly for those leveraging LLama-Index CLI in data processing, AI, or document indexing workflows. Successful exploitation could lead to full system compromise, data theft, or disruption of critical services. Confidentiality is at risk due to potential unauthorized access to sensitive data processed by the tool. Integrity and availability are also threatened as attackers could modify or delete files, inject malicious payloads, or cause denial of service. Organizations in sectors such as finance, healthcare, government, and critical infrastructure that rely on AI tooling and document indexing may face regulatory and reputational consequences under GDPR and other data protection laws if exploited. The ability for remote exploitation via web applications increases the attack surface, making internet-facing services particularly vulnerable. Given the high severity and ease of exploitation, this vulnerability could be leveraged in targeted attacks or automated scanning campaigns once public exploits emerge.
Mitigation Recommendations
Immediate mitigation steps include: 1) Avoid passing user-controlled input directly to the '--files' argument in the LLama-Index CLI. Implement strict input validation and sanitization to ensure only safe filenames are accepted, disallowing shell metacharacters or command separators. 2) Where possible, replace usage of os.system with safer alternatives such as subprocess.run with argument lists to avoid shell interpretation. 3) Restrict access to the CLI tool to trusted users and environments, minimizing exposure to untrusted inputs. 4) For web applications invoking LLama-Index CLI, implement strong input validation, sandboxing, and privilege separation to limit the impact of potential exploitation. 5) Monitor systems for unusual command executions or process invocations related to LLama-Index. 6) Stay alert for official patches or updates from the vendor and apply them promptly once available. 7) Consider employing application whitelisting and endpoint detection and response (EDR) solutions to detect and block suspicious command injection attempts. 8) Conduct security reviews of automation scripts and CI/CD pipelines that use LLama-Index CLI to ensure no injection vectors exist.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy, Spain
CVE-2025-1753: CWE-78 Improper Neutralization of Special Elements used in an OS Command in run-llama run-llama/llama_index
Description
LLama-Index CLI version v0.12.20 contains an OS command injection vulnerability. The vulnerability arises from the improper handling of the `--files` argument, which is directly passed into `os.system`. An attacker who controls the content of this argument can inject and execute arbitrary shell commands. This vulnerability can be exploited locally if the attacker has control over the CLI arguments, and remotely if a web application calls the LLama-Index CLI with a user-controlled filename. This issue can lead to arbitrary code execution on the affected system.
AI-Powered Analysis
Technical Analysis
CVE-2025-1753 is a high-severity OS command injection vulnerability affecting the LLama-Index CLI tool, specifically versions up to v0.12.20. The vulnerability stems from improper neutralization of special elements in the '--files' argument, which is passed directly to the operating system via the Python os.system call without adequate sanitization or validation. This allows an attacker who can control the '--files' argument to inject arbitrary shell commands, leading to arbitrary code execution on the host system. Exploitation can occur locally if an attacker has access to run the CLI with crafted arguments. More critically, remote exploitation is possible if a web application or service invokes the LLama-Index CLI with user-supplied filenames, effectively allowing remote code execution (RCE). The vulnerability is classified under CWE-78 (Improper Neutralization of Special Elements used in an OS Command), indicating a classic command injection flaw. The CVSS v3.0 base score is 7.8, reflecting high impact on confidentiality, integrity, and availability, with low attack complexity and requiring low privileges but no user interaction. No patches are currently linked, and no known exploits are reported in the wild as of the publication date (May 28, 2025). The affected versions are unspecified but include at least v0.12.20 and earlier. This vulnerability poses a significant risk to any environment using the LLama-Index CLI, especially where the '--files' argument can be influenced by untrusted users or inputs, such as in automated pipelines, web services, or multi-user systems.
Potential Impact
For European organizations, the impact of CVE-2025-1753 can be substantial, particularly for those leveraging LLama-Index CLI in data processing, AI, or document indexing workflows. Successful exploitation could lead to full system compromise, data theft, or disruption of critical services. Confidentiality is at risk due to potential unauthorized access to sensitive data processed by the tool. Integrity and availability are also threatened as attackers could modify or delete files, inject malicious payloads, or cause denial of service. Organizations in sectors such as finance, healthcare, government, and critical infrastructure that rely on AI tooling and document indexing may face regulatory and reputational consequences under GDPR and other data protection laws if exploited. The ability for remote exploitation via web applications increases the attack surface, making internet-facing services particularly vulnerable. Given the high severity and ease of exploitation, this vulnerability could be leveraged in targeted attacks or automated scanning campaigns once public exploits emerge.
Mitigation Recommendations
Immediate mitigation steps include: 1) Avoid passing user-controlled input directly to the '--files' argument in the LLama-Index CLI. Implement strict input validation and sanitization to ensure only safe filenames are accepted, disallowing shell metacharacters or command separators. 2) Where possible, replace usage of os.system with safer alternatives such as subprocess.run with argument lists to avoid shell interpretation. 3) Restrict access to the CLI tool to trusted users and environments, minimizing exposure to untrusted inputs. 4) For web applications invoking LLama-Index CLI, implement strong input validation, sandboxing, and privilege separation to limit the impact of potential exploitation. 5) Monitor systems for unusual command executions or process invocations related to LLama-Index. 6) Stay alert for official patches or updates from the vendor and apply them promptly once available. 7) Consider employing application whitelisting and endpoint detection and response (EDR) solutions to detect and block suspicious command injection attempts. 8) Conduct security reviews of automation scripts and CI/CD pipelines that use LLama-Index CLI to ensure no injection vectors exist.
Affected Countries
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
- 2025-02-27T11:29:11.678Z
- Cvss Version
- 3.0
- State
- PUBLISHED
Threat ID: 6836dadc182aa0cae240f29f
Added to database: 5/28/2025, 9:43:56 AM
Last enriched: 7/6/2025, 1:39:46 AM
Last updated: 7/30/2025, 4:10:28 PM
Views: 15
Related Threats
CVE-2025-38213
UnknownCVE-2025-8859: Unrestricted Upload in code-projects eBlog Site
MediumCVE-2025-8865: CWE-476 NULL Pointer Dereference in YugabyteDB Inc YugabyteDB
MediumCVE-2025-8852: Information Exposure Through Error Message in WuKongOpenSource WukongCRM
MediumCVE-2025-8864: CWE-532 Insertion of Sensitive Information into Log File in YugabyteDB Inc YugabyteDB Anywhere
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.