Skip to content
Heist/ feed
Back to feed
Critical

Prompt Injection leading to Arbitrary Code Execution in run-llama/llama_index

Type: advisorySources: OSV

A vulnerability was identified in the `exec_utils` class of the `llama_index` package, specifically within the `safe_eval` function, allowing for prompt injection leading to arbitrary code execution. This issue arises due to insufficient validation of input, which can be exploited to bypass method restrictions and execute unauthorized code. The vulnerability is a bypass of the previously addressed CVE-2023-39662, demonstrated through a proof of concept that creates a file on the system by exploiting the flaw.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-3098
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 16:48 UTC · Revision 1

Source evidence

Prompt Injection leading to Arbitrary Code Execution in run-llama/llama_index

core-osv · Original source

Published 10 Apr 2024, 17:07 UTC

A vulnerability was identified in the `exec_utils` class of the `llama_index` package, specifically within the `safe_eval` function, allowing for prompt injection leading to arbitrary code execution. This issue arises due to insufficient validation of input, which can be exploited to bypass method restrictions and execute unauthorized code. The vulnerability is a bypass of the previously addressed CVE-2023-39662, demonstrated through a proof of concept that creates a file on the system by exploiting the flaw.

osv:CVE-2024-3098
Complete source record
{
  "id": "1a2689515436a5cc10e29fc5d28fa9d43af5cd944f0f5e34413d1b07bf9de61c",
  "url": "https://osv.dev/vulnerability/CVE-2024-3098",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Prompt Injection leading to Arbitrary Code Execution in run-llama/llama_index",
    "summary": "A vulnerability was identified in the `exec_utils` class of the `llama_index` package, specifically within the `safe_eval` function, allowing for prompt injection leading to arbitrary code execution. This issue arises due to insufficient validation of input, which can be exploited to bypass method restrictions and execute unauthorized code. The vulnerability is a bypass of the previously addressed CVE-2023-39662, demonstrated through a proof of concept that creates a file on the system by exploiting the flaw.",
    "evidence": "osv:CVE-2024-3098",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2024-3098",
      "aliases": [
        "CVE-2024-3098",
        "GHSA-wvpx-g427-q9wc",
        "PYSEC-2026-397"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/run-llama/llama_index",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3d3a8b9608af9f7aea30bcd9e115dcf37379a5d6"
                },
                {
                  "fixed": "5fbcb5a8b9f20f81b791c7fc8849e352613ab475"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.10.24"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "SplitRange"
                  },
                  {
                    "range": [
                      {
                        "fixed": "5fbcb5a8b9f20f81b791c7fc8849e352613ab475"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v0.10.23",
            "v0.10.22",
            "v0.10.20",
            "v0.10.19",
            "v0.10.18",
            "v0.10.17",
            "v0.10.16",
            "v0.10.15",
            "v0.10.14",
            "v0.10.13.post1",
            "v0.10.13",
            "v0.10.12",
            "v0.10.11",
            "v0.10.10",
            "v0.10.9",
            "v0.10.8",
            "v0.10.7",
            "v0.10.6",
            "v0.10.5",
            "v0.10.3",
            "v0.10.1",
            "v0.10.0",
            "v0.9.48",
            "v0.9.46",
            "v0.9.45.post1",
            "v0.9.42.post2",
            "v0.9.42.post1",
            "v0.9.42",
            "v0.9.41",
            "v0.9.40",
            "v0.9.39",
            "v0.9.38",
            "v0.9.37",
            "v0.9.36",
            "v0.9.31",
            "v0.9.29",
            "v0.9.28.post2",
            "v0.9.28.post1",
            "v0.9.28",
            "v0.9.26",
            "v0.9.25",
            "v0.9.22",
            "v0.9.17.dev1",
            "v0.9.16.post1",
            "v0.9.15.post2",
            "v0.9.15.post1",
            "v0.9.15",
            "v0.9.14.post3",
            "v0.9.12",
            "v0.9.11.post1",
            "v0.9.10",
            "v0.9.9",
            "v0.9.8.post1",
            "v0.9.8",
            "v0.9.7",
            "v0.9.6.post2",
            "v0.9.6.post1",
            "v0.9.6",
            "v0.9.5",
            "v0.9.3.post1",
            "v0.9.3",
            "v0.9.1",
            "v0.9.0",
            "v0.8.69.post2",
            "v0.8.69.post1",
            "v0.8.69",
            "v0.8.66",
            "v0.8.63.post1",
            "v0.8.53.post1",
            "v0.8.45.post1",
            "v0.8.45",
            "v0.8.43.post1",
            "v0.8.43",
            "v0.8.38",
            "v0.8.29.post1",
            "v0.8.25",
            "v0.8.11.post3",
            "v0.8.11.post2",
            "v0.8.11.post1",
            "v0.8.10",
            "v0.8.7",
            "v0.8.5.post1",
            "v0.8.4",
            "v0.8.3",
            "v0.8.2.post1",
            "v0.8.2",
            "v0.8.1.post1",
            "v0.7.24.post1",
            "v0.7.20",
            "v0.7.19",
            "v0.7.14",
            "v0.7.13",
            "v0.7.12",
            "v0.7.11.post1",
            "v0.7.11",
            "v0.7.10",
            "v0.7.9",
            "v0.6.21",
            "v0.6.3",
            "v0.6.0",
            "v0.6.0.alpha1",
            "v0.4.2",
            "v0.4.1",
            "v0.4.0",
            "v0.3.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-3098.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:30.830025029Z",
      "provider": "osv",
      "references": [
        "https://huntr.com/bounties/1bce0d61-ad03-4b22-bc32-8f99f92974e7",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/3xxx/CVE-2024-3098.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-3098",
        "https://github.com/run-llama/llama_index/commit/5fbcb5a8b9f20f81b791c7fc8849e352613ab475"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-94"
        ],
        "cna_assigner": "@huntr_ai",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/3xxx/CVE-2024-3098.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-3098",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 497565,
  "published_at": "2024-04-10T17:07:56.501+00:00"
}