{"answers":{"affected":"6 open source packages ship an affected version, including llama-index and llama-index-llms-rungpt. It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-4181 in the wild and no public exploit code.","fix":"Upgrade llama-index to 0.10.13 or later.","what":"CVE-2024-4181 is a high-severity code injection vulnerability in run-llama/llama_index, published on 16 May 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-4181 and fix it if it is affected.\n\nWhat it is: CVE-2024-4181 is a high-severity code injection vulnerability in run-llama/llama_index, published on 16 May 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2024-4181 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- llama-index (PyPI): affected all versions; fixed in 0.10.13\n- llama-index (PyPI): affected all versions; fixed in 0.10.13\n- llama-index (PyPI): affected from 0.9.47; fixed in 0.10.13\n- llama-index-llms-rungpt (PyPI): affected all versions; fixed in 0.1.3\n- llama-index-llms-rungpt (PyPI): affected all versions; fixed in 0.1.3\n- llama-index-llms-rungpt (PyPI): affected all versions; fixed in 0.1.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-4181/ (Markdown: https://insights.sbomify.com/CVE-2024-4181/index.md)","id":"CVE-2024-4181","markdown":"https://insights.sbomify.com/CVE-2024-4181/index.md","name":"CVE-2024-4181","record":{"aliases":["GHSA-pw38-xv9x-h8ch","PYSEC-2024-324","PYSEC-2026-1565"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Python LLM library","requires_auth":"none","summary":"A malicious LLM provider can execute arbitrary commands on client machines via improper eval usage in the RunGptLLM class.","user_interaction":"required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"@huntr_ai","cpe":[{"product":"llamaindex","vendor":"llamaindex"}],"cvss":{"score":8.8,"severity":"high","source":"cna","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.0"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"description":"A command injection vulnerability exists in the RunGptLLM class of the llama_index library, version 0.9.47, used by the RunGpt framework from JinaAI to connect to Language Learning Models (LLMs). The vulnerability arises from the improper use of the eval function, allowing a malicious or compromised LLM hosting provider to execute arbitrary commands on the client's machine. This issue was fixed in version 0.10.13. The exploitation of this vulnerability could lead to a hosting provider gaining full control over client machines.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Command Injection in run-llama/llama_index","id":"CVE-2024-4181","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"code_injection","year":"2024"},"n_packages":6,"n_references":2,"next":{"headline":"Mattermost crashes web clients via a malformed custom status","id":"CVE-2024-4182"},"packages":[{"ecosystem":"PyPI","fixed":["0.10.13"],"introduced":["0"],"last_affected":[],"package":"llama-index","purl":null,"source":"GHSA-pw38-xv9x-h8ch"},{"ecosystem":"PyPI","fixed":["0.10.13"],"introduced":["0"],"last_affected":[],"package":"llama-index","purl":"pkg:pypi/llama-index","source":"GHSA-pw38-xv9x-h8ch"},{"ecosystem":"PyPI","fixed":["0.10.13"],"introduced":["0.9.47"],"last_affected":[],"package":"llama-index","purl":"pkg:pypi/llama-index","source":"PYSEC-2024-324"},{"ecosystem":"PyPI","fixed":["0.1.3"],"introduced":["0"],"last_affected":[],"package":"llama-index-llms-rungpt","purl":null,"source":"GHSA-pw38-xv9x-h8ch"},{"ecosystem":"PyPI","fixed":["0.1.3"],"introduced":["0"],"last_affected":[],"package":"llama-index-llms-rungpt","purl":"pkg:pypi/llama-index-llms-rungpt","source":"GHSA-pw38-xv9x-h8ch"},{"ecosystem":"PyPI","fixed":["0.1.3"],"introduced":["0"],"last_affected":[],"package":"llama-index-llms-rungpt","purl":"pkg:pypi/llama-index-llms-rungpt","source":"PYSEC-2026-1565"}],"prev":{"headline":"The Events Calendar \u003c 6.4.0.1 - Reflected XSS","id":"CVE-2024-4180"},"products":["run-llama/llama_index"],"published":"2024-05-16","related":[{"cvss_score":10,"headline":"SQL Injection to RCE in run-llama/llama_index","id":"CVE-2024-12909","kev_date_added":null,"published":"2025-03-20"},{"cvss_score":9.8,"headline":"SQL Injection in run-llama/llama_index","id":"CVE-2025-1793","kev_date_added":null,"published":"2025-06-05"},{"cvss_score":9.8,"headline":"SQL Injection in run-llama/llama_index","id":"CVE-2025-1750","kev_date_added":null,"published":"2025-06-02"},{"cvss_score":9.8,"headline":"SQL Injection in run-llama/llama_index","id":"CVE-2024-11958","kev_date_added":null,"published":"2025-03-20"},{"cvss_score":9.8,"headline":"Command Injection in run-llama/llama_index","id":"CVE-2024-3271","kev_date_added":null,"published":"2024-04-16"},{"cvss_score":9.8,"headline":"SQL injection in llama-index","id":"CVE-2024-23751","kev_date_added":null,"published":"2024-01-22"},{"cvss_score":8.8,"headline":"LlamaIndex includes an exec call for `import {cls_name}`","id":"CVE-2024-45201","kev_date_added":null,"published":"2024-08-22"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-01","vendors":["run-llama"]},"summary":"A malicious LLM provider can execute arbitrary commands on client machines via improper eval usage in the RunGptLLM class.","url":"https://insights.sbomify.com/CVE-2024-4181/"}