CVE-2025-5472: LlamaIndex Core Vulnerable to DoS Attack via Uncontrolled Recursive JSON Parsing
Summary
CVE-2025-5472: LlamaIndex vulnerable to DoS attack through uncontrolled recursive JSON parsing. Affects llama-index-core versions < 0.12.38. Fixed in 0.12.38. How to fix ↓
Also tracked for
- llama-index · PyPI
The same CVE-2025-5472 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
LlamaIndex Core is a Python package designed for efficient indexing and querying of data structures, particularly in applications that require fast access to nested JSON data. It is widely used in data processing and web applications. However, a recent vulnerability has been identified in the JSONReader component, which can lead to significant availability issues if exploited.
Vulnerability Detail
The JSONReader in run-llama/llama_index versions 0.12.28 is vulnerable to a stack overflow due to uncontrolled recursive JSON parsing. This vulnerability allows attackers to trigger a Denial of Service (DoS) by submitting deeply nested JSON structures, leading to a RecursionError and crashing applications. The root cause is the unsafe recursive traversal design and lack of depth validation, making the JSONReader susceptible to stack overflow when processing deeply nested JSON. This impacts the availability of services, making them unreliable and disrupting workflows.
How To Fix
Minimum fixed version
0.12.38
This is the first release that contains the fix.
pip install --upgrade "llama-index-core==0.12.38"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If you cannot immediately update the package, consider implementing input validation to limit the depth of JSON structures processed by the JSONReader. This can help mitigate the risk of stack overflow. For example, you can check the depth of the JSON before processing it and reject overly complex structures.
Conclusion
The vulnerability identified as CVE-2025-5472 in the LlamaIndex Core package poses a significant risk of Denial of Service due to uncontrolled recursive JSON parsing. It is crucial for developers using this package to update to the patched version 0.12.38 to ensure application stability and security.
See every vulnerability recorded for llama-index-core →
FAQ
CVE-2025-5472 is a vulnerability in the LlamaIndex Core package that allows for Denial of Service attacks through uncontrolled recursive JSON parsing.
Exploiting this vulnerability can lead to application crashes and service unavailability, disrupting workflows and user access.
The vulnerability affects LlamaIndex versions prior to 0.12.38, specifically starting from version 0.12.28.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The CVSS score for this vulnerability is 6.5, indicating a moderate severity level.
Related vulnerabilities
Recent vulnerabilities recorded for llama-index-core.