CVE-2024-12704: Llama index core LlamaIndex Improper Handling Of Exceptional Vulnerability
HIGHCVE-2024-12704 is a HIGH (CVSS 7.5) llamaindex improper handling of exceptional vulnerability (CWE-755: Improper Handling of Exceptional Conditions) affecting Llama index core libraries in the PyPI ecosystem. The issue involves llamaindex improper handling of exceptional conditions vulnerability. Remediation is available by upgrading affected packages to version 0.12.6.
CVE-2024-12704 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2024-12704
To remediate this vulnerability, upgrade all affected Llama index core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install llama-index-core>=0.12.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show llama-index-core
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2024-12704, inspect your installed packages using pip:
pip show llama-index-core
Analyze the terminal output to locate any version of Llama index core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.12.6), your application is affected.
Note: The pip show llama-index-core command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-755: Improper Handling of Exceptional Conditions, where the product does not handle or incorrectly handles an exceptional condition. In Llama index core, 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
CVE-2024-12704 Affected Llama index core Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
llama-index-core
|
PyPI |
< 0.12.6
|
0.12.6
|
References
Frequently Asked Questions
What is CVE-2024-12704?
Which Llama index core versions are affected?
What version fixes CVE-2024-12704?
Is llama-index-core affected?
What is the CVSS score of CVE-2024-12704?
What CWE is associated with CVE-2024-12704?
How can I check PyPI dependencies for CVE-2024-12704?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-j3wr-m6xh-64hg",
"modified" : "2026-02-24T16:08:07Z",
"published" : "2025-03-20T12:32:43Z",
"aliases" : [ "CVE-2024-12704" ],
"summary" : "LlamaIndex Improper Handling of Exceptional Conditions vulnerability",
"details" : "A vulnerability in the LangChainLLM class of the run-llama/llama_index repository, version v0.12.5, allows for a Denial of Service (DoS) attack. The stream_complete method executes the llm using a thread and retrieves the result via the get_response_gen method of the StreamingGeneratorCallbackHandler class. If the thread terminates abnormally before the _llm.predict is executed, there is no exception handling for this case, leading to an infinite loop in the get_response_gen function. This can be triggered by providing an input of an incorrect type, causing the thread to terminate and the process to continue running indefinitely.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "llama-index-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.12.6"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-12704"
}, {
"type" : "WEB",
"url" : "https://github.com/run-llama/llama_index/commit/d1ecfb77578d089cbe66728f18f635c09aa32a05"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/run-llama/llama_index"
}, {
"type" : "WEB",
"url" : "https://huntr.com/bounties/a0b638fd-21c6-4ba7-b381-6ab98472a02a"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-755", "CWE-835" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-03-21T17:40:52Z",
"nvd_published_at" : "2025-03-20T10:15:29Z"
}
}