CVE-2025-45691 is a high-severity (CVSS 7.5) Path Traversal vulnerability in ragas. A fix is available for ragas — see the affected versions and patch details below.
RAGAS has an Arbitrary File Read vulnerability
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2025-45691.
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
ragasReal-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
An Arbitrary File Read vulnerability exists in the ImageTextPromptValue class in Exploding Gradients RAGAS v0.2.3 to v0.2.14. The vulnerability stems from improper validation and sanitization of URLs supplied in the retrieved_contexts parameter when handling multimodal inputs.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | ragas | ≥ 0.2.3&&< 0.3.0-rc1 | 0.3.0-rc1pip install --upgrade 'ragas==0.3.0-rc1' |
Affected Products
ragasvibrantlabsaiDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for ragas, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update ragas to 0.3.0-rc1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-45691 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.
To exploit this flaw, an attacker needs to supply malicious input to a Ragas evaluation pipeline, typically by poisoning a dataset or submitting payloads directly via an API. This issue allows arbitrary file reads, internal port scans and access to cloud metadata, but it does not cause memory corruption or arbitrary…
To mitigate this vulnerability, implement strict input validation to filter out malicious payloads before passing the retrieved_contexts parameter to the Ragas evaluation pipeline. Specifically, enforce an allowlist that only accepts http:// or https:// URLs, explicitly rejecting the file:// scheme. Additionally, ensure the account running the Ragas process operates with principle of least privilege, restricting access to sensitive system files.Source: Red Hat security advisory for CVE-2025-45691 (CC BY 4.0)
Frequently Asked Questions
Is CVE-2025-45691 in your dependencies?
Find it across PyPI, including transitive dependencies.