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

CVE-2025-1752: LlamaIndex Vulnerable to Denial of Service (DoS)

highCVSS 3.0 7.5GHSA-7c85-87cp-mr6g

LlamaIndex's `KnowledgeBaseWebReader` ignores its `max_depth` limit in `get_article_urls`. A crafted site can force endless recursion, exhaust Python's recursion limit and crash the process. Affects llama-index 0.12.15 up to 0.12.21. Fixed in 0.12.21.

Published May 10, 2025 · Updated Oct 15, 2025 · Analysis Nov 1, 2026

What an attacker can do

KnowledgeBaseWebReader crawls a knowledge-base website and collects article links with get_article_urls. The method takes a max_depth argument, but the code does not enforce it in the recursive calls. A site whose pages link in a deep or looping chain makes the function call itself until Python hits its recursion limit. The interpreter raises a RecursionError and the process can crash.

The attacker needs to control or poison a site your application crawls. No login and no user action are needed on your side (CVSS 3.0: network, no privileges, high availability impact). Typical victims are RAG ingestion jobs and services that let users submit a URL to index. A crash stops the ingestion worker, and in a web service that runs the reader in-process, it can take the app down. The advisory describes no data theft or code execution.

Who is affected

Affected: the llama-index package from 0.12.15 up to but not including 0.12.21. The advisory names v0.12.15 as the version it was found in. Check:

pip show llama-index

You are exposed only if you use KnowledgeBaseWebReader, which ships in the web reader integration, against sites you do not control.

llama-index

Ecosystem
PyPI
Affected
>= 0.12.15, < 0.12.21
Fixed in
0.12.21
Check
pip show llama-index

How to fix it

Upgrade to 0.12.21:

pip install --upgrade llama-index==0.12.21

The fix is in the commit referenced from the advisory. The advisory gives no workaround. Until you upgrade, crawl only trusted sites, and run the reader in a separate worker process so a crash does not take down your main service.

How to tell if you were hit

Look for RecursionError: maximum recursion depth exceeded in the logs, with a stack that repeats get_article_urls. Check for ingestion workers that crash or restart after loading a particular URL. That URL is the one to block. The advisory lists no other log signature.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

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.

Questions

Do I need KnowledgeBaseWebReader for this to matter?

Yes. The flaw is in that reader's get_article_urls method. If your code never uses it, this advisory does not affect you.

Which llama-index version is safe?

0.12.21 or later. The affected range starts at 0.12.15 and ends before 0.12.21.

Can this execute code?

No. The advisory describes uncontrolled recursion and a crash of the Python process, with availability as the only impact. It is not in the CISA KEV catalog.

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