CVE-2025-1752: llama_index: DoS via uncapped recursion in web reader
GHSA-7c85-87cp-mr6g HIGH PoC AVAILABLE CISA: TRACK*If your RAG pipelines use LlamaIndex's KnowledgeBaseWebReader to ingest web content, an unauthenticated attacker who can influence crawled URLs can crash your Python process. Upgrade llama-index to 0.12.21 immediately; no workaround exists short of disabling the component. Impact is availability-only—no data exfiltration—but a crashed ingestion pipeline means stale or missing context in production AI systems.
What is the risk?
High severity (CVSS 7.5) with low active exploitation probability (EPSS 0.16%). The attack requires zero privileges and no user interaction, lowering the barrier to exploitation. However, the attacker must control or influence URL sources fed to KnowledgeBaseWebReader, which limits opportunistic exploitation. In AI pipelines that autonomously crawl external content or process user-submitted URLs, exposure is significantly elevated. Not in CISA KEV; patch is available.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| LlamaIndex | pip | >= 0.12.15, < 0.12.21 | 0.12.21 |
Do you use LlamaIndex? You're affected.
How severe is it?
What is the attack surface?
What should I do?
1 step-
1) Upgrade llama-index to >= 0.12.21 (patch commit 3c65db29). 2) If upgrade is blocked, disable KnowledgeBaseWebReader and substitute with a reader that enforces crawl depth. 3) Implement URL allowlists for web reader components—never crawl attacker-controlled domains. 4) Run web ingestion in isolated subprocesses with resource limits (ulimit, container cgroups) to contain recursion crashes. 5) Monitor ingestion pipeline processes for unexpected terminations; alert on repeated crashes as a potential exploitation signal. 6) Apply sys.setrecursionlimit() at the application layer as a defense-in-depth measure.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-1752?
If your RAG pipelines use LlamaIndex's KnowledgeBaseWebReader to ingest web content, an unauthenticated attacker who can influence crawled URLs can crash your Python process. Upgrade llama-index to 0.12.21 immediately; no workaround exists short of disabling the component. Impact is availability-only—no data exfiltration—but a crashed ingestion pipeline means stale or missing context in production AI systems.
Is CVE-2025-1752 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-1752, increasing the risk of exploitation.
How to fix CVE-2025-1752?
1) Upgrade llama-index to >= 0.12.21 (patch commit 3c65db29). 2) If upgrade is blocked, disable KnowledgeBaseWebReader and substitute with a reader that enforces crawl depth. 3) Implement URL allowlists for web reader components—never crawl attacker-controlled domains. 4) Run web ingestion in isolated subprocesses with resource limits (ulimit, container cgroups) to contain recursion crashes. 5) Monitor ingestion pipeline processes for unexpected terminations; alert on repeated crashes as a potential exploitation signal. 6) Apply sys.setrecursionlimit() at the application layer as a defense-in-depth measure.
What systems are affected by CVE-2025-1752?
This vulnerability affects the following AI/ML architecture patterns: RAG pipelines, document ingestion pipelines, agent frameworks, knowledge base builders.
What is the CVSS score for CVE-2025-1752?
CVE-2025-1752 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.44%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0029 Denial of AI Service AML.T0034 Cost Harvesting AML.T0049 Exploit Public-Facing Application Compliance Controls Affected
What are the technical details?
Original Advisory
A Denial of Service (DoS) vulnerability has been identified in the KnowledgeBaseWebReader class of the run-llama/llama_index project, affecting version ~ latest(v0.12.15). The vulnerability arises due to inappropriate secure coding measures, specifically the lack of proper implementation of the max_depth parameter in the get_article_urls function. This allows an attacker to exhaust Python's recursion limit through repeated function calls, leading to resource consumption and ultimately crashing the Python process.
Exploitation Scenario
An adversary hosts a website with circular or deeply nested link structures and submits its URL to a system using KnowledgeBaseWebReader—common in RAG knowledge base builders or AI research assistants. In an agentic workflow where an LLM autonomously fetches web content, the adversary embeds the malicious URL in a document or prompt, causing the agent to invoke the vulnerable reader. The get_article_urls function recursively follows links without respecting max_depth, exhausting Python's call stack (default 1000 frames) and crashing the process. The attack requires no authentication, is repeatable, and could keep the ingestion pipeline offline indefinitely.
Weaknesses (CWE)
CWE-400 — Uncontrolled Resource Consumption: The product does not properly control the allocation and maintenance of a limited resource.
- [Architecture and Design] Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.
- [Architecture and Design] Mitigation of resource exhaustion attacks requires that the target system either: The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question. The second solution is simply difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker. recognizes the attack and denies that user further access for a given amount of time, or uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H References
Timeline
Related Vulnerabilities
CVE-2024-12909 10.0 llama-index finchat: SQL injection enables RCE
Same package: llama-index CVE-2025-1793 9.8 llama_index: SQL injection in vector store integrations
Same package: llama-index CVE-2024-11958 9.8 llama-index DuckDB retriever: SQLi enables RCE
Same package: llama-index CVE-2025-1753 7.8 llama-index-cli: OS command injection enables RCE
Same package: llama-index CVE-2025-3225 7.5 llama-index Papers Loader: XML expansion DoS
Same package: llama-index