NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · LlamaIndex

CVE-2025-5302: LlamaIndex affected by a Denial of Service (DOS) in JSONReader

highCVSS 3.0 8.6GHSA-7753-xrfw-ch36

LlamaIndex's `JSONReader` in llama-index-core before 0.12.38 recurses without a limit on deeply nested JSON. A crafted file drives Python into its recursion limit and can crash the process. Any pipeline that ingests untrusted JSON through this reader is exposed. Fixed in 0.12.38.

Published Aug 26, 2025 · Analysis Nov 1, 2026

What an attacker can do

JSONReader.load_data walks the parsed JSON recursively. A document nested thousands of levels deep exhausts Python's recursion depth, raising RecursionError and, per the advisory, consuming heavy resources and potentially crashing the process. Nothing in the reader bounded the depth.

The attacker needs only to get a nested JSON file into an ingestion path: an upload endpoint, a crawled URL or a shared data folder. No account or interaction is needed (CVSS PR:N/UI:N). The impact is availability. A single bad file can repeatedly take down an indexing worker or a RAG service, and a queue that retries the file can keep it down. There is no data exposure or code execution in the sources.

Who is affected

The llama-index-core pip package before 0.12.38, in code that calls JSONReader. The advisory names v0.12.37 as the version tested. Check:

pip show llama-index-core

Then search your code for JSONReader or download_loader("JSONReader"), and note whether the files it reads come from outside your trust boundary.

llama-index-core

Ecosystem
PyPI
Affected
< 0.12.38
Fixed in
0.12.38
Check
pip show llama-index-core

How to fix it

Upgrade to llama-index-core 0.12.38:

pip install --upgrade "llama-index-core>=0.12.38"

The fix wraps JSONReader.load_data in a try block that catches RecursionError, emits the warning "Recursion error occurred while processing JSON data." and returns an empty list. The reader still sets no depth limit of its own. The sources list no workaround. As a stopgap, check JSON nesting depth or file size before passing it to the reader.

How to tell if you were hit

In patched versions, look for the warning "Recursion error occurred while processing JSON data." in logs, which marks a rejected file. In unpatched ones, look for RecursionError: maximum recursion depth exceeded tracebacks from JSONReader.load_data, and for worker restarts or memory spikes during ingestion. Identify the source file of the failing job and inspect it for extreme nesting.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

A denial of service vulnerability exists in the JSONReader component of the run-llama/llama_index repository, specifically in version v0.12.37. The vulnerability is caused by uncontrolled recursion when parsing deeply nested JSON files, which can lead to Python hitting its maximum recursion depth limit. This results in high resource consumption and potential crashes of the Python process. The issue is resolved in version 0.12.38.

Questions

Which LlamaIndex version fixes CVE-2025-5302?

llama-index-core 0.12.38. The advisory reports v0.12.37 as the vulnerable version tested, and the data lists everything before 0.12.38 as affected.

Does the fix limit JSON nesting depth?

No. The fix catches RecursionError in load_data, warns, and returns an empty list. A deeply nested file is skipped rather than parsed.

Can this lead to code execution?

Not according to the sources. The weakness is uncontrolled recursion (CWE-674), and the CVSS vector shows high availability impact with only low confidentiality and integrity impact.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More LlamaIndex vulnerabilities

All LlamaIndex entries