CVE-2025-1753: Llama index cli LLama-Index CLI OS Command Injection Vulnerability

HIGH
Advisory Identifier: GHSA-g99h-56mw-8263
CVSS 7.8
CWE-78
Published
Advisory Summary

CVE-2025-1753 is a HIGH (CVSS 7.8) llama-index cli os command injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Llama index cli libraries in the PyPI ecosystem. The issue involves llama-index cli os command injection vulnerability. Remediation is available by upgrading affected packages to version 0.4.1.

CVE-2025-1753 at a Glance

CVE Identifier CVE-2025-1753
GHSA Identifier GHSA-g99h-56mw-8263
Severity HIGH
CVSS v3.1 Base Score 7.8
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Llama index cli
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2025-1753

To remediate this vulnerability, upgrade all affected Llama index cli dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

llama-index-cli fixed: 0.4.1
pip install llama-index-cli>=0.4.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show llama-index-cli

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-1753, inspect your installed packages using pip:

pip show llama-index-cli

Analyze the terminal output to locate any version of Llama index cli in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.1), your application is affected.

Note: The pip show llama-index-cli command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Llama index cli, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

LLama-Index CLI prior to v0.4.1, corresponding to LLama-Index prior to v0.12.21, 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.

CVE-2025-1753 Affected Llama index cli Versions

1 component(s)
Fixed Versions:
0.4.1
Product / Package Ecosystem Affected Versions Fixed Version
llama-index-cli
PyPI
< 0.4.1
0.4.1

References

Frequently Asked Questions

What is CVE-2025-1753?
CVE-2025-1753 is a security vulnerability in Llama index cli involving LLama-Index CLI OS command injection vulnerability under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Llama index cli versions are affected?
Affected versions include releases prior to 0.4.1 across affected packages: llama-index-cli.
What version fixes CVE-2025-1753?
Upgrading to 0.4.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is llama-index-cli affected?
Yes, llama-index-cli is affected in releases prior to 0.4.1. Upgrade your dependency to 0.4.1 or later.
What is the CVSS score of CVE-2025-1753?
CVE-2025-1753 has a CVSS v3.1 base score of 7.8 (HIGH) with vector string CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2025-1753?
CVE-2025-1753 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check PyPI dependencies for CVE-2025-1753?
Run the dependency tree command: 'pip show llama-index-cli'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g99h-56mw-8263",
  "modified" : "2025-05-28T16:07:48Z",
  "published" : "2025-05-28T12:30:33Z",
  "aliases" : [ "CVE-2025-1753" ],
  "summary" : "LLama-Index CLI OS command injection vulnerability",
  "details" : "LLama-Index CLI prior to v0.4.1, corresponding to LLama-Index prior to v0.12.21, 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "llama-index-cli"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.4.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-1753"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/run-llama/llama_index/commit/b57e76738c53ca82d88658b82f2d82d1c7839c7d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/run-llama/llama_index"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/19e1c67e-1d77-451d-b10b-acbe99900b22"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-05-28T16:07:48Z",
    "nvd_published_at" : "2025-05-28T10:15:21Z"
  }
}