Skip to main content

CVE-2025-5302: CWE-674 Uncontrolled Recursion in run-llama run-llama/llama_index

High
VulnerabilityCVE-2025-5302cvecve-2025-5302cwe-674
Published: Mon Aug 25 2025 (08/25/2025, 15:03:18 UTC)
Source: CVE Database V5
Vendor/Project: run-llama
Product: run-llama/llama_index

Description

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.

AI-Powered Analysis

AILast updated: 08/25/2025, 15:32:43 UTC

Technical Analysis

CVE-2025-5302 is a high-severity denial of service (DoS) vulnerability identified in the JSONReader component of the run-llama/llama_index repository, specifically affecting version v0.12.37. The root cause is an uncontrolled recursion issue (CWE-674) triggered when the JSONReader attempts to parse deeply nested JSON files. Python's recursion limit is exceeded during this process, causing the interpreter to consume excessive resources and ultimately crash or become unresponsive. This vulnerability does not require any authentication or user interaction and can be exploited remotely by submitting crafted JSON input to the affected component. The impact primarily affects availability, as the Python process handling the JSON parsing can be forced to terminate or hang, disrupting dependent services or applications. The vulnerability has been addressed in version 0.12.38 of the run-llama/llama_index package, where recursion handling has been corrected to prevent exceeding the maximum recursion depth. The CVSS v3.0 base score is 8.6, reflecting a high severity due to network attack vector, low attack complexity, no privileges or user interaction required, and significant impact on availability and minor impact on confidentiality and integrity.

Potential Impact

For European organizations using the run-llama/llama_index library, especially in environments processing JSON data at scale or receiving external JSON inputs, this vulnerability poses a significant risk to service availability. Systems relying on this library for data ingestion, AI model indexing, or JSON parsing could experience crashes or denial of service conditions, leading to downtime and potential disruption of business-critical applications. This can affect sectors such as finance, healthcare, and public services where data processing reliability is paramount. Additionally, the high resource consumption during exploitation attempts could degrade system performance, impacting other applications on shared infrastructure. Although no known exploits are currently reported in the wild, the low complexity of triggering the vulnerability means attackers could weaponize this flaw to disrupt services or conduct denial of service attacks against European targets.

Mitigation Recommendations

European organizations should immediately upgrade the run-llama/llama_index library to version 0.12.38 or later, where the uncontrolled recursion issue is fixed. If immediate upgrade is not feasible, implement input validation and limit the depth of JSON nesting before parsing to prevent triggering the recursion limit. Employ runtime monitoring to detect abnormal resource consumption or Python process crashes related to JSON parsing. Additionally, consider sandboxing or isolating the JSON parsing component to contain potential crashes and prevent cascading failures. Network-level protections such as rate limiting and filtering of suspicious JSON payloads can reduce exposure to exploit attempts. Finally, maintain an inventory of systems using this library to ensure comprehensive patching and risk management.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
@huntr_ai
Date Reserved
2025-05-28T10:16:07.938Z
Cvss Version
3.0
State
PUBLISHED

Threat ID: 68ac7e93ad5a09ad004caabd

Added to database: 8/25/2025, 3:17:39 PM

Last enriched: 8/25/2025, 3:32:43 PM

Last updated: 8/25/2025, 6:01:01 PM

Views: 4

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats