# CVE-2024-12704: Denial of Service (DoS) in run-llama/llama_index

- Severity: High 7.5 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.83%, higher than 58% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-03-20T10:09:06.689Z
- Modified: 2026-07-13T07:26:43.232Z
- Also known as: GHSA-j3wr-m6xh-64hg, PYSEC-2025-244, PYSEC-2026-1563
- Weaknesses: CWE-755, CWE-835
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: @huntr_ai

## Description

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.

(As written by CVE List.)

## Affected

- run-llama run-llama/llama_index: from unspecified before 0.12.6
- llama-index-core (PyPI): before 0.12.6
- llamaindex llamaindex: 0.12.5
- llama-index (PyPI): up to 0.12.5

## Every score

- @huntr_ai: CVSS:3.0 7.5 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.0 7.5 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- PyPA Advisory Database: CVSS:3.0 7.5 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://huntr.com/bounties/a0b638fd-21c6-4ba7-b381-6ab98472a02a> (exploit, evidence, third-party-advisory, web)
- <https://github.com/run-llama/llama_index/commit/d1ecfb77578d089cbe66728f18f635c09aa32a05> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-12704> (advisory)
- <https://github.com/run-llama/llama_index> (package)
- <https://pypi.org/project/llama-index-core> (package)
- <https://github.com/advisories/GHSA-j3wr-m6xh-64hg> (advisory)

## Sources

- CVE List: [CVE-2024-12704](https://www.cve.org/CVERecord?id=CVE-2024-12704), CVE Terms of Use, modified 2025-10-15
- GitHub Advisory Database: [GHSA-j3wr-m6xh-64hg](https://github.com/advisories/GHSA-j3wr-m6xh-64hg), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2024-12704](https://nvd.nist.gov/vuln/detail/CVE-2024-12704), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2025-244](https://osv.dev/vulnerability/PYSEC-2025-244), CC-BY-4.0, modified 2026-07-13
- PyPA Advisory Database: [PYSEC-2026-1563](https://osv.dev/vulnerability/PYSEC-2026-1563), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2024-12704 · Whole record: https://cve.day/CVE-2024-12704.json · Rebuilt by cve.day 2026-11-25T22:58:52.361Z
