CVE-2025-6209 is a high-severity (CVSS 7.5) CWE-29 vulnerability in llama-index-core. A fix is available for llama-index-core — see the affected versions and patch details below.
Arbitrary File Read through Path Traversal in run-llama/llama_index
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for CVE-2025-6209.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
llama-index-coreReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
A path traversal vulnerability exists in run-llama/llama_index versions 0.12.27 through 0.12.40, specifically within the encode_image function in generic_utils.py. This vulnerability allows an attacker to manipulate the image_path input to read arbitrary files on the server, including sensitive system files. The issue arises due to improper validation or sanitization of the file path, enabling path traversal sequences to access files outside the intended directory. The vulnerability is fixed in version 0.12.41.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | llama-index-core | ≥ 0.11.23&&< 0.12.41 | 0.12.41pip install --upgrade 'llama-index-core==0.12.41' |
Affected Products
llamaindexllamaindexDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for llama-index-core, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update llama-index-core to 0.12.41 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-6209 is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
On Red Hat systems most users are not given access to sensitive files. A compromised process using the llama index will not have access to general system secrets unless it has been given greater permission than it should have.
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.Source: Red Hat security advisory for CVE-2025-6209 (CC BY 4.0)
Frequently Asked Questions
Is CVE-2025-6209 in your dependencies?
Find it across PyPI, including transitive dependencies.