CVE-2025-6211
Medium · 6.5LlamaIndex vulnerable to data loss through hash collisions in its DocugamiReader class
CVSS
6.5
EPSS
0.4%
Published
Jul 10, 2025
CISA due date
—
Cloudanix analysis
A flaw in how some AI document tools create unique labels for text sections can cause important information to be silently replaced or lost, leading to wrong answers from the AI.
- Exploitation
- Other
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Data Tampering
- Component
- Library
- Class
- Cryptographic Weakness
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
MD5-based chunk ID generation in DocugamiReader allows collisions for structurally different chunks sharing identical text, causing overwrites that corrupt parent-child hierarchies and stored content.
Why it matters to the business
Organizations relying on llama_index for document processing risk silent loss of critical legal or semantic data, leading to incorrect AI outputs, compliance failures, and degraded retrieval quality across dependent applications.
How an attack unfolds
An attacker supplies documents containing repeated text segments in different structural contexts; the MD5 collision causes one chunk to overwrite another during indexing, breaking hierarchies and injecting incomplete or hallucinated content into downstream AI responses.
How to fix it
Upgrade run-llama/llama_index to version 0.12.41 or later; apply the fixes from commits d38310da63adfc39a5f7eb550e214b8eb02b8b45 and 29b2e07e64ed7d302b1cc058185560b28eaa1352.
How to confirm the fix worked
Confirm package version is at least 0.12.41; test with documents containing repeated text in different structures and verify distinct chunk IDs and intact hierarchies are preserved.
Typical attack path
- Identify or craft input documents with duplicate text across distinct sections
- Ingest documents via DocugamiReader in vulnerable llama_index versions
- Observe overwritten chunk IDs and lost parent-child relationships
- Query the resulting index to trigger inaccurate or incomplete AI outputs
How to detect it
Review ingestion logs for repeated chunk IDs on distinct documents; inspect stored chunk hierarchies for unexpected overwrites or missing parent-child links; no public exploitation artifacts are known.
What your security team should do
- Immediately upgrade all llama_index installations to 0.12.41 or newer
- Audit existing indexes for signs of prior chunk overwrites
- Monitor EPSS trend and re-evaluate if exploit maturity increases
The record
A vulnerability in the DocugamiReader class of the run-llama/llama_index repository, up to but excluding version 0.12.41, involves the use of MD5 hashing to generate IDs for document chunks. This approach leads to hash collisions when structurally distinct chunks contain identical text, resulting in one chunk overwriting another. This can cause loss of semantically or legally important document content, breakage of parent-child chunk hierarchies, and inaccurate or hallucinated responses in AI outputs. The issue is resolved in version 0.3.1.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| PyPI | llama-index | 0 | 0.12.41 |
| PyPI | llama-index-readers-docugami | 0 | 0.3.1 |
| Chainguard | nemo | 0 | 2.3.2-r1 |
Related vulnerabilities
- CVE-2025-7707 llama-index has Insecure Temporary File Also affects llama-index
- CVE-2025-1793 llama_index vulnerable to SQL Injection Also affects llama-index
- CVE-2024-12911 LlamaIndex vulnerable to Creation of Temporary File in Directory with Insecure Permissions Also affects llama-index
- CVE-2024-12910 LlamaIndex Uncontrolled Resource Consumption vulnerability Also affects llama-index
- CVE-2024-4181 A command injection vulnerability exists in the RunGptLLM class of the llama_index… Also affects llama-index
- CVE-2024-23751 LlamaIndex (aka llama_index) through 0.9.34 allows SQL injection via the Text-to-SQL… Also affects llama-index
- CVE-2026-32274 Black is the uncompromising Python code formatter. Also affects nemo
- CVE-2026-31826 pypdf is a free and open-source pure-python PDF library. Also affects nemo