Skip to content

← Actionable
High, CVSS 7.5amended

LlamaIndex Improper Handling of Exceptional Conditions vulnerability

CVE-2024-12704GHSA-j3wr-m6xh-64hg

What to do

Partial vendor fix. Follow the primary source's mitigation guidance and check back for a fix.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • PyPI llama-index

    Affected
    <= 0.12.5
    Fixed in
    no fixed version recorded
  • PyPI llama-index-core

    Affected
    < 0.12.6
    Fixed in
    0.12.6

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
7.5 · CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
  • CVE-2024-12704: 0.83% estimated exploitation activity in the next 30 days; percentile 57.64 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

A vulnerability in the LangChainLLM class of the run-llama/llamaindex repository, version v0.12.5, allows for a Denial of Service (DoS) attack. The streamcomplete method executes the llm using a thread and retrieves the result via the getresponsegen 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 getresponsegen 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.

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 3 · amended ·

    Amended from ghsa record GHSA-j3wr-m6xh-64hg

  2. Revision 2 · amended ·

    Amended from osv record PYSEC-2025-244

  3. Revision 1 · created ·

    Published from osv record GHSA-j3wr-m6xh-64hg

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2024-12704

Advisory: LlamaIndex Improper Handling of Exceptional Conditions vulnerability
IDs: CVE-2024-12704, GHSA-j3wr-m6xh-64hg
Record: https://patchnext.com/advisories/cve-2024-12704 (revision 3, source checked 26 Oct 2026, 13:36 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 7.5)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Partial vendor fix; fixed versions by package: llama-index-core 0.12.6. A vendor fix does not mean a deployment is fixed.

## Affected components
- PyPI llama-index: affected <= 0.12.5
- PyPI llama-index-core: affected < 0.12.6; fixed in 0.12.6

## Suggested inspection (read-only)
- `python -m pip show llama-index`: prints the installed version. Run with the environment that serves production active.
- `python -m pip show llama-index-core`: prints the installed version. Run with the environment that serves production active.

## Supported action
No complete vendor fix is recorded. Follow the primary source's mitigation guidance and check this record again before closing anything.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on llama-index, llama-index-core.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-j3wr-m6xh-64hg (OSV record GHSA-j3wr-m6xh-64hg lists affected ranges: PyPI llama-index-core >=0 <0.12.6 (fixed))
- Verified: https://osv.dev/vulnerability/PYSEC-2025-244 (OSV record PYSEC-2025-244 lists affected ranges: PyPI llama-index >=0 <=0.12.5)
- Verified: https://github.com/advisories/GHSA-j3wr-m6xh-64hg (GitHub-reviewed advisory GHSA-j3wr-m6xh-64hg lists affected ranges: PyPI llama-index-core >=0 <0.12.6)

Commands are suggestions: review each one before running it.

Loading voting…