CVE-2025-6208: llama-index-core: DoS causes service disruption
GHSA-488g-hw5f-x29p MEDIUM CISA: TRACK*If your organization uses LlamaIndex's SimpleDirectoryReader for document ingestion—particularly in RAG pipelines or agent workflows—patch to version 0.12.41 immediately. An unauthenticated attacker who can influence the directory path processed by this component can trigger memory exhaustion, taking down your ingestion service. The blast radius is availability-only, but in production RAG environments this translates to a downed knowledge base.
What is the risk?
Moderate operational risk for LlamaIndex-dependent deployments. CVSS 5.3 with AV:N/AC:L/PR:N/UI:N means zero friction to trigger remotely with no privileges—but impact is capped at partial availability loss (A:L). EPSS 0.00019 signals negligible exploitation activity in the wild as of publication. Risk escalates significantly when SimpleDirectoryReader processes attacker-controlled paths in multi-tenant SaaS, public-facing RAG APIs, or document processing pipelines without resource isolation. Not in CISA KEV; not yet weaponized.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| LlamaIndex Core | pip | < 0.12.41 | 0.12.41 |
Do you use LlamaIndex Core? You're affected.
How severe is it?
What is the attack surface?
What should I do?
5 steps-
PATCH
Upgrade llama-index-core to >= 0.12.41. This is the definitive fix.
-
WORKAROUND (pre-patch): Enumerate directory contents and apply file count limits before invoking SimpleDirectoryReader; wrap calls in a subprocess with memory limits (ulimit -v or cgroup v2 memory.max).
-
ARCHITECTURAL
Never allow user-supplied paths to flow directly into SimpleDirectoryReader—validate, allowlist, and sandbox directory inputs.
-
DETECTION
Monitor for OOM events or sudden memory spikes in ingestion services; alert on processes hitting 80%+ container memory limits.
-
ISOLATION
Run document ingestion workers in separate pods/containers with hard memory limits and auto-restart policies to contain blast radius.
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-6208?
If your organization uses LlamaIndex's SimpleDirectoryReader for document ingestion—particularly in RAG pipelines or agent workflows—patch to version 0.12.41 immediately. An unauthenticated attacker who can influence the directory path processed by this component can trigger memory exhaustion, taking down your ingestion service. The blast radius is availability-only, but in production RAG environments this translates to a downed knowledge base.
Is CVE-2025-6208 actively exploited?
No confirmed active exploitation of CVE-2025-6208 has been reported, but organizations should still patch proactively.
How to fix CVE-2025-6208?
1. PATCH: Upgrade llama-index-core to >= 0.12.41. This is the definitive fix. 2. WORKAROUND (pre-patch): Enumerate directory contents and apply file count limits before invoking SimpleDirectoryReader; wrap calls in a subprocess with memory limits (ulimit -v or cgroup v2 memory.max). 3. ARCHITECTURAL: Never allow user-supplied paths to flow directly into SimpleDirectoryReader—validate, allowlist, and sandbox directory inputs. 4. DETECTION: Monitor for OOM events or sudden memory spikes in ingestion services; alert on processes hitting 80%+ container memory limits. 5. ISOLATION: Run document ingestion workers in separate pods/containers with hard memory limits and auto-restart policies to contain blast radius.
What systems are affected by CVE-2025-6208?
This vulnerability affects the following AI/ML architecture patterns: RAG pipelines, document ingestion pipelines, agent frameworks, knowledge base hydration workflows.
What is the CVSS score for CVE-2025-6208?
CVE-2025-6208 has a CVSS v3.1 base score of 5.3 (MEDIUM). The EPSS exploitation probability is 0.37%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software 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
The `SimpleDirectoryReader` component in `llama_index.core` version 0.12.23 suffers from uncontrolled memory consumption due to a resource management flaw. The vulnerability arises because the user-specified file limit (`num_files_limit`) is applied after all files in a directory are loaded into memory. This can lead to memory exhaustion and degraded performance, particularly in environments with limited resources. The issue is resolved in version 0.12.41.
Exploitation Scenario
An adversary targets a SaaS platform exposing a document ingestion API backed by LlamaIndex. They create a directory or upload a ZIP archive containing thousands of small files (or reference a network share with a massive file tree), then invoke the ingestion endpoint with that path. SimpleDirectoryReader loads every file into memory before num_files_limit discards the excess—causing the ingestion worker to OOM-crash. In a shared-infrastructure deployment, repeated triggers constitute a resource exhaustion DoS that degrades service for all tenants. No authentication, no special knowledge of the model, and no sophisticated tooling required—a basic script iterating directory creation is sufficient.
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:L References
Timeline
Related Vulnerabilities
CVE-2025-5302 8.6 llama-index: JSON parsing DoS via deep recursion
Same package: llama-index-core CVE-2025-6209 7.5 llama_index: path traversal allows arbitrary file read
Same package: llama-index-core CVE-2024-12704 7.5 llama-index: DoS via infinite loop in LangChain LLM
Same package: llama-index-core CVE-2025-7647 7.3 llama-index-core: insecure /tmp dir, model theft risk
Same package: llama-index-core CVE-2025-5472 6.5 llama-index: JSONReader DoS via recursive JSON parsing
Same package: llama-index-core